skunk2d/examples/img32.rs

22 lines
483 B
Rust

use skunk2d::{run, Event, Game, Image32, WindowState};
struct World {}
impl Game<Image32> for World {
fn new(window_state: &mut WindowState) -> Self {
World {}
}
fn update(&mut self, window_state: &mut WindowState) {}
fn on_event(&mut self, window_state: &mut WindowState, event: Event) {}
fn draw(&self, target: &mut Image32) {
target.fill([0xc0, 0xf0, 0xd0, 0xff]);
}
}
fn main() {
run::<Image32, World>(1920 / 3, 1080 / 3, 60);
}