summaryrefslogtreecommitdiff
path: root/src/graphicsmanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-08-13 22:18:03 +0300
committerAndrei Karas <akaras@inbox.ru>2012-09-30 02:57:13 +0300
commit135c19b4337e1ab45cff40a306eadc52a061ddef (patch)
tree0a163ca1edd542aec5570b7e451034aafb4089dd /src/graphicsmanager.cpp
parent3a2bab265768c219b0c077eef10b69dfe8158131 (diff)
downloadmanaverse-135c19b4337e1ab45cff40a306eadc52a061ddef.tar.gz
manaverse-135c19b4337e1ab45cff40a306eadc52a061ddef.tar.bz2
manaverse-135c19b4337e1ab45cff40a306eadc52a061ddef.tar.xz
manaverse-135c19b4337e1ab45cff40a306eadc52a061ddef.zip
add atlas textures support.
Diffstat (limited to 'src/graphicsmanager.cpp')
-rw-r--r--src/graphicsmanager.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/graphicsmanager.cpp b/src/graphicsmanager.cpp
index 2d2740023..d10b5de9e 100644
--- a/src/graphicsmanager.cpp
+++ b/src/graphicsmanager.cpp
@@ -55,7 +55,8 @@ GraphicsManager::GraphicsManager() :
mMajor(0),
mPlatformMinor(0),
mPlatformMajor(0),
- mMaxVertices(500)
+ mMaxVertices(500),
+ mUseAtlases(false)
{
}
@@ -174,21 +175,27 @@ void GraphicsManager::initGraphics(bool noOpenGL)
{
case 0:
imageHelper = new SDLImageHelper;
+ sdlImageHelper = imageHelper;
mainGraphics = new Graphics;
break;
case 1:
default:
imageHelper = new OpenGLImageHelper;
+ sdlImageHelper = new SDLImageHelper;
mainGraphics = new NormalOpenGLGraphics;
break;
case 2:
imageHelper = new OpenGLImageHelper;
+ sdlImageHelper = new SDLImageHelper;
mainGraphics = new SafeOpenGLGraphics;
break;
};
+ mUseAtlases = imageHelper->useOpenGL()
+ && config.getBoolValue("useAtlases");
#else
// Create the graphics context
imageHelper = new SDLImageHelper;
+ sdlImageHelper = imageHelper;
mainGraphics = new Graphics;
#endif
}