summaryrefslogtreecommitdiff
path: root/crates/throwshade
diff options
context:
space:
mode:
authorLLLL Colonq <llll@colonq>2025-02-18 19:42:51 -0500
committerLLLL Colonq <llll@colonq>2025-02-18 19:42:51 -0500
commitcfc11a79c914abc5012ffabb5b0697487ae1acfd (patch)
treefa1409a807c86de3f64641506a3256e80968b16a /crates/throwshade
parenta4aac831139a03119b2bbcb50c22e196e869b38d (diff)
Fix clear on web
Diffstat (limited to 'crates/throwshade')
-rw-r--r--crates/throwshade/src/lib.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/crates/throwshade/src/lib.rs b/crates/throwshade/src/lib.rs
index 2ac139e..f832703 100644
--- a/crates/throwshade/src/lib.rs
+++ b/crates/throwshade/src/lib.rs
@@ -48,6 +48,8 @@ cfg_if::cfg_if! {
impl state::Game for Game {
fn render(&mut self, ctx: &context::Context, st: &mut state::State) -> Option<()> {
if let Some(s) = &self.throwshade.shader {
+ ctx.clear_color(glam::Vec4::new(0.0, 0.0, 0.0, 0.0));
+ ctx.clear();
s.bind(ctx);
s.set_vec2(ctx, "resolution", &glam::Vec2::new(ctx.render_width, ctx.render_height));
let elapsed = (st.tick - self.throwshade.tickset) as f32 / 60.0;