src/RenderState.hpp in gosu-1.1.1.1 vs src/RenderState.hpp in gosu-1.2.0

- old
+ new

@@ -8,14 +8,14 @@ struct Gosu::RenderState { std::shared_ptr<Texture> texture; const Transform* transform; ClipRect clip_rect; - AlphaMode mode; + BlendMode mode; RenderState() - : transform(0), mode(AM_DEFAULT) + : transform(0), mode(BM_DEFAULT) { clip_rect.width = NO_CLIPPING; } bool operator==(const RenderState& rhs) const @@ -37,14 +37,14 @@ } } void apply_alpha_mode() const { - if (mode == AM_ADD) { + if (mode == BM_ADD) { glBlendFunc(GL_SRC_ALPHA, GL_ONE); } - else if (mode == AM_MULTIPLY) { + else if (mode == BM_MULTIPLY) { glBlendFunc(GL_DST_COLOR, GL_ZERO); } else { glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); } @@ -172,10 +172,10 @@ glScissor(clip_rect.x, clip_rect.y, clip_rect.width, clip_rect.height); } } } - void set_alpha_mode(AlphaMode new_mode) + void set_alpha_mode(BlendMode new_mode) { if (new_mode == mode) return; mode = new_mode; apply_alpha_mode();