Freeze, Allman police!

This commit is contained in:
Bill Meltsner
2012-03-03 20:41:42 -05:00
parent fc6a9df304
commit b956813e8e
+13 -11
View File
@@ -511,22 +511,24 @@ namespace opengl
{ {
glAlphaFunc(GL_GEQUAL, 0); glAlphaFunc(GL_GEQUAL, 0);
if (GLEE_VERSION_1_4 || GLEE_ARB_imaging) { if (GLEE_VERSION_1_4 || GLEE_ARB_imaging)
if (mode == BLEND_SUBTRACTIVE) { {
if (mode == BLEND_SUBTRACTIVE)
glBlendEquation(GL_FUNC_REVERSE_SUBTRACT); glBlendEquation(GL_FUNC_REVERSE_SUBTRACT);
} else { else
glBlendEquation(GL_FUNC_ADD); glBlendEquation(GL_FUNC_ADD);
} }
} else if (GLEE_EXT_blend_minmax && GLEE_EXT_blend_subtract) { else if (GLEE_EXT_blend_minmax && GLEE_EXT_blend_subtract)
if (mode == BLEND_SUBTRACTIVE) { {
if (mode == BLEND_SUBTRACTIVE)
glBlendEquationEXT(GL_FUNC_REVERSE_SUBTRACT_EXT); glBlendEquationEXT(GL_FUNC_REVERSE_SUBTRACT_EXT);
} else { else
glBlendEquationEXT(GL_FUNC_ADD_EXT); glBlendEquationEXT(GL_FUNC_ADD_EXT);
} }
} else { else
if (mode == BLEND_SUBTRACTIVE) { {
if (mode == BLEND_SUBTRACTIVE)
throw Exception("This graphics card does not support the subtract blend mode!"); 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. // GL_FUNC_ADD is the default even without access to glBlendEquation, so that'll still work.
} }