summaryrefslogtreecommitdiff
path: root/src/openglgraphics.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-03-02 23:26:56 +0300
committerAndrei Karas <akaras@inbox.ru>2012-03-02 23:26:56 +0300
commit3d76846994ec2a009d3392c4b67ae9f38c5322d2 (patch)
tree03d6e2a05765e2982990b12152de85c7dd3c0c89 /src/openglgraphics.cpp
parent033baf5710cc021acc93ff7dfce6eff6c2e26cd9 (diff)
downloadmanaverse-3d76846994ec2a009d3392c4b67ae9f38c5322d2.tar.gz
manaverse-3d76846994ec2a009d3392c4b67ae9f38c5322d2.tar.bz2
manaverse-3d76846994ec2a009d3392c4b67ae9f38c5322d2.tar.xz
manaverse-3d76846994ec2a009d3392c4b67ae9f38c5322d2.zip
Bit improve opengl speed.
Diffstat (limited to 'src/openglgraphics.cpp')
-rw-r--r--src/openglgraphics.cpp8
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);