summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
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();