aboutsummaryrefslogtreecommitdiffstats
path: root/pugl/pugl_win.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'pugl/pugl_win.cpp')
-rw-r--r--pugl/pugl_win.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/pugl/pugl_win.cpp b/pugl/pugl_win.cpp
index 4a1d008..9bc9438 100644
--- a/pugl/pugl_win.cpp
+++ b/pugl/pugl_win.cpp
@@ -186,8 +186,17 @@ puglCreateWindow(PuglView* view, const char* title)
free(view);
return NULL;
}
+
wglMakeCurrent(impl->hdc, impl->hglrc);
+ typedef BOOL (*SwapIntervalFunc)(int);
+
+ SwapIntervalFunc swapInterval = (SwapIntervalFunc)wglGetProcAddress(
+ "wglSwapIntervalEXT");
+ if (swapInterval) {
+ swapInterval(1);
+ }
+
return 0;
}