Warning fixes for OS X.
This commit is contained in:
parent
3e11e5ef69
commit
77b3743117
10 changed files with 17 additions and 19 deletions
|
|
@ -40,14 +40,14 @@ fn main() {
|
|||
.build()
|
||||
.unwrap();
|
||||
|
||||
unsafe { window.make_current() };
|
||||
let _ = unsafe { window.make_current() };
|
||||
|
||||
|
||||
let context = support::load(&window);
|
||||
|
||||
for event in window.wait_events() {
|
||||
context.draw_frame((0.0, 1.0, 0.0, 1.0));
|
||||
window.swap_buffers();
|
||||
let _ = window.swap_buffers();
|
||||
|
||||
println!("{:?}", event);
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ fn main() { println!("This example requires glutin to be compiled with the `wind
|
|||
fn main() {
|
||||
let window = glutin::WindowBuilder::new().build().unwrap();
|
||||
window.set_title("glutin - Cursor grabbing test");
|
||||
unsafe { window.make_current() };
|
||||
let _ = unsafe { window.make_current() };
|
||||
|
||||
let context = support::load(&window);
|
||||
let mut grabbed = false;
|
||||
|
|
@ -45,7 +45,7 @@ fn main() {
|
|||
}
|
||||
|
||||
context.draw_frame((0.0, 1.0, 0.0, 1.0));
|
||||
window.swap_buffers();
|
||||
let _ = window.swap_buffers();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,13 +39,13 @@ fn main() {
|
|||
|
||||
#[cfg(feature = "window")]
|
||||
fn run(window: glutin::Window, color: (f32, f32, f32, f32)) {
|
||||
unsafe { window.make_current() };
|
||||
let _ = unsafe { window.make_current() };
|
||||
|
||||
let context = support::load(&window);
|
||||
|
||||
for event in window.wait_events() {
|
||||
context.draw_frame(color);
|
||||
window.swap_buffers();
|
||||
let _ = window.swap_buffers();
|
||||
|
||||
match event {
|
||||
glutin::Event::Closed => break,
|
||||
|
|
|
|||
|
|
@ -69,8 +69,6 @@ pub fn load(window: &glutin::Window) -> Context {
|
|||
|
||||
impl Context {
|
||||
pub fn draw_frame(&self, color: (f32, f32, f32, f32)) {
|
||||
use std::mem;
|
||||
|
||||
unsafe {
|
||||
self.gl.ClearColor(color.0, color.1, color.2, color.3);
|
||||
self.gl.Clear(gl::COLOR_BUFFER_BIT);
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ fn main() {
|
|||
.build().unwrap();
|
||||
window.set_title("A fantastic window!");
|
||||
window.set_window_resize_callback(Some(resize_callback as fn(u32, u32)));
|
||||
unsafe { window.make_current() };
|
||||
let _ = unsafe { window.make_current() };
|
||||
|
||||
println!("Pixel format of the window: {:?}", window.get_pixel_format());
|
||||
|
||||
|
|
@ -32,7 +32,7 @@ fn main() {
|
|||
|
||||
for event in window.wait_events() {
|
||||
context.draw_frame((0.0, 0.0, 0.0, 0.0));
|
||||
window.swap_buffers();
|
||||
let _ = window.swap_buffers();
|
||||
|
||||
println!("{:?}", event);
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ fn main() {
|
|||
let mut window = glutin::WindowBuilder::new().build().unwrap();
|
||||
window.set_title("A fantastic window!");
|
||||
window.set_window_resize_callback(Some(resize_callback as fn(u32, u32)));
|
||||
unsafe { window.make_current() };
|
||||
let _ = unsafe { window.make_current() };
|
||||
|
||||
println!("Pixel format of the window: {:?}", window.get_pixel_format());
|
||||
|
||||
|
|
@ -30,7 +30,7 @@ fn main() {
|
|||
|
||||
for event in window.wait_events() {
|
||||
context.draw_frame((0.0, 1.0, 0.0, 1.0));
|
||||
window.swap_buffers();
|
||||
let _ = window.swap_buffers();
|
||||
|
||||
println!("{:?}", event);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue