Browse Source

Fixed a GL error on startup when OpenGL ES is used.

--HG--
branch : minor
Alex Szpakowski 10 years ago
parent
commit
e137c9327b
1 changed files with 6 additions and 4 deletions
  1. 6 4
      src/modules/graphics/opengl/Graphics.cpp

+ 6 - 4
src/modules/graphics/opengl/Graphics.cpp

@@ -236,18 +236,20 @@ bool Graphics::setMode(int width, int height, bool &sRGB)
 
 
 	setViewportSize(width, height);
 	setViewportSize(width, height);
 
 
-	// Make sure antialiasing works when set elsewhere
-	glEnable(GL_MULTISAMPLE);
-
 	// Enable blending
 	// Enable blending
 	glEnable(GL_BLEND);
 	glEnable(GL_BLEND);
 
 
 	// Auto-generated mipmaps should be the best quality possible
 	// Auto-generated mipmaps should be the best quality possible
 	glHint(GL_GENERATE_MIPMAP_HINT, GL_NICEST);
 	glHint(GL_GENERATE_MIPMAP_HINT, GL_NICEST);
 
 
-	// Enable textures
 	if (!GLAD_ES_VERSION_2_0)
 	if (!GLAD_ES_VERSION_2_0)
+	{
+		// Make sure antialiasing works when set elsewhere
+		glEnable(GL_MULTISAMPLE);
+
+		// Enable texturing
 		glEnable(GL_TEXTURE_2D);
 		glEnable(GL_TEXTURE_2D);
+	}
 
 
 	gl.setTextureUnit(0);
 	gl.setTextureUnit(0);