From 65c619b3e7dcec6f5dbd05d3203b530d667ba90f Mon Sep 17 00:00:00 2001 From: aap Date: Thu, 18 Feb 2021 11:07:36 +0100 Subject: [PATCH] glFramebufferTexture -> glFramebufferTexture2D --- src/gl/gl3device.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; } }