Commits

Marc Lepage committed 2541c65 Draft

Fix blend mode.

  • Participants
  • Parent commits 49e300f
  • Branches gles

Comments (0)

Files changed (1)

File src/modules/graphics/opengl/Graphics.cpp

 			glBlendEquationEXT(GL_FUNC_ADD_EXT);
 	}
 	else
+#endif
 	{
 		if (mode == BLEND_SUBTRACTIVE)
 			throw Exception("This graphics card does not support the subtract blend mode!");
 		// GL_FUNC_ADD is the default even without access to glBlendEquation, so that'll still work.
 	}
-#endif
 
 	if (mode == BLEND_ALPHA)
 		glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
 #if !defined(HAVE_GLES)
 	glGetIntegerv(GL_BLEND_DST, &dst);
 	glGetIntegerv(GL_BLEND_SRC, &src);
+#else
+	// GLES2 has separate gets for RGB and ALPHA, but they are only ever set together
+	glGetIntegerv(GL_BLEND_DST_ALPHA, &dst);
+	glGetIntegerv(GL_BLEND_SRC_ALPHA, &src);
 #endif
 	glGetIntegerv(GL_BLEND_EQUATION, &equation);