renderbug: first implementation of virtual coordinate based rendering

This commit is contained in:
2024-10-27 15:14:28 +01:00
parent 4432ba7ad0
commit 3f20c07369
6 changed files with 221 additions and 97 deletions

View File

@@ -1,4 +1,5 @@
use std::fmt;
use std::time::{Duration, Instant};
pub trait Task {
fn tick(&mut self) {}
@@ -82,7 +83,7 @@ impl ScheduledState for Stopped {
struct ScheduledTask {
state: Option<Box<dyn ScheduledState>>,
task: Box<dyn Task>
task: Box<dyn Task>,
}
impl std::fmt::Debug for ScheduledTask {
@@ -98,7 +99,7 @@ impl ScheduledTask {
fn new(task: Box<dyn Task>) -> Self {
ScheduledTask {
state: Some(Box::new(Starting{})),
task: task
task: task,
}
}
@@ -122,7 +123,7 @@ impl ScheduledTask {
}
pub struct Scheduler {
tasks: Vec<ScheduledTask>
tasks: Vec<ScheduledTask>,
}
impl Scheduler {