mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 13:04: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))
|
if (!createWindow(window, wndconfig, fbconfig))
|
||||||
return GL_FALSE;
|
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)
|
if (!window->WGL.has_WGL_ARB_create_context)
|
||||||
{
|
{
|
||||||
@ -1353,6 +1359,17 @@ int _glfwPlatformOpenWindow(_GLFWwindow* window,
|
|||||||
recreateContext = GL_TRUE;
|
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)
|
if (fbconfig->samples > 0)
|
||||||
{
|
{
|
||||||
// We want FSAA, but can we get it?
|
// We want FSAA, but can we get it?
|
||||||
|
Loading…
Reference in New Issue
Block a user