Add GLFW_CONTEXT_DEBUG window hint alias

This adds GLFW_CONTEXT_DEBUG as a preferred alias for
the GLFW_OPENGL_DEBUG_CONTEXT window hint, as debug contexts are
defined for both OpenGL and OpenGL ES.

Related to #1720.
This commit is contained in:
Camilla Löwy
2020-06-26 18:35:48 +02:00
parent 4e3b43383a
commit b420ca7404
6 changed files with 28 additions and 22 deletions
+2 -2
View File
@@ -396,7 +396,7 @@ GLFWAPI void glfwWindowHint(int hint, int value)
case GLFW_OPENGL_FORWARD_COMPAT:
_glfw.hints.context.forward = value ? GLFW_TRUE : GLFW_FALSE;
return;
case GLFW_OPENGL_DEBUG_CONTEXT:
case GLFW_CONTEXT_DEBUG:
_glfw.hints.context.debug = value ? GLFW_TRUE : GLFW_FALSE;
return;
case GLFW_CONTEXT_NO_ERROR:
@@ -846,7 +846,7 @@ GLFWAPI int glfwGetWindowAttrib(GLFWwindow* handle, int attrib)
return window->context.robustness;
case GLFW_OPENGL_FORWARD_COMPAT:
return window->context.forward;
case GLFW_OPENGL_DEBUG_CONTEXT:
case GLFW_CONTEXT_DEBUG:
return window->context.debug;
case GLFW_OPENGL_PROFILE:
return window->context.profile;