mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2025-01-11 13:31:29 +11:00
Remove call to glViewport in X11 implementation
This commit is contained in:
parent
7d00bedbdb
commit
37bdb997ce
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue