]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - gl_backend.c
added support for GL_EXT_packed_depth_stencil, this means that r_viewfbo
[xonotic/darkplaces.git] / gl_backend.c
index 9a5b6028211aeda6be1285444cbfc98cccfa4ec0..4b2bd905d6f04326c03cbb40176aa666ee01657d 100644 (file)
@@ -1264,6 +1264,7 @@ int R_Mesh_CreateFramebufferObject(rtexture_t *depthtexture, rtexture_t *colorte
                qglGenFramebuffersEXT(1, (GLuint*)&temp);CHECKGLERROR
                R_Mesh_SetRenderTargets(temp, NULL, NULL, NULL, NULL, NULL);
                if (depthtexture) qglFramebufferTexture2DEXT(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, depthtexture->gltexturetypeenum, R_GetTexture(depthtexture), 0);CHECKGLERROR
+               if (depthtexture) qglFramebufferTexture2DEXT(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, depthtexture->gltexturetypeenum, R_GetTexture(depthtexture), 0);CHECKGLERROR
                if (colortexture) qglFramebufferTexture2DEXT(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, colortexture->gltexturetypeenum, R_GetTexture(colortexture), 0);CHECKGLERROR
                if (colortexture2) qglFramebufferTexture2DEXT(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT1, colortexture2->gltexturetypeenum, R_GetTexture(colortexture2), 0);CHECKGLERROR
                if (colortexture3) qglFramebufferTexture2DEXT(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT2, colortexture3->gltexturetypeenum, R_GetTexture(colortexture3), 0);CHECKGLERROR