From 141975cfd22b21403383ea5213cb85ef5427fc9e Mon Sep 17 00:00:00 2001 From: Björn Steinbrink Date: Thu, 18 Aug 2005 13:11:12 +0000 Subject: Semi-separated OpenGL and SDL graphics classes, improving OpenGL performance. --- src/main.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/main.cpp') 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(); -- cgit v1.2.3-70-g09d2