Skip to content

Commit

Permalink
fbo fix
Browse files Browse the repository at this point in the history
  • Loading branch information
aap committed Oct 24, 2020
1 parent edc7774 commit ee2a32e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/gl/gl3device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,6 @@ bindTexture(uint32 texid)
void
bindFramebuffer(uint32 fbo)
{
//glBindFramebuffer(GL_FRAMEBUFFER, fbo);
if(currentFramebuffer != fbo){
glBindFramebuffer(GL_FRAMEBUFFER, fbo);
currentFramebuffer = fbo;
Expand Down
6 changes: 6 additions & 0 deletions src/gl/gl3raster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,12 @@ destroyNativeRaster(void *object, int32 offset, int32)
break;

case Raster::CAMERA:
if(natras->fboMate){
// Break apart from currently associated zbuffer
Gl3Raster *zras = PLUGINOFFSET(Gl3Raster, natras->fboMate, offset);
zras->fboMate = nil;
natras->fboMate = nil;
}
break;
}
natras->texid = 0;
Expand Down

0 comments on commit ee2a32e

Please sign in to comment.