diff --git a/src/gl/gl3device.cpp b/src/gl/gl3device.cpp index 521ba40..7d45362 100644 --- a/src/gl/gl3device.cpp +++ b/src/gl/gl3device.cpp @@ -1239,7 +1239,7 @@ setFrameBuffer(Camera *cam) Gl3Raster *oldfb = PLUGINOFFSET(Gl3Raster, natzb->fboMate, nativeRasterOffset); if(oldfb->fbo){ bindFramebuffer(oldfb->fbo); - glFramebufferTexture(GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT, 0, 0); + glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT, GL_TEXTURE_2D, 0, 0); bindFramebuffer(natfb->fbo); } oldfb->fboMate = nil; @@ -1250,13 +1250,13 @@ setFrameBuffer(Camera *cam) if(gl3Caps.gles) glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT, GL_RENDERBUFFER, natzb->texid); else - glFramebufferTexture(GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT, natzb->texid, 0); + glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT, GL_TEXTURE_2D, natzb->texid, 0); } } }else{ // remove z-buffer if(natfb->fboMate && natfb->fbo) - glFramebufferTexture(GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT, 0, 0); + glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT, GL_TEXTURE_2D, 0, 0); natfb->fboMate = nil; } }