GRIM/EMI: Initialize _storedDisplay after setupScreen

This commit is contained in:
Dries Harnie 2014-08-29 22:37:34 +02:00
parent e2988cfaa2
commit ef403a49d0

View file

@ -218,7 +218,6 @@ GfxOpenGLS::GfxOpenGLS() {
_shadowPlaneProgram = nullptr;
_dimProgram = nullptr;
_dimRegionProgram = nullptr;
glGenTextures(1, &_storedDisplay);
}
GfxOpenGLS::~GfxOpenGLS() {
@ -400,6 +399,8 @@ byte *GfxOpenGLS::setupScreen(int screenW, int screenH, bool fullscreen) {
// Load emergency built-in font
loadEmergFont();
glGenTextures(1, &_storedDisplay);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
if (g_grim->getGameType() == GType_MONKEY4) {
// GL_LEQUAL as glDepthFunc ensures that subsequent drawing attempts for