diff --git a/src/render/Framebuffer.cpp b/src/render/Framebuffer.cpp index e27ba486..1cac19af 100644 --- a/src/render/Framebuffer.cpp +++ b/src/render/Framebuffer.cpp @@ -34,6 +34,7 @@ bool CFramebuffer::alloc(int w, int h) { #ifndef GLES2 if (m_pStencilTex) { glBindTexture(GL_TEXTURE_2D, m_pStencilTex->m_iTexID); + glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH24_STENCIL8, w, h, 0, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, 0); glBindFramebuffer(GL_FRAMEBUFFER, m_iFb); glBindTexture(GL_TEXTURE_2D, m_pStencilTex->m_iTexID);