Don't try to display stencil in textures that don't have stencil data

This commit is contained in:
baldurk
2016-07-26 11:14:44 +02:00
parent 037cf44ddc
commit 73d063281f
+9
View File
@@ -1421,6 +1421,15 @@ bool GLReplay::RenderTextureInternal(TextureDisplay cfg, bool blendAlpha)
cfg.Alpha = false;
}
// depth-only, make sure we display it as such
if(GetBaseFormat(texDetails.internalFormat) == eGL_DEPTH_COMPONENT)
{
cfg.Red = true;
cfg.Green = false;
cfg.Blue = false;
cfg.Alpha = false;
}
if(!cfg.Red && cfg.Green)
{
dsTexMode = eGL_STENCIL_INDEX;