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

View File

@@ -422,7 +422,7 @@ int main(int argc, char** argv)
break;
case 'd':
case DEBUG_CONTEXT:
glfwWindowHint(GLFW_OPENGL_DEBUG_CONTEXT, GLFW_TRUE);
glfwWindowHint(GLFW_CONTEXT_DEBUG, GLFW_TRUE);
break;
case 'f':
case FORWARD:
@@ -639,7 +639,7 @@ int main(int argc, char** argv)
if (glfwGetWindowAttrib(window, GLFW_OPENGL_FORWARD_COMPAT))
printf(" forward-compatible");
if (glfwGetWindowAttrib(window, GLFW_OPENGL_DEBUG_CONTEXT))
if (glfwGetWindowAttrib(window, GLFW_CONTEXT_DEBUG))
printf(" debug");
if (glfwGetWindowAttrib(window, GLFW_CONTEXT_ROBUSTNESS) == GLFW_LOSE_CONTEXT_ON_RESET)
printf(" robustness");