diff options
-rw-r--r-- | pugl/pugl_win.cpp | 9 |
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; } |