ANGEL
09-02-2000, 09:12 AM
In order to draw the surface to the depth buffer but not the color buffer,
How can I implement the effect?
With glColorMask(r, g, b, a), where r, g, b and a is a boolean value (GL_TRUE or GL_FALSE). If r is GL_FALSE, then no red colorcomponents will be drawn, if g is GL_FALSE, green wont be drawn... and so on.
So calling glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE) will disable ALL writings to the framebuffer.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.