From 135c19b4337e1ab45cff40a306eadc52a061ddef Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 13 Aug 2012 22:18:03 +0300 Subject: add atlas textures support. --- src/graphicsmanager.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/graphicsmanager.cpp') 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 } -- cgit v1.2.3-70-g09d2