()
| 36 | } |
| 37 | |
| 38 | fn main() -> Result<(), blue_engine::error::Error> { |
| 39 | let mut engine = Engine::new_config(EngineSettings { |
| 40 | // The width and height must be respecting of the 256 padding |
| 41 | height: 1024, |
| 42 | width: 1024, |
| 43 | ..Default::default() |
| 44 | })?; |
| 45 | |
| 46 | triangle( |
| 47 | "trig", |
| 48 | ObjectSettings::default(), |
| 49 | &mut engine.renderer, |
| 50 | &mut engine.objects, |
| 51 | )?; |
| 52 | |
| 53 | // let instant = std::time::Instant::now(); |
| 54 | engine.update_loop(move |_engine| { |
| 55 | #[cfg(feature = "headless")] |
| 56 | output_image_native( |
| 57 | _engine.renderer.headless_texture_data.clone(), |
| 58 | ( |
| 59 | // since we do not have a window, the width and |
| 60 | // height is taken from the configuration of the renderer |
| 61 | _engine.renderer.config.width as usize, |
| 62 | _engine.renderer.config.height as usize, |
| 63 | ), |
| 64 | "img.png", |
| 65 | ); |
| 66 | })?; |
| 67 | Ok(()) |
| 68 | } |
nothing calls this directly
no test coverage detected