View Full Version : z-buffer
I would like to put the z-buffer in a
mode so that the objects are ALL
drawn but they affect the z-buffer
not to sure what u mean perhaps glDepthFunc( GL_ALWAYS )
in fact I want The objects to write in
the z-buffer in the same way that
glDepthFunc(GL_LESS) does :
only the nearer pixel write in the z-buffer
But I also want the pixels that are
supposed not to be seen(that don't write
in the z-buffer)to be drawn in the
It is for blending : I want the
the z-buffer to be always written in, but
I want it to has no effect during blending.
You can do this in two passes. First you draw your scene with your glDepthFunc to GL_LESS but you don't draw in the frame color. To do this, use glColorMask(0, 0, 0, 0). In the second pass, you disable the depth buffer and draw with glColorMask(1, 1, 1, 1). I think it should not take much more time than drawing in one pass.
Yeah, very cool thank you
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.