summaryrefslogtreecommitdiff
path: root/src/openglgraphics.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-04-09 18:49:05 +0300
committerAndrei Karas <akaras@inbox.ru>2011-04-09 18:49:05 +0300
commitb9d66c41246fef56e41f600b5523a5ff1a29a1c8 (patch)
tree3e6e546d393975b83ae951561cb6b05d920ef048 /src/openglgraphics.cpp
parent8bed92098b94ebe14dfd9d622585fbfc150a8757 (diff)
downloadmv-b9d66c41246fef56e41f600b5523a5ff1a29a1c8.tar.gz
mv-b9d66c41246fef56e41f600b5523a5ff1a29a1c8.tar.bz2
mv-b9d66c41246fef56e41f600b5523a5ff1a29a1c8.tar.xz
mv-b9d66c41246fef56e41f600b5523a5ff1a29a1c8.zip
Improve map loading speed.
Diffstat (limited to 'src/openglgraphics.cpp')
-rw-r--r--src/openglgraphics.cpp12
1 files changed, 6 insertions, 6 deletions
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<float>(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<float>(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<float>(srcX) / tw;
float texY1 = static_cast<float>(srcY) / th;
@@ -515,7 +515,7 @@ void OpenGLGraphics::drawRescaledImagePattern(Image *image, int x, int y,
float texY1 = static_cast<float>(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<int>::iterator ivp;
// Draw a set of textured rectangles
- if (image->getTextureType() == GL_TEXTURE_2D)
+ if (image->mTextureType == GL_TEXTURE_2D)
{
std::vector<GLfloat*> &floatTexPool = ogl->getFloatTexPool();
std::vector<GLfloat*>::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<float>(srcX) / tw;
float texY1 = static_cast<float>(srcY) / th;