summaryrefslogtreecommitdiff
path: root/src/openglgraphics.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-05-06 01:17:00 +0300
committerAndrei Karas <akaras@inbox.ru>2012-05-06 01:17:00 +0300
commitbcd99fe009fb7d8b14ca4a711befa7f156b29ae7 (patch)
treeb9136debb29ae3fe3dbdcb595a5d65092e0bf613 /src/openglgraphics.cpp
parent6d8828b47e291c0e85645adb60c8969a3f8facf4 (diff)
downloadmanaverse-bcd99fe009fb7d8b14ca4a711befa7f156b29ae7.tar.gz
manaverse-bcd99fe009fb7d8b14ca4a711befa7f156b29ae7.tar.bz2
manaverse-bcd99fe009fb7d8b14ca4a711befa7f156b29ae7.tar.xz
manaverse-bcd99fe009fb7d8b14ca4a711befa7f156b29ae7.zip
Add const to images in drawing functions.
Diffstat (limited to 'src/openglgraphics.cpp')
-rw-r--r--src/openglgraphics.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/openglgraphics.cpp b/src/openglgraphics.cpp
index bf7967254..02e14b77e 100644
--- a/src/openglgraphics.cpp
+++ b/src/openglgraphics.cpp
@@ -81,7 +81,7 @@ bool OpenGLGraphics::setVideoMode(int w, int h, int bpp, bool fs,
return setOpenGLMode();
}
-static inline void drawQuad(Image *image,
+static inline void drawQuad(const Image *image,
int srcX, int srcY, int dstX, int dstY,
int width, int height)
{
@@ -205,7 +205,7 @@ static inline void drawRescaledQuad(Image *image,
}
-bool OpenGLGraphics::drawImage(Image *image, int srcX, int srcY,
+bool OpenGLGraphics::drawImage(const Image *image, int srcX, int srcY,
int dstX, int dstY,
int width, int height, bool useColor)
{
@@ -308,7 +308,8 @@ bool OpenGLGraphics::drawRescaledImage(Image *image, int srcX, int srcY,
return true;
}
-void OpenGLGraphics::drawImagePattern(Image *image, int x, int y, int w, int h)
+void OpenGLGraphics::drawImagePattern(const Image *image, int x, int y,
+ int w, int h)
{
if (!image)
return;
@@ -592,7 +593,8 @@ void OpenGLGraphics::drawRescaledImagePattern(Image *image,
static_cast<GLubyte>(mColor.a));
}
-void OpenGLGraphics::drawImagePattern2(GraphicsVertexes *vert, Image *image)
+void OpenGLGraphics::drawImagePattern2(GraphicsVertexes *vert,
+ const Image *image)
{
if (!image)
return;