diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/graphics.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/graphics.cpp b/src/graphics.cpp index 5fbea504..dc6d0e75 100644 --- a/src/graphics.cpp +++ b/src/graphics.cpp @@ -35,6 +35,7 @@ Graphics::Graphics(): mouseCursor(NULL) { if (useOpenGL) { + #ifdef USE_OPENGL // Setup OpenGL glViewport(0, 0, 800, 600); glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST); @@ -42,7 +43,7 @@ Graphics::Graphics(): SDL_GL_GetAttribute(SDL_GL_DOUBLEBUFFER, &gotDoubleBuffer); logger->log("Using OpenGL %s double buffering.", (gotDoubleBuffer ? "with" : "without")); - #ifdef USE_OPENGL + setTargetPlane(800, 600); #endif } @@ -151,9 +152,11 @@ void Graphics::updateScreen() } if (useOpenGL) { +#ifdef USE_OPENGL glFlush(); glFinish(); SDL_GL_SwapBuffers(); +#endif } else { SDL_Flip(screen); |