diff options
| author | degasus <wickmarkus@web.de> | 2014-02-24 12:45:02 +0100 |
|---|---|---|
| committer | degasus <wickmarkus@web.de> | 2014-02-24 12:45:02 +0100 |
| commit | 8af3f751db100890f403945d8374a47ea76244b4 (patch) | |
| tree | 3854519e5d4c96926dfa8d3f106fef2ef48c21cd /Source/Core/DolphinWX/GLInterface/GLX.cpp | |
| parent | 21bb722c9352cc50b3eea95ec7579abdce58613c (diff) | |
Fetch swapInterval function pointer after binding a context
This fixes vsync on windows
Diffstat (limited to 'Source/Core/DolphinWX/GLInterface/GLX.cpp')
| -rw-r--r-- | Source/Core/DolphinWX/GLInterface/GLX.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Source/Core/DolphinWX/GLInterface/GLX.cpp b/Source/Core/DolphinWX/GLInterface/GLX.cpp index ea220d8876..ce61989efa 100644 --- a/Source/Core/DolphinWX/GLInterface/GLX.cpp +++ b/Source/Core/DolphinWX/GLInterface/GLX.cpp @@ -110,7 +110,6 @@ bool cInterfaceGLX::Create(void *&window_handle) PanicAlert("Unable to create GLX context."); return false; } - glXSwapIntervalSGI = (PFNGLXSWAPINTERVALSGIPROC)GLInterface->GetFuncAddress("glXSwapIntervalSGI"); GLWin.x = _tx; GLWin.y = _ty; @@ -131,7 +130,14 @@ bool cInterfaceGLX::MakeCurrent() XMoveResizeWindow(GLWin.evdpy, GLWin.win, GLWin.x, GLWin.y, GLWin.width, GLWin.height); #endif - return glXMakeCurrent(GLWin.dpy, GLWin.win, GLWin.ctx); + + bool success = glXMakeCurrent(GLWin.dpy, GLWin.win, GLWin.ctx); + if (success) + { + // load this function based on the current bound context + glXSwapIntervalSGI = (PFNGLXSWAPINTERVALSGIPROC)GLInterface->GetFuncAddress("glXSwapIntervalSGI"); + } + return success; } bool cInterfaceGLX::ClearCurrent() |
