ATI depth testing issues

Hi all,

I got an ATI x700 and it seems to refuse to do appropriate depth testing, that is, when depth testing is enabled the surfaces appear a bit messy along with any textures if texture mapping is enabled. This is the code enabling depth testing:


I tried tweaking the ATI’s opengl properties on the desktop settings but nothings seems to have changed.
Does anybody know how to resolve this issue?

Please be a bit more specific with what you mean by “a bit messy”. Maybe post a screenshot.

You might be witnessing z-fighting. How many bits does your depth buffer have (glGetIntegerv(GL_DEPTH_BITS, &bits))?

Yes I meant z-fighting (you’ll have to excuse my terminology as it is a bit rusty :frowning: My depth buffer has got 16 bits and even when I set this to 32 things get even worse. Would it matter that I use MFC as a framework instead of pure windows sdk calls? Thanks for the quick reply

Try moving the near plane of your glFrustum/gluPerspective call farther away. That is the most important factor to depth precision.

Hey thanks, it works fine now!