1. Bart van Strien
  2. love-experiments

Commits

Alex Szpakowski  committed b97d723

Fixed debug output to enable properly when GL_KHR_debug is used

  • Participants
  • Parent commits 0eacc7f
  • Branches debug-output

Comments (0)

Files changed (1)

File src/modules/graphics/opengl/Graphics.cpp

View file
  • Ignore whitespace
 		glDebugMessageCallbackARB(NULL, NULL);
 		glDisable(GL_DEBUG_OUTPUT_SYNCHRONOUS);
 
-		// We can disable debug output entirely with GL_KHR_debug.
+		// We can disable debug output entirely with KHR_debug.
 		if (GLEE_VERSION_4_3 || GLEE_KHR_debug)
 			glDisable(GL_DEBUG_OUTPUT);
 
 		return;
 	}
 
-	// Synchronous output because the callback function isn't thread-safe.
+	// When using KHR_debug, we need to explicitly enable debug output.
+	if (GLEE_VERSION_4_3 || GLEE_KHR_debug)
+		glEnable(GL_DEBUG_OUTPUT);
+
+	// Use synchronous output because the callback function isn't thread-safe.
 	glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS);
 
 	glDebugMessageCallbackARB(debugCB, NULL);