ONE_MINUS_CONSTANT_ALPHA
};
+enum ColorWriteMask
+{
+ WRITE_NONE = 0,
+ WRITE_RED = 1,
+ WRITE_GREEN = 2,
+ WRITE_BLUE = 4,
+ WRITE_ALPHA = 8,
+ WRITE_ALL = 15
+};
+
/**
Blends incoming fragments with those already in the framebuffer.
*/
BlendFactor src_factor;
BlendFactor dst_factor;
Color constant;
+ ColorWriteMask write_mask;
Blend();
Blend(BlendFactor, BlendFactor);
Blend(BlendEquation, BlendFactor, BlendFactor);
};
-unsigned get_gl_blend_equation(BlendEquation);
-unsigned get_gl_blend_factor(BlendFactor);
+
+inline ColorWriteMask operator|(ColorWriteMask m1, ColorWriteMask m2)
+{ return static_cast<ColorWriteMask>(static_cast<int>(m1)|static_cast<int>(m2)); }
void operator>>(const LexicalConverter &, BlendEquation &);
void operator<<(LexicalConverter &, BlendEquation);
void operator>>(const LexicalConverter &, BlendFactor &);
void operator<<(LexicalConverter &, BlendFactor);
+void operator>>(const LexicalConverter &, ColorWriteMask &);
+void operator<<(LexicalConverter &, ColorWriteMask);
+
} // namespace GL
} // namespace Msp
+#include "blend_backend.h"
+
#endif