diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-06-09 22:46:34 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-06-09 23:50:09 +0300 |
commit | ff11053f5f638749c3564c464dc41ebc474b4897 (patch) | |
tree | 8cf7ed8485528c7498612199c7ca56a6fd84f5e5 /src/graphics.cpp | |
parent | b2c1c301b1e39fbbbb5bde3d4d55d14a9873b51f (diff) | |
download | manaplus-ff11053f5f638749c3564c464dc41ebc474b4897.tar.gz manaplus-ff11053f5f638749c3564c464dc41ebc474b4897.tar.bz2 manaplus-ff11053f5f638749c3564c464dc41ebc474b4897.tar.xz manaplus-ff11053f5f638749c3564c464dc41ebc474b4897.zip |
Move static methods from Image class to ImageHelper class.
Remove SDL merge method. It was very slow and unused.
Diffstat (limited to 'src/graphics.cpp')
-rw-r--r-- | src/graphics.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/graphics.cpp b/src/graphics.cpp index 1d557d897..02567b5f2 100644 --- a/src/graphics.cpp +++ b/src/graphics.cpp @@ -30,6 +30,7 @@ #include "logger.h" #include "resources/image.h" +#include "resources/imagehelper.h" #include "utils/stringutils.h" #include <guichan/sdl/sdlpixel.hpp> @@ -178,23 +179,24 @@ bool Graphics::setOpenGLMode() GLint texSize; bool rectTex = graphicsManager.supportExtension( "GL_ARB_texture_rectangle"); - if (rectTex && Image::getInternalTextureType() == 4 + if (rectTex && ImageHelper::getInternalTextureType() == 4 && config.getBoolValue("rectangulartextures")) { logger->log1("using GL_ARB_texture_rectangle"); - Image::mTextureType = GL_TEXTURE_RECTANGLE_ARB; + ImageHelper::mTextureType = GL_TEXTURE_RECTANGLE_ARB; glEnable(GL_TEXTURE_RECTANGLE_ARB); glGetIntegerv(GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB, &texSize); - Image::mTextureSize = texSize; + ImageHelper::mTextureSize = texSize; logger->log("OpenGL texture size: %d pixels (rectangle textures)", - Image::mTextureSize); + ImageHelper::mTextureSize); } else { - Image::mTextureType = GL_TEXTURE_2D; + ImageHelper::mTextureType = GL_TEXTURE_2D; glGetIntegerv(GL_MAX_TEXTURE_SIZE, &texSize); - Image::mTextureSize = texSize; - logger->log("OpenGL texture size: %d pixels", Image::mTextureSize); + ImageHelper::mTextureSize = texSize; + logger->log("OpenGL texture size: %d pixels", + ImageHelper::mTextureSize); } return videoInfo(); #else @@ -282,7 +284,7 @@ bool Graphics::videoInfo() mDoubleBuffer = ((mTarget->flags & SDL_DOUBLEBUF) == SDL_DOUBLEBUF); logger->log("Double buffer mode: %s", mDoubleBuffer ? "yes" : "no"); - Image::dumpSurfaceFormat(mTarget); + ImageHelper::dumpSurfaceFormat(mTarget); const SDL_VideoInfo *vi = SDL_GetVideoInfo(); if (!vi) |