Updates to Win32 context re-creation logic.

This commit is contained in:
Camilla Berglund 2010-11-15 20:19:29 +01:00
parent 88194055bb
commit 890dab3133
1 changed files with 18 additions and 1 deletions

View File

@ -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?