From 3d76846994ec2a009d3392c4b67ae9f38c5322d2 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 2 Mar 2012 23:26:56 +0300 Subject: Bit improve opengl speed. --- src/openglgraphics.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src') 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(transX), - static_cast(transY), 0); + if (transX || transY) + { + glTranslatef(static_cast(transX), + static_cast(transY), 0); + } glScissor(clipArea.x, mTarget->h - clipArea.y - clipArea.height, clipArea.width, clipArea.height); -- cgit v1.2.3-70-g09d2