mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 04:54:35 +00:00
Updates to Win32 context re-creation logic.
This commit is contained in:
parent
88194055bb
commit
890dab3133
@ -1342,7 +1342,13 @@ int _glfwPlatformOpenWindow(_GLFWwindow* window,
|
||||
if (!createWindow(window, wndconfig, fbconfig))
|
||||
return GL_FALSE;
|
||||
|
||||
if (wndconfig->glMajor > 2)
|
||||
if (wndconfig->glMajor != 1 || wndconfig->glMinor != 0)
|
||||
{
|
||||
if (window->WGL.has_WGL_ARB_create_context)
|
||||
recreateContext = GL_TRUE;
|
||||
}
|
||||
|
||||
if (wndconfig->glForward || wndconfig->glDebug)
|
||||
{
|
||||
if (!window->WGL.has_WGL_ARB_create_context)
|
||||
{
|
||||
@ -1353,6 +1359,17 @@ int _glfwPlatformOpenWindow(_GLFWwindow* window,
|
||||
recreateContext = GL_TRUE;
|
||||
}
|
||||
|
||||
if (wndconfig->glProfile)
|
||||
{
|
||||
if (!window->WGL.has_WGL_ARB_create_context_profile)
|
||||
{
|
||||
_glfwSetError(GLFW_VERSION_UNAVAILABLE);
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
recreateContext = GL_TRUE;
|
||||
}
|
||||
|
||||
if (fbconfig->samples > 0)
|
||||
{
|
||||
// We want FSAA, but can we get it?
|
||||
|
Loading…
Reference in New Issue
Block a user