summaryrefslogtreecommitdiff
path: root/src/graphics.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-06-10 16:54:18 +0300
committerAndrei Karas <akaras@inbox.ru>2012-06-10 17:25:07 +0300
commit3a28edfb7ac991ad70a7baf76f48218d9db89bcb (patch)
tree918e56537dd2f7c2ce94e97a297a83a55d6f6ea6 /src/graphics.cpp
parentf199b9ba7da47cb6f9aa95f843c0628621899aa9 (diff)
downloadplus-3a28edfb7ac991ad70a7baf76f48218d9db89bcb.tar.gz
plus-3a28edfb7ac991ad70a7baf76f48218d9db89bcb.tar.bz2
plus-3a28edfb7ac991ad70a7baf76f48218d9db89bcb.tar.xz
plus-3a28edfb7ac991ad70a7baf76f48218d9db89bcb.zip
Split ImageHelper to ImageHelper, SDLImageHelper, OpenGLImageHelper.
Diffstat (limited to 'src/graphics.cpp')
-rw-r--r--src/graphics.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/graphics.cpp b/src/graphics.cpp
index 02567b5f2..a082c5e4b 100644
--- a/src/graphics.cpp
+++ b/src/graphics.cpp
@@ -31,6 +31,7 @@
#include "resources/image.h"
#include "resources/imagehelper.h"
+#include "resources/openglimagehelper.h"
#include "utils/stringutils.h"
#include <guichan/sdl/sdlpixel.hpp>
@@ -179,24 +180,24 @@ bool Graphics::setOpenGLMode()
GLint texSize;
bool rectTex = graphicsManager.supportExtension(
"GL_ARB_texture_rectangle");
- if (rectTex && ImageHelper::getInternalTextureType() == 4
+ if (rectTex && OpenGLImageHelper::getInternalTextureType() == 4
&& config.getBoolValue("rectangulartextures"))
{
logger->log1("using GL_ARB_texture_rectangle");
- ImageHelper::mTextureType = GL_TEXTURE_RECTANGLE_ARB;
+ OpenGLImageHelper::mTextureType = GL_TEXTURE_RECTANGLE_ARB;
glEnable(GL_TEXTURE_RECTANGLE_ARB);
glGetIntegerv(GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB, &texSize);
- ImageHelper::mTextureSize = texSize;
+ OpenGLImageHelper::mTextureSize = texSize;
logger->log("OpenGL texture size: %d pixels (rectangle textures)",
- ImageHelper::mTextureSize);
+ OpenGLImageHelper::mTextureSize);
}
else
{
- ImageHelper::mTextureType = GL_TEXTURE_2D;
+ OpenGLImageHelper::mTextureType = GL_TEXTURE_2D;
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &texSize);
- ImageHelper::mTextureSize = texSize;
+ OpenGLImageHelper::mTextureSize = texSize;
logger->log("OpenGL texture size: %d pixels",
- ImageHelper::mTextureSize);
+ OpenGLImageHelper::mTextureSize);
}
return videoInfo();
#else
@@ -284,7 +285,7 @@ bool Graphics::videoInfo()
mDoubleBuffer = ((mTarget->flags & SDL_DOUBLEBUF) == SDL_DOUBLEBUF);
logger->log("Double buffer mode: %s", mDoubleBuffer ? "yes" : "no");
- ImageHelper::dumpSurfaceFormat(mTarget);
+ imageHelper->dumpSurfaceFormat(mTarget);
const SDL_VideoInfo *vi = SDL_GetVideoInfo();
if (!vi)