mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-11-10 16:09:09 +00:00
Respect program settings for depth/stencil tests
* This means we don't e.g. enable the depth test when it was originally disabled, and show incorrect 'failure' of the draw to pass the depth test
This commit is contained in:
1 parent
3cac0c339d
commit
34b39d79d2
1 file changed
+16
-4
@@ -1199,13 +1199,25 @@ ResourceId GLReplay::RenderOverlay(ResourceId texid, TextureDisplayOverlay overl
|
||||
|
||||
if(overlay == eTexOverlay_DepthBoth)
|
||||
{
|
||||
gl.glEnable(eGL_DEPTH_TEST);
|
||||
gl.glDepthMask(GL_TRUE);
|
||||
if(depthTest)
|
||||
gl.glEnable(eGL_DEPTH_TEST);
|
||||
else
|
||||
gl.glDisable(eGL_DEPTH_TEST);
|
||||
|
||||
if(depthMask)
|
||||
gl.glDepthMask(GL_TRUE);
|
||||
else
|
||||
gl.glDepthMask(GL_FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
gl.glEnable(eGL_STENCIL_TEST);
|
||||
gl.glStencilMask(0xff);
|
||||
if(stencilTest)
|
||||
gl.glEnable(eGL_STENCIL_TEST);
|
||||
else
|
||||
gl.glDisable(eGL_STENCIL_TEST);
|
||||
|
||||
gl.glStencilMaskSeparate(eGL_FRONT, stencilMaskFront);
|
||||
gl.glStencilMaskSeparate(eGL_BACK, stencilMaskBack);
|
||||
}
|
||||
|
||||
// get latest depth/stencil from read FBO (existing FBO) into draw FBO (overlay FBO)
|
||||
|
||||
Reference in new issue
Block a user