1 #ifndef MSP_GL_BLEND_H_
2 #define MSP_GL_BLEND_H_
4 #include <msp/datafile/objectloader.h>
5 #include <msp/strings/lexicalcast.h>
33 ONE_MINUS_CONSTANT_COLOR,
35 ONE_MINUS_CONSTANT_ALPHA
39 Blends incoming fragments with those already in the framebuffer.
43 class Loader: public DataFile::ObjectLoader<Blend>
49 void constant(float, float, float, float);
50 void equation(BlendEquation);
51 void factors(BlendFactor, BlendFactor);
55 BlendEquation equation;
56 BlendFactor src_factor;
57 BlendFactor dst_factor;
61 Blend(BlendFactor, BlendFactor);
62 Blend(BlendEquation, BlendFactor, BlendFactor);
65 unsigned get_gl_blend_equation(BlendEquation);
66 unsigned get_gl_blend_factor(BlendFactor);
68 void operator>>(const LexicalConverter &, BlendEquation &);
69 void operator<<(LexicalConverter &, BlendEquation);
71 void operator>>(const LexicalConverter &, BlendFactor &);
72 void operator<<(LexicalConverter &, BlendFactor);