Advertisement
Guest User

Untitled

a guest
Sep 20th, 2019
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Rust 0.45 KB | None | 0 0
  1.     // Main rendering loop
  2.     events_loop.run_forever(|event| {
  3.         use glutin::{ControlFlow, Event, WindowEvent};
  4.    
  5.         unsafe {
  6.             // Clear the screen to black
  7.             gl::ClearColor(0.12, 0.1, 0.1, 1.0);
  8.             gl::Clear(gl::COLOR_BUFFER_BIT | gl::DEPTH_BUFFER_BIT);
  9.            
  10.             // My drawing stuff
  11.             model.draw_mesh();
  12.         }
  13.         gl_window.swap_buffers().unwrap();
  14.         ControlFlow::Continue
  15.     });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement