diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-07-09 19:20:41 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-07-09 20:25:57 +0300 |
commit | 62a416d5585106c2ce8e2259036740e7ba2c70c7 (patch) | |
tree | 4036eb451cba39c6353658353cc80d42a6b9f044 /src/render/modernopenglgraphics.cpp | |
parent | 6e052536a2dfb7f877a356477bc86c904aae1e71 (diff) | |
download | plus-62a416d5585106c2ce8e2259036740e7ba2c70c7.tar.gz plus-62a416d5585106c2ce8e2259036740e7ba2c70c7.tar.bz2 plus-62a416d5585106c2ce8e2259036740e7ba2c70c7.tar.xz plus-62a416d5585106c2ce8e2259036740e7ba2c70c7.zip |
Improve initial OpenGL state.
Moved shared code into separate method.
Diffstat (limited to 'src/render/modernopenglgraphics.cpp')
-rw-r--r-- | src/render/modernopenglgraphics.cpp | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/src/render/modernopenglgraphics.cpp b/src/render/modernopenglgraphics.cpp index 231f83a67..e8d0756cf 100644 --- a/src/render/modernopenglgraphics.cpp +++ b/src/render/modernopenglgraphics.cpp @@ -840,22 +840,9 @@ void ModernOpenGLGraphics::updateScreen() void ModernOpenGLGraphics::beginDraw() { - glEnable(GL_SCISSOR_TEST); - glDisable(GL_DITHER); - glDisable(GL_DEPTH_TEST); - glDisable(GL_COLOR_LOGIC_OP); - glDisable(GL_STENCIL_TEST); - glDisable(GL_LINE_SMOOTH); - glDisable(GL_POLYGON_SMOOTH); - - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - -#ifndef ANDROID -#ifndef __MINGW32__ - glHint(GL_TEXTURE_COMPRESSION_HINT, GL_FASTEST); -#endif -#endif - + setOpenGLFlags(); + glDisable(GL_VERTEX_PROGRAM_POINT_SIZE_ARB); + glHint(GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB, GL_FASTEST); pushClipArea(Rect(0, 0, mRect.w, mRect.h)); } |