cat_engine 0.3.1

A 2D graphics engine with audio output support
Documentation

2D графический движок с поддержкой аудио. A 2D graphics engine with audio support.

Использует OpenGL 2.0 и выше.

Текст рисуется поточечно. Так что важно указать правильный размер буфера.

Uses OpenGL 2.0 and above.

Text is drawn pointwise. It's important to set correct size of the text graphics buffer.

use cat_engine::{
DefaultWindow,
Window,
WindowEvent
};

fn main(){
// Default settings
let mut window=Window::new(|_,_|{}).unwrap();

while let Some(event)=window.next_event(){
match event{
WindowEvent::Exit=>break,
WindowEvent::Draw=>{
window.draw(|_,g|{
g.clear_colour([1.0,0.0,0.0,0.0]);
}).unwrap();
}
_=>{}
}
}
}

Modifying the window.

let wi=window.display().gl_window();
let w=wi.window();
w.set_minimized(false);
w.set_visible(false);