mirror of
https://github.com/glfw/glfw.git
synced 2024-11-10 09:01:46 +00:00
fix MESA_swap_control copy-pasta
This commit is contained in:
parent
ddc4d5e8a2
commit
173e321ea6
@ -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