summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp30
1 files changed, 2 insertions, 28 deletions
diff --git a/src/client.cpp b/src/client.cpp
index d85251390..d3a11b369 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -32,6 +32,7 @@
#include "game.h"
#include "guild.h"
#include "guildmanager.h"
+#include "graphicsmanager.h"
#include "graphicsvertexes.h"
#include "itemshortcut.h"
#include "joystick.h"
@@ -509,34 +510,7 @@ void Client::gameInit()
}
#endif
-#ifdef USE_OPENGL
- int useOpenGL = 0;
- if (!mOptions.noOpenGL)
- useOpenGL = config.getIntValue("opengl");
-
- // Setup image loading for the right image format
- Image::setLoadAsOpenGL(useOpenGL);
- GraphicsVertexes::setLoadAsOpenGL(useOpenGL);
-
- // Create the graphics context
- switch (useOpenGL)
- {
- case 0:
- mainGraphics = new Graphics;
- break;
- case 1:
- default:
- mainGraphics = new OpenGLGraphics;
- break;
- case 2:
- mainGraphics = new OpenGL1Graphics;
- break;
- };
-
-#else
- // Create the graphics context
- mainGraphics = new Graphics;
-#endif
+ graphicsManager.initGraphics(mOptions.noOpenGL);
runCounters = config.getBoolValue("packetcounters");