glFramebufferTexture -> glFramebufferTexture2D
This commit is contained in:
parent
576d211cbd
commit
65c619b3e7
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user