diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-04-22 23:16:10 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-04-22 23:16:10 +0300 |
commit | f5536169ce6143ae39bcfd8b353e6495dac76a72 (patch) | |
tree | 650a42f303452291e4201728b5b33c1f4fb3339d /src/openglgraphics.cpp | |
parent | fbcbf7e3f54443477aa6098bd41f825167dd1e76 (diff) | |
download | ManaVerse-f5536169ce6143ae39bcfd8b353e6495dac76a72.tar.gz ManaVerse-f5536169ce6143ae39bcfd8b353e6495dac76a72.tar.bz2 ManaVerse-f5536169ce6143ae39bcfd8b353e6495dac76a72.tar.xz ManaVerse-f5536169ce6143ae39bcfd8b353e6495dac76a72.zip |
Small optimisation in opengl gui drawing.
Diffstat (limited to 'src/openglgraphics.cpp')
-rw-r--r-- | src/openglgraphics.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/openglgraphics.cpp b/src/openglgraphics.cpp index f65553a15..0cfda2445 100644 --- a/src/openglgraphics.cpp +++ b/src/openglgraphics.cpp @@ -628,21 +628,21 @@ void OpenGLGraphics::drawImagePattern2(GraphicsVertexes *vert, Image *image) bindTexture(Image::mTextureType, image->mGLImage); setTexturingAndBlending(true); - std::vector<GLint*> &intVertPool = ogl->getIntVertPool(); + std::vector<GLint*> *intVertPool = ogl->getIntVertPool(); std::vector<GLint*>::iterator iv; - std::vector<int> &vp = ogl->getVp(); + std::vector<int> *vp = ogl->getVp(); std::vector<int>::iterator ivp; // Draw a set of textured rectangles if (image->mTextureType == GL_TEXTURE_2D) { - std::vector<GLfloat*> &floatTexPool = ogl->getFloatTexPool(); + std::vector<GLfloat*> *floatTexPool = ogl->getFloatTexPool(); std::vector<GLfloat*>::iterator ft; - for (iv = intVertPool.begin(), ft = floatTexPool.begin(), - ivp = vp.begin(); - iv != intVertPool.end(), ft != floatTexPool.end(), - ivp != vp.end(); + for (iv = intVertPool->begin(), ft = floatTexPool->begin(), + ivp = vp->begin(); + iv != intVertPool->end(), ft != floatTexPool->end(), + ivp != vp->end(); ++ iv, ++ ft, ++ ivp) { drawQuadArrayfi(*iv, *ft, *ivp); @@ -650,13 +650,13 @@ void OpenGLGraphics::drawImagePattern2(GraphicsVertexes *vert, Image *image) } else { - std::vector<GLint*> &intTexPool = ogl->getIntTexPool(); + std::vector<GLint*> *intTexPool = ogl->getIntTexPool(); std::vector<GLint*>::iterator it; - for (iv = intVertPool.begin(), it = intTexPool.begin(), - ivp = vp.begin(); - iv != intVertPool.end(), it != intTexPool.end(), - ivp != vp.end(); + for (iv = intVertPool->begin(), it = intTexPool->begin(), + ivp = vp->begin(); + iv != intVertPool->end(), it != intTexPool->end(), + ivp != vp->end(); ++ iv, ++ it, ++ ivp) { drawQuadArrayii(*iv, *it, *ivp); |