mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2025-01-11 21:31:29 +11:00
parent
32e9b5062c
commit
cd3fc3075a
|
@ -718,6 +718,9 @@ extern "system" {
|
|||
// http://msdn.microsoft.com/en-us/library/windows/desktop/ms633519(v=vs.85).aspx
|
||||
pub fn GetWindowRect(hWnd: HWND, lpRect: *mut RECT) -> BOOL;
|
||||
|
||||
//
|
||||
pub fn glFlush();
|
||||
|
||||
//
|
||||
pub fn glViewport(x: libc::c_int, y: libc::c_int, w: libc::c_int, h: libc::c_int);
|
||||
|
||||
|
|
|
@ -191,6 +191,8 @@ impl Window {
|
|||
/// See the docs if the crate root file.
|
||||
pub fn swap_buffers(&self) {
|
||||
unsafe {
|
||||
ffi::glFlush();
|
||||
|
||||
if ffi::SwapBuffers(self.hdc) == 0 {
|
||||
use std::os;
|
||||
fail!("{}", os::error_string(os::errno()));
|
||||
|
|
Loading…
Reference in a new issue