Renderer functional

This commit is contained in:
2025-11-26 18:49:16 +01:00
parent 5ed483a09a
commit f959114327
6 changed files with 377 additions and 5 deletions
+11 -3
View File
@@ -1,11 +1,19 @@
use osmium::entity::Component;
use osmium::terminal;
fn main() {
terminal::hide_cursor().unwrap();
let mut engine = osmium::init();
engine.thread("Main.tick", || {});
let mut my_rect = engine.entity(|r| {
// r.draw_rect(0, 0, 10, 10);
let my_rect = engine.entity(|r| {
r.draw_rect(8, 3, 11, 5, 0x0000ff);
});
terminal::clear().unwrap();
my_rect.render(&mut osmium::renderer::Renderer {});
terminal::show_cursor().unwrap();
}