From e69287d99126a20326d713c9a44360f15c94d137 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Tue, 6 Dec 2016 23:33:17 +0200 Subject: [PATCH] Add some more premade blend modes --- source/blend.cpp | 12 ++++++++++++ source/blend.h | 2 ++ 2 files changed, 14 insertions(+) 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 -- 2.45.2