pub fn end() -> bool
Expand description
Ends the current CGL frame
Returns
Returns true
if the frame was successfully ended, otherwise returns false
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();
while !window.should_close() {
// bind framebuffers, etc.
cgl_rs::graphics::widgets::begin();
// draw widgets here
cgl_rs::graphics::widgets::end(); // you could also check if the function returns true
// update window, swap buffers, etc.
break; // for testing purposes
}
cgl_rs::graphics::widgets::shutdown();
cgl_rs::graphics::shutdown();
window.destroy();
cgl_rs::shutdown();