mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-26 22:53:15 -04:00
@@ -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()));
|
||||
|
||||
Reference in New Issue
Block a user