summaryrefslogtreecommitdiff
path: root/src/openglgraphics.cpp
diff options
context:
space:
mode:
authorGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-08-26 20:35:48 +0000
committerGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-08-26 20:35:48 +0000
commit076e82ac5ed30086821aa0d27e9d725e794b928a (patch)
tree31ae6c854c82ed789931f5ebd998e3c2b9aea17c /src/openglgraphics.cpp
parentc1caa4d90e00cd248c05c43ace035c62ab470354 (diff)
downloadmana-client-076e82ac5ed30086821aa0d27e9d725e794b928a.tar.gz
mana-client-076e82ac5ed30086821aa0d27e9d725e794b928a.tar.bz2
mana-client-076e82ac5ed30086821aa0d27e9d725e794b928a.tar.xz
mana-client-076e82ac5ed30086821aa0d27e9d725e794b928a.zip
Fixed fonts not being recolored by adding an explicit parameter to require it.
Diffstat (limited to 'src/openglgraphics.cpp')
-rw-r--r--src/openglgraphics.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/openglgraphics.cpp b/src/openglgraphics.cpp
index b1e6ef81..509107d5 100644
--- a/src/openglgraphics.cpp
+++ b/src/openglgraphics.cpp
@@ -105,12 +105,16 @@ bool OpenGLGraphics::setVideoMode(int w, int h, int bpp, bool fs, bool hwaccel)
}
bool OpenGLGraphics::drawImage(Image *image, int srcX, int srcY,
- int dstX, int dstY, int width, int height)
+ int dstX, int dstY, int width, int height, bool useColor)
{
srcX += image->mBounds.x;
srcY += image->mBounds.y;
- glColor4f(1.0f, 1.0f, 1.0f, image->mAlpha);
+ if (!useColor)
+ {
+ glColor4f(1.0f, 1.0f, 1.0f, image->mAlpha);
+ }
+
glBindTexture(Image::mTextureType, image->mGLImage);
setTexturingAndBlending(true);
@@ -148,7 +152,11 @@ bool OpenGLGraphics::drawImage(Image *image, int srcX, int srcY,
}
glEnd();
- glColor4ub(mColor.r, mColor.g, mColor.b, mColor.a);
+
+ if (!useColor)
+ {
+ glColor4ub(mColor.r, mColor.g, mColor.b, mColor.a);
+ }
return true;
}