View Full Version : DepthTest problem

09-19-2012, 11:57 AM
Im working on a 3D modelling program. Ive made a similar rotate gizmo as in 3DS Max. I disabled DepthTest so the gizmo is in front of all the other objects, but the 3 rings "hide each other" according to the order in which i draw them.


Is there a way to "turn on" the DepthTest only for drawing the gizmo, without clearing the depth buffer or something as expensive.

carsten neumann
09-19-2012, 03:46 PM
Hmm, perhaps render the widget into an FBO with a RGBA color buffer. Then use that as a texture on a quad and render it on top of your scene (with blending/alpha test enabled).
One additional depth clear to render an object that is in front of everything else in the scene should not be that expensive - hopefully ;)