-
Disable z-buufer writes
How do you disable z-buffer writes and still have the z-buffer enabled?
I know this is a simple question but I can't seem to find the information, is it possible?
Thank Mike
-
Re: Disable z-buufer writes
glDepthMask(GL_FALSE) will disable depth writes.
glDisable(GL_DEPTH_TEST) will disable depth writes and depth testing.
-
Re: Disable z-buufer writes
This function call glDepthMask(GL_FALSE) dosen't seem to work on my TNT 2.
GL_DEPTH_TEST is enabled for the whole program. I draw my scene with depth writes enabled then I disable depth writes and draw the blended flares. I get horribe errors all over the screen, before without disabling z-buffer writes it worked but the first drawn flare could stop the later drawn flares behind it from being seen (because z-buffer stops it). I could sort them in depth order but can't understand why this dosen't work.
Thank Mike
-
Re: Disable z-buufer writes
Just fixed the problem.
First thing I did was clear the screen and the z-buffer afterwards enabling depth writes. So it was disabled when the operation clear buffers was started.
DOH!!
Mike
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules