5#include <smk/BlendMode.hpp>
11 GL_FUNC_ADD, GL_FUNC_ADD, GL_ONE, GL_ZERO, GL_ONE, GL_ZERO,
16 GL_FUNC_ADD, GL_FUNC_ADD, GL_SRC_ALPHA, GL_ONE, GL_ONE, GL_ONE,
21 GL_FUNC_REVERSE_SUBTRACT,
22 GL_FUNC_REVERSE_SUBTRACT,
31 GL_FUNC_ADD, GL_FUNC_ADD,
32 GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA,
33 GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA,
38 GL_FUNC_ADD, GL_FUNC_ADD, GL_DST_COLOR, GL_ZERO, GL_DST_ALPHA, GL_ZERO,
45 GL_ONE_MINUS_DST_COLOR,
47 GL_ONE_MINUS_SRC_ALPHA,
51bool BlendMode::operator==(
const BlendMode& o)
const {
52 return equation_rgb == o.equation_rgb &&
53 equation_alpha == o.equation_alpha &&
54 src_rgb == o.src_rgb &&
55 dst_rgb == o.dst_rgb &&
56 src_alpha == o.src_alpha &&
57 dst_alpha == o.dst_alpha;
60bool BlendMode::operator!=(
const BlendMode& o)
const {
61 return !operator==(o);
static const BlendMode Add
destination += source.
static const BlendMode Subtract
destination -= source.
static const BlendMode Multiply
destination *= source
static const BlendMode Replace
destination = source.
static const BlendMode Alpha
destination = source * source.a + destination * (1 - souce.a)
static const BlendMode Invert
destination = 1 - destination