animations: set blank shaders on task start

This commit is contained in:
Victoria Fischer 2024-11-02 15:22:49 +01:00
parent dbfc79046e
commit 7e90dd5a22

View File

@ -37,7 +37,9 @@ impl<T: Surface> IdleTask<T> {
}
impl<T: Surface> Task for IdleTask<T> {
fn name(&self) -> &'static str { "Idle" }
fn start(&mut self) {
self.surface.set_shader(Box::new(IdleShader { frame: self.frame }));
}
fn tick(&mut self) {
self.updater.run(|| {
@ -114,7 +116,9 @@ impl<T: Surface> TestPattern<T> {
}
impl<T: Surface> Task for TestPattern<T> {
fn name(&self) -> &'static str { "Idle" }
fn start(&mut self) {
self.surface.set_shader(Box::new(TestShader { pattern: self.pattern }));
}
fn tick(&mut self) {
self.updater.run(|| {