pub fn init() -> Result<(), &'static str>
Expand description
Initializes the CGL widgets
Returns
Returns Ok(())
if the initialization was successful, otherwise returns Err("Failed to initialize CGL widgets")
Example
cgl_rs::init();
let mut window = cgl_rs::Window::new("CGL Window", 800, 600).unwrap();
cgl_rs::graphics::init();
cgl_rs::graphics::widgets::init();
// do stuff
cgl_rs::graphics::widgets::shutdown();
cgl_rs::graphics::shutdown();
window.destroy();
cgl_rs::shutdown();