+#ifdef USE_GLBINDING
+
+ glbinding::Binding::initialize();
+
+#ifdef USE_GLBINDING_DEBUG_OUTPUT
+ glbinding::setCallbackMask(glbinding::CallbackMask::After | glbinding::CallbackMask::ParametersAndReturnValue);
+
+ glbinding::setAfterCallback([](const glbinding::FunctionCall & call) {
+ std::cout << call.function.name() << "(";
+
+ for (unsigned i = 0; i < call.parameters.size(); ++i)
+ {
+ std::cout << call.parameters[i]->asString();
+ if (i < call.parameters.size() - 1)
+ std::cout << ", ";
+ }
+
+ std::cout << ")";
+
+ if (call.returnValue)
+ {
+ std::cout << " -> " << call.returnValue->asString();
+ }
+
+ std::cout << std::endl;
+ });
+#endif
+
+ static auto extensions = glbinding::ContextInfo::extensions();
+ log_info << "Using glbinding 1.0.0 " << std::endl;
+ log_info << "ARB_texture_non_power_of_two: " << static_cast<int>(extensions.find(GLextension::GL_ARB_texture_non_power_of_two) != extensions.end()) << std::endl;
+
+#endif
+