X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fblend.cpp;h=df4043e29fcfc228a557a7a5f54238d1f302f5e2;hb=e69287d99126a20326d713c9a44360f15c94d137;hp=cecd562dc1019f389e151049b94d4c01e55b2623;hpb=6afbace895a7bbcf216ab8e48280ea0303ab5892;p=libs%2Fgl.git diff --git a/source/blend.cpp b/source/blend.cpp index cecd562d..df4043e2 100644 --- a/source/blend.cpp +++ b/source/blend.cpp @@ -1,6 +1,6 @@ +#include +#include #include "blend.h" -#include "ext_blend_minmax.h" -#include "ext_blend_subtract.h" namespace Msp { namespace GL { @@ -33,7 +33,7 @@ void Blend::bind() const if(set_current(this)) { glEnable(GL_BLEND); - if(glBlendEquation) + if(EXT_blend_minmax) glBlendEquation(eq); glBlendFunc(src_factor, dst_factor); } @@ -51,5 +51,17 @@ const Blend &Blend::alpha() return blend; } +const Blend &Blend::additive() +{ + static Blend blend(ONE, ONE); + return blend; +} + +const Blend &Blend::additive_alpha() +{ + static Blend blend(SRC_ALPHA, ONE); + return blend; +} + } // namespace GL } // namespace Msp