]> git.tdb.fi Git - libs/gl.git/blobdiff - source/blend.h
Drop Id tags and copyright notices from files
[libs/gl.git] / source / blend.h
index 37fc56e17a390132241d0a4761b0c9a6d2692406..dd3f9404d72a2831c3442a994a64b90bbaff6812 100644 (file)
@@ -1,13 +1,7 @@
-/* $Id$
-
-This file is part of libmspgl
-Copyright © 2008  Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
 #ifndef MSP_GL_BLEND_H_
 #define MSP_GL_BLEND_H_
 
+#include "bindable.h"
 #include "gl.h"
 
 namespace Msp {
@@ -40,8 +34,27 @@ enum BlendFactor
        ONE_MINUS_CONSTANT_ALPHA = GL_ONE_MINUS_CONSTANT_ALPHA
 };
 
-void blend_equation(BlendEquation eq);
-void blend_func(BlendFactor src, BlendFactor dst);
+/**
+Blends incoming fragments with those already in the framebuffer.
+*/
+class Blend: public Bindable<Blend>
+{
+private:
+       BlendEquation eq;
+       BlendFactor src_factor;
+       BlendFactor dst_factor;
+
+public:
+       Blend();
+       Blend(BlendFactor, BlendFactor);
+       Blend(BlendEquation, BlendFactor, BlendFactor);
+
+       void bind() const;
+
+       static void unbind();
+
+       static const Blend &alpha();
+};
 
 } // namespace GL
 } // namespace Msp