summaryrefslogtreecommitdiff
path: root/src/graphics.cpp
diff options
context:
space:
mode:
authorEugenio Favalli <elvenprogrammer@gmail.com>2005-07-13 16:16:13 +0000
committerEugenio Favalli <elvenprogrammer@gmail.com>2005-07-13 16:16:13 +0000
commitd75390d09e42bc35d6897b6d71d14d56c238870c (patch)
tree6b72dcf38e39fc1a0a88fe620f63f4d540a4f846 /src/graphics.cpp
parent360408fc4c04a72750ecfece7539260129b765ab (diff)
downloadmana-d75390d09e42bc35d6897b6d71d14d56c238870c.tar.gz
mana-d75390d09e42bc35d6897b6d71d14d56c238870c.tar.bz2
mana-d75390d09e42bc35d6897b6d71d14d56c238870c.tar.xz
mana-d75390d09e42bc35d6897b6d71d14d56c238870c.zip
readding ifdefs
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);