mirror of https://github.com/aap/librw.git
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);
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue