pub fn clear(r: f32, g: f32, b: f32, a: f32)
Expand description
Clears the screen with the specified color.
Arguments
r
- The red component of the color, in the range [0.0, 1.0].g
- The green component of the color, in the range [0.0, 1.0].b
- The blue component of the color, in the range [0.0, 1.0].a
- The alpha component of the color, in the range [0.0, 1.0].
Example
cgl_rs::init().expect("Failed to initialize CGL");
let mut window = cgl_rs::Window::new("My Window", 800, 600).unwrap();
cgl_rs::graphics::init().expect("Failed to initialize CGL Graphics Module");
cgl_rs::graphics::clear(0.0, 0.0, 0.0, 1.0); // Clears the screen to black
// ...
cgl_rs::graphics::shutdown();
window.destroy();
cgl_rs::shutdown();