aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/win32/ffi.rs3
-rw-r--r--src/win32/mod.rs2
2 files changed, 5 insertions, 0 deletions
diff --git a/src/win32/ffi.rs b/src/win32/ffi.rs
index 3ff0982..4480155 100644
--- a/src/win32/ffi.rs
+++ b/src/win32/ffi.rs
@@ -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);
diff --git a/src/win32/mod.rs b/src/win32/mod.rs
index e3920a8..d8425d2 100644
--- a/src/win32/mod.rs
+++ b/src/win32/mod.rs
@@ -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()));