From 62a416d5585106c2ce8e2259036740e7ba2c70c7 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 9 Jul 2014 19:20:41 +0300 Subject: Improve initial OpenGL state. Moved shared code into separate method. --- src/render/normalopenglgraphics.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'src/render/normalopenglgraphics.cpp') diff --git a/src/render/normalopenglgraphics.cpp b/src/render/normalopenglgraphics.cpp index 43191d369..f32003d49 100644 --- a/src/render/normalopenglgraphics.cpp +++ b/src/render/normalopenglgraphics.cpp @@ -1222,16 +1222,10 @@ void NormalOpenGLGraphics::beginDraw() glMatrixMode(GL_MODELVIEW); glLoadIdentity(); - glEnable(GL_SCISSOR_TEST); - glDisable(GL_DITHER); + setOpenGLFlags(); glDisable(GL_LIGHTING); - glDisable(GL_DEPTH_TEST); glDisable(GL_FOG); - glDisable(GL_COLOR_LOGIC_OP); glDisable(GL_COLOR_MATERIAL); - glDisable(GL_STENCIL_TEST); - - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnableClientState(GL_VERTEX_ARRAY); glDisableClientState(GL_TEXTURE_COORD_ARRAY); @@ -1245,9 +1239,6 @@ void NormalOpenGLGraphics::beginDraw() glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST); glHint(GL_POINT_SMOOTH_HINT, GL_FASTEST); glHint(GL_POLYGON_SMOOTH_HINT, GL_FASTEST); -#ifndef __MINGW32__ - glHint(GL_TEXTURE_COMPRESSION_HINT, GL_FASTEST); -#endif #endif pushClipArea(Rect(0, 0, w, h)); -- cgit v1.2.3-60-g2f50