1 #ifndef MSP_GL_BLEND_H_
2 #define MSP_GL_BLEND_H_
4 #include <msp/datafile/objectloader.h>
5 #include <msp/strings/lexicalcast.h>
34 ONE_MINUS_CONSTANT_COLOR,
36 ONE_MINUS_CONSTANT_ALPHA
40 Blends incoming fragments with those already in the framebuffer.
44 class Loader: public DataFile::ObjectLoader<Blend>
50 void constant(float, float, float, float);
51 void equation(BlendEquation);
52 void factors(BlendFactor, BlendFactor);
56 BlendEquation equation;
57 BlendFactor src_factor;
58 BlendFactor dst_factor;
62 Blend(BlendFactor, BlendFactor);
63 Blend(BlendEquation, BlendFactor, BlendFactor);
66 GLenum get_gl_blend_equation(BlendEquation);
67 GLenum get_gl_blend_factor(BlendFactor);
69 void operator>>(const LexicalConverter &, BlendEquation &);
70 void operator<<(LexicalConverter &, BlendEquation);
72 void operator>>(const LexicalConverter &, BlendFactor &);
73 void operator<<(LexicalConverter &, BlendFactor);