PDA

View Full Version : OGL - Hidden Surfaces (Depth Buffer)



Spaceman
10-22-2000, 01:18 PM
Hello.

I'm using glEnable(GL_DEPTH_TEST); to Enable the Depth Buffer (glDepthFunc(GL_LESS); as parameter) and glClear(GL_DEPTH_BUFFER_BIT); for clearing it.

It works all perfect while software rendering but if i enable hardware acceleration some polygons in the background aren't hidden.

I think it's a problem with the Voodoo III. Does anyone know how to hide the polygons which are deeper in the z-axis space correct on a VIII?

My SDK is Glut.

(And yes i know, my English is very bad http://www.opengl.org/discussion_boards/ubb/wink.gif)

Relic
10-23-2000, 06:49 AM
You might have selected pixelformats with different numbers of depth bits.
Check the number of depth bits with DescribePixelformat() or glGetIntegerv(GL_DEPTH_BITS);

If you have 16 bits in HW and 32 bits in SW this could be one reason for different images.

Check the size of your viewing frustum.
Make the ratio of zFar/zNear as small as possible.