The way the lib was designed to use RAII with mutable references makes impossible to write anything a bit more complex than simple examples.
For instance:
let mut d = rl.begin_drawing(&thread);
let t = rl.get_frame_time(); // That will fail to compile
current_scene.draw(&rl, &mut d); // That will fail too
This make impossible to setup the drawing context, for example to draw to a texture, and delegate the composition to something else, because you can't access the raylib API anymore while holding a a RaylibDrawHandle or any similar type.
The way the lib was designed to use RAII with mutable references makes impossible to write anything a bit more complex than simple examples.
For instance:
This make impossible to setup the drawing context, for example to draw to a texture, and delegate the composition to something else, because you can't access the raylib API anymore while holding a a RaylibDrawHandle or any similar type.