diff options
Diffstat (limited to 'src/opengl1graphics.cpp')
-rw-r--r-- | src/opengl1graphics.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/opengl1graphics.cpp b/src/opengl1graphics.cpp index dbd983fb5..2bb6e06a2 100644 --- a/src/opengl1graphics.cpp +++ b/src/opengl1graphics.cpp @@ -30,6 +30,7 @@ #include "logger.h" #include "resources/image.h" +#include "resources/imagehelper.h" #include <SDL.h> @@ -66,7 +67,7 @@ static inline void drawQuad(const Image *image, int srcX, int srcY, int dstX, int dstY, int width, int height) { - if (image->mTextureType == GL_TEXTURE_2D) + if (ImageHelper::mTextureType == GL_TEXTURE_2D) { // Find OpenGL normalized texture coordinates. float texX1 = static_cast<float>(srcX) @@ -104,7 +105,7 @@ static inline void drawRescaledQuad(Image *image, int srcX, int srcY, int dstX, int dstY, int width, int height, int desiredWidth, int desiredHeight) { - if (image->mTextureType == GL_TEXTURE_2D) + if (ImageHelper::mTextureType == GL_TEXTURE_2D) { // Find OpenGL normalized texture coordinates. float texX1 = static_cast<float>(srcX) @@ -152,7 +153,7 @@ bool OpenGL1Graphics::drawImage(const Image *image, int srcX, int srcY, if (!useColor) glColor4f(1.0f, 1.0f, 1.0f, image->mAlpha); - bindTexture(Image::mTextureType, image->mGLImage); + bindTexture(ImageHelper::mTextureType, image->mGLImage); setTexturingAndBlending(true); @@ -212,7 +213,7 @@ bool OpenGL1Graphics::drawRescaledImage(Image *image, int srcX, int srcY, if (!useColor) glColor4f(1.0f, 1.0f, 1.0f, image->mAlpha); - bindTexture(Image::mTextureType, image->mGLImage); + bindTexture(ImageHelper::mTextureType, image->mGLImage); setTexturingAndBlending(true); @@ -266,7 +267,7 @@ void OpenGL1Graphics::drawImagePattern(const Image *image, int x, int y, glColor4f(1.0f, 1.0f, 1.0f, image->mAlpha); - bindTexture(Image::mTextureType, image->mGLImage); + bindTexture(ImageHelper::mTextureType, image->mGLImage); setTexturingAndBlending(true); @@ -312,7 +313,7 @@ void OpenGL1Graphics::drawRescaledImagePattern(Image *image, int x, int y, glColor4f(1.0f, 1.0f, 1.0f, image->mAlpha); - bindTexture(Image::mTextureType, image->mGLImage); + bindTexture(ImageHelper::mTextureType, image->mGLImage); setTexturingAndBlending(true); @@ -628,7 +629,7 @@ void OpenGL1Graphics::setTexturingAndBlending(bool enable) { if (!mTexture) { - glEnable(Image::mTextureType); + glEnable(ImageHelper::mTextureType); mTexture = true; } @@ -654,7 +655,7 @@ void OpenGL1Graphics::setTexturingAndBlending(bool enable) if (mTexture) { - glDisable(Image::mTextureType); + glDisable(ImageHelper::mTextureType); mTexture = false; } } |