From 890dab31331e9dfcb339ea7149f7443c0e5d02f9 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Mon, 15 Nov 2010 20:19:29 +0100 Subject: [PATCH] Updates to Win32 context re-creation logic. --- src/win32/win32_window.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/win32/win32_window.c b/src/win32/win32_window.c index 99c0cc49..6271e61d 100644 --- a/src/win32/win32_window.c +++ b/src/win32/win32_window.c @@ -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?