From f5536169ce6143ae39bcfd8b353e6495dac76a72 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 22 Apr 2011 23:16:10 +0300 Subject: Small optimisation in opengl gui drawing. --- src/openglgraphics.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/openglgraphics.cpp') 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 &intVertPool = ogl->getIntVertPool(); + std::vector *intVertPool = ogl->getIntVertPool(); std::vector::iterator iv; - std::vector &vp = ogl->getVp(); + std::vector *vp = ogl->getVp(); std::vector::iterator ivp; // Draw a set of textured rectangles if (image->mTextureType == GL_TEXTURE_2D) { - std::vector &floatTexPool = ogl->getFloatTexPool(); + std::vector *floatTexPool = ogl->getFloatTexPool(); std::vector::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 &intTexPool = ogl->getIntTexPool(); + std::vector *intTexPool = ogl->getIntTexPool(); std::vector::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); -- cgit v1.2.3-60-g2f50