From 669c40f102c0107152efbba9fd2bec5976011911 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Tue, 31 Jul 2012 23:07:18 +0200 Subject: [PATCH] Fixed debug context being a hard constraint on WGL. --- src/win32_window.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/win32_window.c b/src/win32_window.c index 484c81b4..fff50ea2 100755 --- a/src/win32_window.c +++ b/src/win32_window.c @@ -998,14 +998,19 @@ int _glfwPlatformOpenWindow(_GLFWwindow* window, recreateContext = GL_TRUE; } - if (wndconfig->glForward || wndconfig->glDebug) + if (wndconfig->glDebug) + { + if (window->WGL.ARB_create_context) + recreateContext = GL_TRUE; + } + + if (wndconfig->glForward) { if (!window->WGL.ARB_create_context) { _glfwSetError(GLFW_VERSION_UNAVAILABLE, - "Win32/WGL: A forward compatible or debug OpenGL " - "context requested but WGL_ARB_create_context is " - "unavailable"); + "Win32/WGL: A forward compatible OpenGL context " + "requested but WGL_ARB_create_context is unavailable"); return GL_FALSE; }