Fix regression in WebGL depth/stencil attachments (e.g. shadow maps).

This commit is contained in:
Pale Moon
2016-09-20 02:45:35 +02:00
committed by roytam1
parent 6e6e9636be
commit 599437b037
+9 -4
View File
@@ -970,10 +970,15 @@ WebGLFramebuffer::FinalizeAttachments() const
ColorAttachment(i).FinalizeAttachment(gl, LOCAL_GL_COLOR_ATTACHMENT0+i);
}
DepthAttachment().FinalizeAttachment(gl, LOCAL_GL_DEPTH_ATTACHMENT);
StencilAttachment().FinalizeAttachment(gl, LOCAL_GL_STENCIL_ATTACHMENT);
DepthStencilAttachment().FinalizeAttachment(gl,
LOCAL_GL_DEPTH_STENCIL_ATTACHMENT);
if (DepthAttachment().IsDefined())
DepthAttachment().FinalizeAttachment(gl, LOCAL_GL_DEPTH_ATTACHMENT);
if (StencilAttachment().IsDefined())
StencilAttachment().FinalizeAttachment(gl, LOCAL_GL_STENCIL_ATTACHMENT);
if (DepthStencilAttachment().IsDefined())
DepthStencilAttachment().FinalizeAttachment(gl,
LOCAL_GL_DEPTH_STENCIL_ATTACHMENT);
FinalizeDrawAndReadBuffers(gl, ColorAttachment(0).IsDefined());
}