Remove call to glViewport in X11 implementation

This commit is contained in:
Pierre Krieger 2014-11-09 20:12:41 +01:00
parent 7d00bedbdb
commit 37bdb997ce

View file

@ -254,9 +254,6 @@ impl Window {
context
};
// Make context current before call to glViewport below.
unsafe { ffi::glx::MakeCurrent(display, window, context) };
// creating the window object
let window = Window {
display: display,
@ -272,16 +269,6 @@ impl Window {
current_size: Cell::new((0, 0)),
};
// calling glViewport
unsafe {
let ptr = window.get_proc_address("glViewport");
assert!(!ptr.is_null());
let ptr: extern "system" fn(libc::c_int, libc::c_int, libc::c_int, libc::c_int) =
mem::transmute(ptr);
let dimensions = window.get_inner_size().unwrap();
ptr(0, 0, dimensions.val0() as libc::c_int, dimensions.val1() as libc::c_int);
}
// returning
Ok(window)
}