glFramebufferTexture -> glFramebufferTexture2D

This commit is contained in:
aap 2021-02-18 11:07:36 +01:00
parent 576d211cbd
commit 65c619b3e7
1 changed files with 3 additions and 3 deletions

View File

@ -1239,7 +1239,7 @@ setFrameBuffer(Camera *cam)
Gl3Raster *oldfb = PLUGINOFFSET(Gl3Raster, natzb->fboMate, nativeRasterOffset); Gl3Raster *oldfb = PLUGINOFFSET(Gl3Raster, natzb->fboMate, nativeRasterOffset);
if(oldfb->fbo){ if(oldfb->fbo){
bindFramebuffer(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); bindFramebuffer(natfb->fbo);
} }
oldfb->fboMate = nil; oldfb->fboMate = nil;
@ -1250,13 +1250,13 @@ setFrameBuffer(Camera *cam)
if(gl3Caps.gles) if(gl3Caps.gles)
glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT, GL_RENDERBUFFER, natzb->texid); glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT, GL_RENDERBUFFER, natzb->texid);
else 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{ }else{
// remove z-buffer // remove z-buffer
if(natfb->fboMate && natfb->fbo) 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; natfb->fboMate = nil;
} }
} }