From 53758a247724da0b0d8b5a5bee72893cb344e8c3 Mon Sep 17 00:00:00 2001 From: Ryan G Date: Wed, 8 Jan 2020 19:37:02 -0500 Subject: [PATCH] Fix the default blending (#560) The Default::default of an Option is None, which disables blending. That line was supposed to enable the default blending mode in golem, which is a sensible blending default. --- CHANGES.md | 1 + src/graphics.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 7c6a71fe..44187b71 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,7 @@ # Changelog ## In-development +- Fix the default blend mode: it should mix colors using their alphas - [Breaking] Remove support for image types other than jpeg and png ## 0.4.0-alpha0 diff --git a/src/graphics.rs b/src/graphics.rs index 5cd7ea8e..f3a24dfd 100644 --- a/src/graphics.rs +++ b/src/graphics.rs @@ -95,7 +95,7 @@ impl Graphics { let vb = VertexBuffer::new(&ctx)?; let eb = ElementBuffer::new(&ctx)?; shader.bind(); - ctx.set_blend_mode(Default::default()); + ctx.set_blend_mode(Some(Default::default())); Ok(Graphics { ctx,