← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~widelands-dev/widelands/appveyor_fix into lp:widelands

 

hessenfarmer has proposed merging lp:~widelands-dev/widelands/appveyor_fix into lp:widelands.

Commit message:
I need an appveyor build to further debug this

Requested reviews:
  Widelands Developers (widelands-dev)

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/appveyor_fix/+merge/354160
-- 
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/appveyor_fix into lp:widelands.
=== modified file 'src/graphic/gl/initialize.cc'
--- src/graphic/gl/initialize.cc	2018-08-28 07:53:33 +0000
+++ src/graphic/gl/initialize.cc	2018-09-02 20:46:28 +0000
@@ -48,26 +48,29 @@
 	SDL_GL_MakeCurrent(sdl_window, gl_context);
 
 #ifdef USE_GLBINDING
-	glbinding::Binding::initialize();
+	glbinding::Binding::initialize(nullptr, false);
 
 	// The undocumented command line argument --debug_gl_trace will set
 	// Trace::kYes. This will log every OpenGL call that is made, together with
 	// arguments, return values and glError status. This requires that Widelands
 	// is built using -DOPTION_USE_GLBINDING:BOOL=ON. It is a NoOp for GLEW.
+
 	if (trace == Trace::kYes) {
-		setCallbackMaskExcept(
+		glbinding::setCallbackMaskExcept(
 		   glbinding::CallbackMask::After | glbinding::CallbackMask::ParametersAndReturnValue,
 		   {"glGetError"});
 		glbinding::setAfterCallback([](const glbinding::FunctionCall& call) {
 			log("%s(", call.function->name());
 			for (size_t i = 0; i < call.parameters.size(); ++i) {
-				log("%s", call.parameters[i]->asString().c_str());
+				// log("%s", call.parameters[i]->asString().c_str());
+				log("%s", call.parameters[i].get());
 				if (i < call.parameters.size() - 1)
 					log(", ");
 			}
 			log(")");
 			if (call.returnValue) {
-				log(" -> %s", call.returnValue->asString().c_str());
+				// log(" -> %s", call.returnValue->asString().c_str());
+				log(" -> %s", call.returnValue.get());
 			}
 			const auto error = glGetError();
 			log(" [%s]\n", gl_error_to_string(error));
@@ -84,9 +87,6 @@
 	// See graphic/gl/system_headers.h for an explanation of the next line.
 	glewExperimental = GL_TRUE;
 	GLenum err = glewInit();
-	// LeakSanitizer reports a memory leak which is triggered somewhere above this line, probably
-	// coming from the gaphics drivers
-
 	if (err != GLEW_OK) {
 		log("glewInit returns %i\nYour OpenGL installation must be __very__ broken. %s\n", err,
 		    glewGetErrorString(err));

=== modified file 'src/graphic/gl/system_headers.h'
--- src/graphic/gl/system_headers.h	2018-04-07 16:59:00 +0000
+++ src/graphic/gl/system_headers.h	2018-09-02 20:46:28 +0000
@@ -36,7 +36,16 @@
 
 #ifdef USE_GLBINDING
 #include <glbinding/Binding.h>
+#include <glbinding/glbinding.h>
+#include <glbinding/FunctionCall.h>
+#include <glbinding/CallbackMask.h>
 #include <glbinding/gl/gl.h>
+
+#include <glbinding-aux/ContextInfo.h>
+#include <glbinding-aux/Meta.h>
+#include <glbinding-aux/types_to_string.h>
+#include <glbinding-aux/ValidVersions.h>
+#include <glbinding-aux/debug.h>
 // This fakes that most other gl bindings define gl functions in the public namespace.
 CLANG_DIAG_OFF("-Wheader-hygiene")
 using namespace gl;


Follow ups