PDA

View Full Version : Depth buffer question



02-19-2001, 05:28 PM
How do you disable writes to the depth buffer so that things are still dependent upon the depth buffer to be drawn, but don't draw themselves into it? I've seen this discussed before, but I couldn't be sure as to how it was done.

-pATCheS

mango
02-19-2001, 06:15 PM
To control whether the depth buffer is writable, use glDepthMask(); if you pass GL_FALSE as the argument, the buffer becomes read-only, whereas GL_TRUE restores the normal, writable operation.