mirror of
https://github.com/rust-windowing/winit.git
synced 2026-08-30 13:20:06 -04:00
Examples now call glViewport
This commit is contained in:
@@ -37,13 +37,18 @@ fn main() {
|
||||
};
|
||||
|
||||
println!("OpenGL version {}", version.as_str().unwrap());
|
||||
|
||||
{
|
||||
let win_size = window.get_inner_size().unwrap();
|
||||
gl::Viewport(0, 0, win_size.val0() as libc::c_int, win_size.val1() as libc::c_int);
|
||||
}
|
||||
|
||||
gl::ClearColor(0.0, 1.0, 0.0, 1.0);
|
||||
|
||||
while !window.is_closed() {
|
||||
gl::Clear(gl::COLOR_BUFFER_BIT);
|
||||
window.swap_buffers();
|
||||
|
||||
|
||||
println!("{}", window.wait_events().collect::<Vec<init::Event>>());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user