summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2005-08-18 13:11:12 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2005-08-18 13:11:12 +0000
commit141975cfd22b21403383ea5213cb85ef5427fc9e (patch)
tree6a9acf54dc1b3b95d873b48d5d292f72e6cdcf07 /src/main.cpp
parentb0867dde000892f1aab803bf7d06a51d799baf43 (diff)
downloadmana-141975cfd22b21403383ea5213cb85ef5427fc9e.tar.gz
mana-141975cfd22b21403383ea5213cb85ef5427fc9e.tar.bz2
mana-141975cfd22b21403383ea5213cb85ef5427fc9e.tar.xz
mana-141975cfd22b21403383ea5213cb85ef5427fc9e.zip
Semi-separated OpenGL and SDL graphics classes, improving OpenGL performance.
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index a6c07467..42212b25 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -40,6 +40,9 @@
#include "game.h"
#include "graphics.h"
#include "log.h"
+#ifdef USE_OPENGL
+#include "openglgraphics.h"
+#endif
#include "playerinfo.h"
#include "sound.h"
@@ -237,7 +240,11 @@ void init_engine()
Image::setLoadAsOpenGL(useOpenGL);
// Create the graphics context
- graphics = new Graphics(useOpenGL);
+ if (useOpenGL) {
+ graphics = new OpenGLGraphics();
+ } else {
+ graphics = new Graphics();
+ }
#else
// Create the graphics context
graphics = new Graphics();