summaryrefslogtreecommitdiff
path: root/src/graphics.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/graphics.cpp')
-rw-r--r--src/graphics.cpp5
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);