From 3a28edfb7ac991ad70a7baf76f48218d9db89bcb Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 10 Jun 2012 16:54:18 +0300 Subject: Split ImageHelper to ImageHelper, SDLImageHelper, OpenGLImageHelper. --- src/graphics.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'src/graphics.cpp') 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 @@ -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) -- cgit v1.2.3-70-g09d2