summaryrefslogtreecommitdiff
path: root/src/graphicsmanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-09-01 20:50:30 +0300
committerAndrei Karas <akaras@inbox.ru>2013-09-01 22:38:20 +0300
commit2ab3f0d8d04374b330c91a9f065efa0f526d7824 (patch)
tree8bf7abb126fe43374b3a550d36685525bd3b8235 /src/graphicsmanager.cpp
parenta45370aa8bf7a5558801220d625bff89f3f1a185 (diff)
downloadmanaverse-2ab3f0d8d04374b330c91a9f065efa0f526d7824.tar.gz
manaverse-2ab3f0d8d04374b330c91a9f065efa0f526d7824.tar.bz2
manaverse-2ab3f0d8d04374b330c91a9f065efa0f526d7824.tar.xz
manaverse-2ab3f0d8d04374b330c91a9f065efa0f526d7824.zip
add software renderer for SDL2.
before it used default renderer with software flags.
Diffstat (limited to 'src/graphicsmanager.cpp')
-rw-r--r--src/graphicsmanager.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/graphicsmanager.cpp b/src/graphicsmanager.cpp
index 1c6f81233..471bcb630 100644
--- a/src/graphicsmanager.cpp
+++ b/src/graphicsmanager.cpp
@@ -43,11 +43,13 @@
#include "render/graphics.h"
#include "render/renderers.h"
+#include "render/sdl2softwaregraphics.h"
#include "render/sdlgraphics.h"
#include "resources/fboinfo.h"
#include "resources/imagehelper.h"
#include "resources/openglimagehelper.h"
+#include "resources/sdl2softwareimagehelper.h"
#include "resources/sdlimagehelper.h"
#include "resources/surfaceimagehelper.h"
@@ -231,13 +233,15 @@ void GraphicsManager::initGraphics(const bool noOpenGL)
switch (useOpenGL)
{
case RENDER_SOFTWARE:
- imageHelper = new SDLImageHelper;
#ifdef USE_SDL2
+ imageHelper = new SDL2SoftwareImageHelper;
surfaceImageHelper = new SurfaceImageHelper;
+ mainGraphics = new SDL2SoftwareGraphics;
#else
+ imageHelper = new SDLImageHelper;
surfaceImageHelper = imageHelper;
-#endif
mainGraphics = new SDLGraphics;
+#endif
mUseTextureSampler = false;
break;
case RENDER_NORMAL_OPENGL: