Fixed refresh of debug context attribute.

This commit is contained in:
Camilla Berglund
2014-03-06 14:48:44 +01:00
parent e2d6f2761c
commit ae8393c06e
4 changed files with 8 additions and 4 deletions
+3 -2
View File
@@ -358,7 +358,7 @@ const _GLFWfbconfig* _glfwChooseFBConfig(const _GLFWfbconfig* desired,
return closest;
}
GLboolean _glfwRefreshContextAttribs(void)
GLboolean _glfwRefreshContextAttribs(const _GLFWwndconfig* wndconfig)
{
_GLFWwindow* window = _glfwPlatformGetCurrentContext();
@@ -399,7 +399,8 @@ GLboolean _glfwRefreshContextAttribs(void)
if (flags & GL_CONTEXT_FLAG_DEBUG_BIT)
window->glDebug = GL_TRUE;
else if (glfwExtensionSupported("GL_ARB_debug_output"))
else if (glfwExtensionSupported("GL_ARB_debug_output") &&
wndconfig->glDebug)
{
// HACK: This is a workaround for older drivers (pre KHR_debug)
// not setting the debug bit in the context flags for