mirror of
https://github.com/love2d/love.git
synced 2026-08-20 04:30:09 +02:00
Freeze, Allman police!
This commit is contained in:
@@ -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.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user