PDA

View Full Version : ATI depth testing issues



01-15-2006, 03:30 PM
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:

glClearDepth(1.0f);
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LEQUAL);

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?
Thanks

memfr0b
01-15-2006, 03:40 PM
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))?

01-15-2006, 04:07 PM
Yes I meant z-fighting (you'll have to excuse my terminology as it is a bit rusty :( 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

memfr0b
01-15-2006, 04:09 PM
Try moving the near plane of your glFrustum/gluPerspective call farther away. That is the most important factor to depth precision.

01-15-2006, 04:27 PM
Hey thanks, it works fine now!
Cheers