I’m new to OpenGL and want to create a textured 3D maze like you would see in a first person game like ‘Eye of the Beholder’. I have the 3D maze rendering in a window, but when I have one wall in front of another, I can sometimes see through to parts of the wall behind. I’m assuming OpenGL has an easy way to do the hidden object removal for you? Do I use GLEnable to turn on this feature, or how is it done?
I’m using the TAO framework for my OpenGL work.
I’ve attached an image of a portion of my maze so you can see the effect I am talking about.
Yes there is. Its called z-buffer or in OpenGL depth buffer
Here for basic understanding: http://en.wikipedia.org/wiki/Z-buffering
And here about the OpenGL variant: http://www.opengl.org/wiki/Depth_Test
You also can find a lot of tutorials about it just with the search terms depth buffer and OpenGL .
[QUOTE=Osbios;1259983]Yes there is. Its called z-buffer or in OpenGL depth buffer
You also can find a lot of tutorials about it just with the search terms depth buffer and OpenGL .[/QUOTE]
Thanks for the reply. I was able to use the links you provided to get the depth buffering to work. At first I was presented with a blank screen, then I realized that the near clipping plane was set to 0. Once I fixed that, everything worked fine.