From b9d66c41246fef56e41f600b5523a5ff1a29a1c8 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 9 Apr 2011 18:49:05 +0300 Subject: Improve map loading speed. --- src/openglgraphics.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/openglgraphics.cpp') diff --git a/src/openglgraphics.cpp b/src/openglgraphics.cpp index aa3dc6667..f65553a15 100644 --- a/src/openglgraphics.cpp +++ b/src/openglgraphics.cpp @@ -130,7 +130,7 @@ static inline void drawQuad(Image *image, int srcX, int srcY, int dstX, int dstY, int width, int height) { - if (image->getTextureType() == GL_TEXTURE_2D) + if (image->mTextureType == GL_TEXTURE_2D) { // Find OpenGL normalized texture coordinates. const float texX1 = static_cast(srcX) / @@ -192,7 +192,7 @@ static inline void drawRescaledQuad(Image *image, int width, int height, int desiredWidth, int desiredHeight) { - if (image->getTextureType() == GL_TEXTURE_2D) + if (image->mTextureType == GL_TEXTURE_2D) { // Find OpenGL normalized texture coordinates. const float texX1 = static_cast(srcX) / @@ -379,7 +379,7 @@ void OpenGLGraphics::drawImagePattern(Image *image, int x, int y, int w, int h) unsigned int vp = 0; const unsigned int vLimit = vertexBufSize * 4; // Draw a set of textured rectangles - if (image->getTextureType() == GL_TEXTURE_2D) + if (image->mTextureType == GL_TEXTURE_2D) { float texX1 = static_cast(srcX) / tw; float texY1 = static_cast(srcY) / th; @@ -515,7 +515,7 @@ void OpenGLGraphics::drawRescaledImagePattern(Image *image, int x, int y, float texY1 = static_cast(srcY) / th; // Draw a set of textured rectangles - if (image->getTextureType() == GL_TEXTURE_2D) + if (image->mTextureType == GL_TEXTURE_2D) { for (int py = 0; py < h; py += ih) { @@ -634,7 +634,7 @@ void OpenGLGraphics::drawImagePattern2(GraphicsVertexes *vert, Image *image) std::vector::iterator ivp; // Draw a set of textured rectangles - if (image->getTextureType() == GL_TEXTURE_2D) + if (image->mTextureType == GL_TEXTURE_2D) { std::vector &floatTexPool = ogl->getFloatTexPool(); std::vector::iterator ft; @@ -701,7 +701,7 @@ void OpenGLGraphics::calcImagePattern(GraphicsVertexes* vert, Image *image, ogl->init(); // Draw a set of textured rectangles - if (image->getTextureType() == GL_TEXTURE_2D) + if (image->mTextureType == GL_TEXTURE_2D) { float texX1 = static_cast(srcX) / tw; float texY1 = static_cast(srcY) / th; -- cgit v1.2.3-70-g09d2