Merge from root

This commit is contained in:
Alexander Szpakowski
2013-01-17 20:29:48 -04:00
7 changed files with 32 additions and 15 deletions
+4
View File
@@ -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.
}
+1 -1
View File
@@ -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()