From: Mikko Rasa Date: Tue, 6 Dec 2016 21:33:17 +0000 (+0200) Subject: Add some more premade blend modes X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=e69287d99126a20326d713c9a44360f15c94d137;p=libs%2Fgl.git Add some more premade blend modes --- diff --git a/source/blend.cpp b/source/blend.cpp index 184d5ad5..df4043e2 100644 --- a/source/blend.cpp +++ b/source/blend.cpp @@ -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 diff --git a/source/blend.h b/source/blend.h index 1ba43ceb..41567c53 100644 --- a/source/blend.h +++ b/source/blend.h @@ -55,6 +55,8 @@ public: static void unbind(); static const Blend &alpha(); + static const Blend &additive(); + static const Blend &additive_alpha(); }; } // namespace GL