MCPcopy Create free account
hub / github.com/cginternals/globjects / initializeCallbacks

Function initializeCallbacks

source/globjects/source/globjects.cpp:61–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61void initializeCallbacks()
62{
63 // Callback mask is configured in AbstractDebugImplementation::enable
64 if (glbinding::afterCallback())
65 {
66 globjects::warning() << "No error checking after callback registered as a glbinding after callback is already registered.";
67 }
68 else
69 {
70 glbinding::setAfterCallback([](const glbinding::FunctionCall & functionCall) {
71 manualErrorCheckAfter(*functionCall.function);
72 });
73 }
74
75 if (glbinding::unresolvedCallback())
76 {
77 globjects::warning() << "No unresolved function checking callback registered as a glbinding unresolved callback is already registered.";
78 }
79 else
80 {
81 glbinding::setUnresolvedCallback([](const glbinding::AbstractFunction & function) {
82#ifdef GLOBJECTS_GL_ERROR_RAISE_EXCEPTION
83 throw std::runtime_error(std::string(function.name()) + " couldn't get resolved.");
84#else
85 globjects::fatal() << std::string(function.name()) << " couldn't get resolved.";
86#endif
87 });
88 }
89}
90
91
92} // namespace

Callers 1

initFunction · 0.85

Calls 4

warningFunction · 0.85
manualErrorCheckAfterFunction · 0.85
fatalFunction · 0.85
nameMethod · 0.45

Tested by

no test coverage detected