diff --git a/src/SFML/Graphics/Drawable.cpp b/src/SFML/Graphics/Drawable.cpp index 41c5206ee..ecf571829 100644 --- a/src/SFML/Graphics/Drawable.cpp +++ b/src/SFML/Graphics/Drawable.cpp @@ -46,8 +46,6 @@ myBlendMode (Blend::Alpha), myNeedUpdate (true), myInvNeedUpdate(true) { - // Make sure that GLEW is initialized (for glBlendFuncSeparate) - EnsureGlewInit(); } @@ -378,22 +376,14 @@ void Drawable::Draw(RenderTarget& target) const { GLCheck(glEnable(GL_BLEND)); - // We have to use glBlendFuncSeparate so that the resulting alpha is - // not alphaČ, which is incorrect and would cause problems when rendering - // alpha pixels to a RenderImage that would be in turn rendered to another render target + // @todo the resulting alpha may not be correct, which matters when target is a RenderImage. + // find a fix for this (glBlendFuncSeparate -- but not supported by every graphics card) switch (myBlendMode) { - case Blend::Alpha : - GLCheck(glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA)); - break; - case Blend::Add : - GLCheck(glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE, GL_ONE, GL_ONE_MINUS_SRC_ALPHA)); - break; - case Blend::Multiply : - GLCheck(glBlendFuncSeparate(GL_DST_COLOR, GL_ZERO, GL_ONE, GL_ONE_MINUS_SRC_ALPHA)); - break; - default : - break; + case Blend::Alpha : GLCheck(glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)); break; + case Blend::Add : GLCheck(glBlendFunc(GL_SRC_ALPHA, GL_ONE)); break; + case Blend::Multiply : GLCheck(glBlendFunc(GL_DST_COLOR, GL_ZERO)); break; + default : break; } }