From 076e82ac5ed30086821aa0d27e9d725e794b928a Mon Sep 17 00:00:00 2001 From: Guillaume Melquiond Date: Sun, 26 Aug 2007 20:35:48 +0000 Subject: Fixed fonts not being recolored by adding an explicit parameter to require it. --- src/openglgraphics.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/openglgraphics.cpp') 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; } -- cgit v1.2.3-60-g2f50