mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-23 10:48:51 -05:00
Merge pull request #8 from Mith/master
Fixed MESA_swap_control copy-pasta.
This commit is contained in:
commit
7fb251c626
|
@ -546,11 +546,11 @@ int _glfwInitOpenGL(void)
|
||||||
|
|
||||||
if (_glfwPlatformExtensionSupported("GLX_MESA_swap_control"))
|
if (_glfwPlatformExtensionSupported("GLX_MESA_swap_control"))
|
||||||
{
|
{
|
||||||
window->GLX.SwapIntervalMESA = (PFNGLXSWAPINTERVALMESAPROC)
|
_glfwLibrary.GLX.SwapIntervalMESA = (PFNGLXSWAPINTERVALMESAPROC)
|
||||||
_glfwPlatformGetProcAddress("glXSwapIntervalMESA");
|
_glfwPlatformGetProcAddress("glXSwapIntervalMESA");
|
||||||
|
|
||||||
if (window->GLX.SwapIntervalMESA)
|
if (_glfwLibrary.GLX.SwapIntervalMESA)
|
||||||
window->GLX.MESA_swap_control = GL_TRUE;
|
_glfwLibrary.GLX.MESA_swap_control = GL_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_glfwPlatformExtensionSupported("GLX_SGIX_fbconfig"))
|
if (_glfwPlatformExtensionSupported("GLX_SGIX_fbconfig"))
|
||||||
|
@ -731,12 +731,12 @@ void _glfwPlatformSwapInterval(int interval)
|
||||||
window->X11.handle,
|
window->X11.handle,
|
||||||
interval);
|
interval);
|
||||||
}
|
}
|
||||||
else if (window->GLX.MESA_swap_control)
|
else if (_glfwLibrary.GLX.MESA_swap_control)
|
||||||
window->GLX.SwapIntervalMESA(interval);
|
_glfwLibrary.GLX.SwapIntervalMESA(interval);
|
||||||
else if (window->GLX.SGI_swap_control)
|
else if (_glfwLibrary.GLX.SGI_swap_control)
|
||||||
{
|
{
|
||||||
if (interval > 0)
|
if (interval > 0)
|
||||||
window->GLX.SwapIntervalSGI(interval);
|
_glfwLibrary.GLX.SwapIntervalSGI(interval);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user