mirror of
https://github.com/love2d/love.git
synced 2026-08-18 03:34:23 +02:00
Merge from root
This commit is contained in:
@@ -553,6 +553,8 @@ void Graphics::setBlendMode(Graphics::BlendMode mode)
|
||||
glBlendFunc(GL_DST_COLOR, GL_ZERO);
|
||||
else if (mode == BLEND_PREMULTIPLIED)
|
||||
glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
|
||||
else if (mode == BLEND_NONE)
|
||||
glBlendFunc(GL_ONE, GL_ZERO);
|
||||
else // mode == BLEND_ADDITIVE || mode == BLEND_SUBTRACTIVE
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE);
|
||||
}
|
||||
@@ -588,6 +590,8 @@ Graphics::BlendMode Graphics::getBlendMode()
|
||||
return BLEND_MULTIPLICATIVE;
|
||||
else if (src == GL_ONE && dst == GL_ONE_MINUS_SRC_ALPHA) // && equation == GL_FUNC_ADD
|
||||
return BLEND_PREMULTIPLIED;
|
||||
else if (src == GL_ONE && dst == GL_ZERO)
|
||||
return BLEND_NONE;
|
||||
|
||||
return BLEND_MAX_ENUM; // Should never be reached.
|
||||
}
|
||||
|
||||
@@ -357,7 +357,7 @@ void Image::drawv(const Matrix &t, const vertex *v) const
|
||||
|
||||
bool Image::hasNpot()
|
||||
{
|
||||
return GLEE_ARB_texture_non_power_of_two != 0;
|
||||
return GLEE_VERSION_2_0 || GLEE_ARB_texture_non_power_of_two;
|
||||
}
|
||||
|
||||
bool Image::hasMipmapSupport()
|
||||
|
||||
Reference in New Issue
Block a user