diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-05-16 17:33:52 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-05-16 17:33:52 +0000 |
commit | e4e314d67ac1327aecad7bc2934921eec62050c8 (patch) | |
tree | a2b9b222d72dff45da774fce6d8911ab49b57571 /src/graphics.cpp | |
parent | 18ce80c0ab33d39975ed996653942bd2a7614dc9 (diff) | |
download | mana-e4e314d67ac1327aecad7bc2934921eec62050c8.tar.gz mana-e4e314d67ac1327aecad7bc2934921eec62050c8.tar.bz2 mana-e4e314d67ac1327aecad7bc2934921eec62050c8.tar.xz mana-e4e314d67ac1327aecad7bc2934921eec62050c8.zip |
Leave out OpenGL completely when not enabled.
Diffstat (limited to 'src/graphics.cpp')
-rw-r--r-- | src/graphics.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/graphics.cpp b/src/graphics.cpp index 94c23704..4e43b4b5 100644 --- a/src/graphics.cpp +++ b/src/graphics.cpp @@ -32,6 +32,7 @@ SDL_Surface *screen; Graphics::Graphics(): mouseCursor(NULL) { +#ifdef USE_OPENGL if (useOpenGL) { // Setup OpenGL glViewport(0, 0, 800, 600); @@ -41,6 +42,7 @@ Graphics::Graphics(): logger->log("Using OpenGL %s double buffering.", (gotDoubleBuffer ? "with" : "without")); } +#endif #ifdef USE_OPENGL setTargetPlane(800, 600); @@ -139,6 +141,7 @@ void Graphics::updateScreen() mouseCursor->draw(screen, mouseX - 5, mouseY - 2); } +#ifdef USE_OPENGL if (useOpenGL) { glFlush(); glFinish(); @@ -148,6 +151,9 @@ void Graphics::updateScreen() else { SDL_Flip(screen); } +#else + SDL_Flip(screen); +#endif // Decrement frame counter when using framerate limiting if (framesToDraw > 1) framesToDraw--; |