I want to get information in the depth buffer, so in order to make the buffer work, I should first Enable this buffer. But every time I run the program and when excute the glEnble(…), it will pop out the error:can’t enable without a current contex. So which is this problem related to: display card failed or lib failed?
(look up each of these functions to use them properly.) this sets up a double-buffered full color display with a depth buffer in a window screenWidth x screenHeight.
Got it!
I really created the OpenGL context, but I put the command glEnable(…) before glutCreateWindow(…), so that’s the problem. Your comment just reminded me that.
Thanks a lot. BTW, your homepage is very fancy. I like it.
Originally posted by phlake:
[b]this means that you haven’t created an OpenGL context yet. this basically involves creating a window and binding opengl to it.
(look up each of these functions to use them properly.) this sets up a double-buffered full color display with a depth buffer in a window screenWidth x screenHeight.