mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-29 13:20:54 +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:
@@ -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