]> git.tdb.fi Git - libs/gl.git/commitdiff
Add some more premade blend modes
authorMikko Rasa <tdb@tdb.fi>
Tue, 6 Dec 2016 21:33:17 +0000 (23:33 +0200)
committerMikko Rasa <tdb@tdb.fi>
Wed, 7 Dec 2016 00:28:32 +0000 (02:28 +0200)
source/blend.cpp
source/blend.h

index 184d5ad534f1aca6bcf441726b54e8c80af94a1b..df4043e29fcfc228a557a7a5f54238d1f302f5e2 100644 (file)
@@ -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
index 1ba43ceb272eba972430bc4fee94cd786bdcbce4..41567c5377266a741e112584ae373dbd0678a6c4 100644 (file)
@@ -55,6 +55,8 @@ public:
        static void unbind();
 
        static const Blend &alpha();
+       static const Blend &additive();
+       static const Blend &additive_alpha();
 };
 
 } // namespace GL