|
@@ -27,14 +27,15 @@
|
27
|
27
|
#include <glbinding/Binding.h>
|
28
|
28
|
#include <ezoptionparser/ezOptionParser.hpp>
|
29
|
29
|
|
30
|
|
-#ifdef DEBUG_GLBINDINGS
|
31
|
|
-#include <glbinding/callbacks.h>
|
|
30
|
+// TODO broken
|
|
31
|
+#ifdef ENABLE_GL_DEBUGGING
|
|
32
|
+#include <glbinding/CallbackMask.h>
|
32
|
33
|
#include <glbinding/Meta.h>
|
33
|
|
-#endif
|
|
34
|
+#endif // ENABLE_GL_DEBUGGING
|
34
|
35
|
|
35
|
36
|
static std::string configFileToUse;
|
36
|
37
|
|
37
|
|
-#ifdef DEBUG_GLBINDINGS
|
|
38
|
+#ifdef ENABLE_GL_DEBUGGING
|
38
|
39
|
static void glErrorCallback(const glbinding::FunctionCall& call) {
|
39
|
40
|
RunTime::incrementCallCount();
|
40
|
41
|
|
|
@@ -73,7 +74,7 @@ static void glUnresolvedCallback(const glbinding::AbstractFunction& func) {
|
73
|
74
|
Log::get(LOG_ERROR) << "Unresolved OpenGL call: \"" << func.name() << "\"!" << Log::endl;
|
74
|
75
|
orAssert(func.isResolved());
|
75
|
76
|
}
|
76
|
|
-#endif
|
|
77
|
+#endif // ENABLE_GL_DEBUGGING
|
77
|
78
|
|
78
|
79
|
int main(int argc, const char* argv[]) {
|
79
|
80
|
ez::ezOptionParser opt;
|
|
@@ -121,19 +122,19 @@ int main(int argc, const char* argv[]) {
|
121
|
122
|
opt.get("-c")->getString(configFileToUse);
|
122
|
123
|
}
|
123
|
124
|
|
124
|
|
- glbinding::Binding::initialize();
|
|
125
|
+ glbinding::Binding::initialize(nullptr);
|
125
|
126
|
Log::initialize();
|
126
|
127
|
RunTime::initialize(); // RunTime is required by other constructors
|
127
|
128
|
Command::fillCommandList();
|
128
|
129
|
|
129
|
|
-#ifdef DEBUG_GLBINDINGS
|
|
130
|
+#ifdef ENABLE_GL_DEBUGGING
|
130
|
131
|
// Register global OpenGL after-callback for all GL functions except glGetError
|
131
|
132
|
glbinding::setCallbackMaskExcept(glbinding::CallbackMask::After
|
132
|
133
|
| glbinding::CallbackMask::ParametersAndReturnValue,
|
133
|
134
|
{ "glGetError" });
|
134
|
135
|
glbinding::setAfterCallback(glErrorCallback);
|
135
|
136
|
glbinding::setUnresolvedCallback(glUnresolvedCallback);
|
136
|
|
-#endif
|
|
137
|
+#endif // ENABLE_GL_DEBUGGING
|
137
|
138
|
|
138
|
139
|
Log::get(LOG_INFO) << "Initializing " << VERSION << Log::endl;
|
139
|
140
|
|