1 #ifndef MSP_GL_BLEND_H_
2 #define MSP_GL_BLEND_H_
4 #include <msp/strings/lexicalcast.h>
7 #include <msp/gl/extensions/ext_blend_minmax.h>
15 SUBTRACT = GL_FUNC_SUBTRACT,
16 REVERSE_SUBTRACT = GL_FUNC_REVERSE_SUBTRACT,
25 SRC_COLOR = GL_SRC_COLOR,
26 ONE_MINUS_SRC_COLOR = GL_ONE_MINUS_SRC_COLOR,
27 SRC_ALPHA = GL_SRC_ALPHA,
28 ONE_MINUS_SRC_ALPHA = GL_ONE_MINUS_SRC_ALPHA,
29 DST_COLOR = GL_DST_COLOR,
30 ONE_MINUS_DST_COLOR = GL_ONE_MINUS_DST_COLOR,
31 DST_ALPHA = GL_DST_ALPHA,
32 ONE_MINUS_DST_ALPHA = GL_ONE_MINUS_DST_ALPHA,
33 CONSTANT_COLOR = GL_CONSTANT_COLOR,
34 ONE_MINUS_CONSTANT_COLOR = GL_ONE_MINUS_CONSTANT_COLOR,
35 CONSTANT_ALPHA = GL_CONSTANT_ALPHA,
36 ONE_MINUS_CONSTANT_ALPHA = GL_ONE_MINUS_CONSTANT_ALPHA
40 Blends incoming fragments with those already in the framebuffer.
42 class Blend: public Bindable<Blend>
46 BlendFactor src_factor;
47 BlendFactor dst_factor;
51 Blend(BlendFactor, BlendFactor);
52 Blend(BlendEquation, BlendFactor, BlendFactor);
58 static const Blend &alpha();
59 static const Blend &additive();
60 static const Blend &additive_alpha();
63 void operator>>(const LexicalConverter &, BlendFactor &);
64 void operator<<(LexicalConverter &, BlendFactor);