summaryrefslogtreecommitdiff
path: root/src/openglgraphics.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-04-27 15:27:23 +0300
committerAndrei Karas <akaras@inbox.ru>2012-04-27 15:27:23 +0300
commit02d34fb8676682815300b9b4f410d632a5b338c0 (patch)
tree56789d10449398bfb8584b7c5a7f42b68f077c00 /src/openglgraphics.cpp
parent214663bd68adc2d86474ca98f4743a4cbd6cd575 (diff)
downloadmanaplus-02d34fb8676682815300b9b4f410d632a5b338c0.tar.gz
manaplus-02d34fb8676682815300b9b4f410d632a5b338c0.tar.bz2
manaplus-02d34fb8676682815300b9b4f410d632a5b338c0.tar.xz
manaplus-02d34fb8676682815300b9b4f410d632a5b338c0.zip
Add option to enable/disable rectangular textures.
Diffstat (limited to 'src/openglgraphics.cpp')
-rw-r--r--src/openglgraphics.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/openglgraphics.cpp b/src/openglgraphics.cpp
index 6e0bbf829..5d0410f33 100644
--- a/src/openglgraphics.cpp
+++ b/src/openglgraphics.cpp
@@ -155,20 +155,23 @@ bool OpenGLGraphics::setVideoMode(int w, int h, int bpp, bool fs,
GLint texSize;
bool rectTex = supportExtension("GL_ARB_texture_rectangle");
- if (rectTex && Image::getInternalTextureType() == 4)
+ if (rectTex && Image::getInternalTextureType() == 4
+ && config.getBoolValue("rectangulartextures"))
{
logger->log1("using GL_ARB_texture_rectangle");
Image::mTextureType = GL_TEXTURE_RECTANGLE_ARB;
glGetIntegerv(GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB, &texSize);
+ Image::mTextureSize = texSize;
+ logger->log("OpenGL texture size: %d pixels (rectangle textures)",
+ Image::mTextureSize);
}
else
{
Image::mTextureType = GL_TEXTURE_2D;
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &texSize);
+ Image::mTextureSize = texSize;
+ logger->log("OpenGL texture size: %d pixels", Image::mTextureSize);
}
- Image::mTextureSize = texSize;
- logger->log("OpenGL texture size: %d pixels%s", Image::mTextureSize,
- rectTex ? " (rectangle textures)" : "");
return true;
}