1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-02-03 10:04:01 +00:00

unbind framebuffer after init; fixes loading bar screen staying black

This commit is contained in:
fgenesis 2024-05-07 00:44:04 +02:00
parent 4bebd71198
commit 18b0527bda
2 changed files with 8 additions and 4 deletions

View file

@ -561,7 +561,7 @@ void DSQ::takeScreenshotKey()
screenshot();
}
Quad *loading=0;
static Quad *loading=0;
float loadingProgress = 0;
static const float loadingProgressTable[] = {

View file

@ -134,7 +134,7 @@ bool FrameBuffer::init(int width, int height, unsigned pages)
glGenFramebuffersEXT(_numfbos, &_fbos[0]);
for(unsigned i = 0; i < _numfbos; ++i)
if(!_fbos[i])
return false;
goto out;
if(_numfbos == 1)
glBindFramebufferEXT( GL_FRAMEBUFFER_EXT, _fbos[0] );
@ -177,13 +177,17 @@ bool FrameBuffer::init(int width, int height, unsigned pages)
debugLog("GL_FRAMEBUFFER_UNSUPPORTED_EXT!");
default:
unloadDevice();
return false;
goto out;
}
}
debugLog("Done");
inited = true;
return true;
out:
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
return inited;
}
void FrameBuffer::unloadDevice()