From e137c9327b3ae2d9eb3da48d35179c08356949cf Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Wed, 18 Feb 2015 19:01:19 -0400 Subject: [PATCH] Fixed a GL error on startup when OpenGL ES is used. --HG-- branch : minor --- src/modules/graphics/opengl/Graphics.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/modules/graphics/opengl/Graphics.cpp b/src/modules/graphics/opengl/Graphics.cpp index 0172ce4c6..02095f001 100644 --- a/src/modules/graphics/opengl/Graphics.cpp +++ b/src/modules/graphics/opengl/Graphics.cpp @@ -236,18 +236,20 @@ bool Graphics::setMode(int width, int height, bool &sRGB) setViewportSize(width, height); - // Make sure antialiasing works when set elsewhere - glEnable(GL_MULTISAMPLE); - // Enable blending glEnable(GL_BLEND); // Auto-generated mipmaps should be the best quality possible glHint(GL_GENERATE_MIPMAP_HINT, GL_NICEST); - // Enable textures if (!GLAD_ES_VERSION_2_0) + { + // Make sure antialiasing works when set elsewhere + glEnable(GL_MULTISAMPLE); + + // Enable texturing glEnable(GL_TEXTURE_2D); + } gl.setTextureUnit(0);