diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-03-02 23:26:56 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-03-02 23:26:56 +0300 |
commit | 3d76846994ec2a009d3392c4b67ae9f38c5322d2 (patch) | |
tree | 03d6e2a05765e2982990b12152de85c7dd3c0c89 /src | |
parent | 033baf5710cc021acc93ff7dfce6eff6c2e26cd9 (diff) | |
download | mv-3d76846994ec2a009d3392c4b67ae9f38c5322d2.tar.gz mv-3d76846994ec2a009d3392c4b67ae9f38c5322d2.tar.bz2 mv-3d76846994ec2a009d3392c4b67ae9f38c5322d2.tar.xz mv-3d76846994ec2a009d3392c4b67ae9f38c5322d2.zip |
Bit improve opengl speed.
Diffstat (limited to 'src')
-rw-r--r-- | src/openglgraphics.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/openglgraphics.cpp b/src/openglgraphics.cpp index 684716aac..551545dd3 100644 --- a/src/openglgraphics.cpp +++ b/src/openglgraphics.cpp @@ -1014,7 +1014,6 @@ void OpenGLGraphics::_beginDraw() glLoadIdentity(); glEnable(GL_SCISSOR_TEST); - glEnableClientState(GL_VERTEX_ARRAY); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); @@ -1174,8 +1173,11 @@ bool OpenGLGraphics::pushClipArea(gcn::Rectangle area) transY += clipArea.yOffset; glPushMatrix(); - glTranslatef(static_cast<GLfloat>(transX), - static_cast<GLfloat>(transY), 0); + if (transX || transY) + { + glTranslatef(static_cast<GLfloat>(transX), + static_cast<GLfloat>(transY), 0); + } glScissor(clipArea.x, mTarget->h - clipArea.y - clipArea.height, clipArea.width, clipArea.height); |