mirror of
https://github.com/glfw/glfw.git
synced 2024-11-27 04:22:00 +00:00
Don't duplicate extension preference logic.
This commit is contained in:
parent
285ab537f7
commit
194e865bd6
@ -599,8 +599,6 @@ static void initGLXExtensions(_GLFWwindow* window)
|
|||||||
window->GLX.EXT_swap_control = GL_TRUE;
|
window->GLX.EXT_swap_control = GL_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!window->GLX.EXT_swap_control)
|
|
||||||
{
|
|
||||||
if (_glfwPlatformExtensionSupported("GLX_SGI_swap_control"))
|
if (_glfwPlatformExtensionSupported("GLX_SGI_swap_control"))
|
||||||
{
|
{
|
||||||
window->GLX.SwapIntervalSGI = (PFNGLXSWAPINTERVALSGIPROC)
|
window->GLX.SwapIntervalSGI = (PFNGLXSWAPINTERVALSGIPROC)
|
||||||
@ -609,7 +607,6 @@ static void initGLXExtensions(_GLFWwindow* window)
|
|||||||
if (window->GLX.SwapIntervalSGI)
|
if (window->GLX.SwapIntervalSGI)
|
||||||
window->GLX.SGI_swap_control = GL_TRUE;
|
window->GLX.SGI_swap_control = GL_TRUE;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (_glfwPlatformExtensionSupported("GLX_SGIX_fbconfig"))
|
if (_glfwPlatformExtensionSupported("GLX_SGIX_fbconfig"))
|
||||||
{
|
{
|
||||||
@ -643,24 +640,14 @@ static void initGLXExtensions(_GLFWwindow* window)
|
|||||||
window->GLX.ARB_create_context = GL_TRUE;
|
window->GLX.ARB_create_context = GL_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (window->GLX.ARB_create_context)
|
|
||||||
{
|
|
||||||
if (_glfwPlatformExtensionSupported("GLX_ARB_create_context_profile"))
|
|
||||||
window->GLX.ARB_create_context_profile = GL_TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (window->GLX.ARB_create_context &&
|
|
||||||
window->GLX.ARB_create_context_profile)
|
|
||||||
{
|
|
||||||
if (_glfwPlatformExtensionSupported("GLX_EXT_create_context_es2_profile"))
|
|
||||||
window->GLX.EXT_create_context_es2_profile = GL_TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (window->GLX.ARB_create_context)
|
|
||||||
{
|
|
||||||
if (_glfwPlatformExtensionSupported("GLX_ARB_create_context_robustness"))
|
if (_glfwPlatformExtensionSupported("GLX_ARB_create_context_robustness"))
|
||||||
window->GLX.ARB_create_context_robustness = GL_TRUE;
|
window->GLX.ARB_create_context_robustness = GL_TRUE;
|
||||||
}
|
|
||||||
|
if (_glfwPlatformExtensionSupported("GLX_ARB_create_context_profile"))
|
||||||
|
window->GLX.ARB_create_context_profile = GL_TRUE;
|
||||||
|
|
||||||
|
if (_glfwPlatformExtensionSupported("GLX_EXT_create_context_es2_profile"))
|
||||||
|
window->GLX.EXT_create_context_es2_profile = GL_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user