Ver Fonte

Another attempt to fix ARB_debug_output, hopefully the last one.

Zachary Lund há 11 anos atrás
pai
commit
d3dab077cb
2 ficheiros alterados com 4 adições e 2 exclusões
  1. 3 2
      libobs-opengl/gl-subsystem.c
  2. 1 0
      libobs-opengl/gl-windows.c

+ 3 - 2
libobs-opengl/gl-subsystem.c

@@ -72,9 +72,10 @@ static void GLEW_TEMP_API gl_debug_proc(
 static void gl_enable_debug()
 {
 	 /* Perhaps we should create GLEW contexts? */
-
-	if (GLEW_ARB_debug_output)
+	if (GLEW_VERSION_4_3)
 		glDebugMessageCallback(gl_debug_proc, NULL);
+	if (GLEW_ARB_debug_output)
+		glDebugMessageCallbackARB(gl_debug_proc, NULL);
 	else {
 		blog(LOG_DEBUG, "Failed to set GL debug callback as it is "
 		                "not supported.");

+ 1 - 0
libobs-opengl/gl-windows.c

@@ -237,6 +237,7 @@ static inline void required_extension_error(const char *extension)
 
 static bool gl_init_extensions(device_t device)
 {
+	glewExperimental = true;
 	GLenum errorcode = glewInit();
 	if (errorcode != GLEW_OK) {
 		blog(LOG_ERROR, "glewInit failed, %u", errorcode);