glbinding  2.0.0.00e2ff521289
A C++ binding for the OpenGL API, generated using the gl.xml specification.
callbacks.h
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include <set>
5 #include <functional>
6 
7 #include <glbinding/glbinding_api.h>
8 
10 #include <glbinding/FunctionCall.h>
11 
12 
13 namespace glbinding
14 {
15 
16 
24 GLBINDING_API void setCallbackMask(CallbackMask mask);
25 
35 GLBINDING_API void setCallbackMaskExcept(CallbackMask mask, const std::set<std::string> & blackList);
36 
44 GLBINDING_API void addCallbackMask(CallbackMask mask);
45 
55 GLBINDING_API void addCallbackMaskExcept(CallbackMask mask, const std::set<std::string> & blackList);
56 
64 GLBINDING_API void removeCallbackMask(CallbackMask mask);
65 
75 GLBINDING_API void removeCallbackMaskExcept(CallbackMask mask, const std::set<std::string> & blackList);
76 
81 using SimpleFunctionCallback = std::function<void(const AbstractFunction &)>;
82 
87 using FunctionCallback = std::function<void(const FunctionCall &)>;
88 
99 
110 GLBINDING_API void setUnresolvedCallback(SimpleFunctionCallback callback);
111 
121 GLBINDING_API FunctionCallback beforeCallback();
122 
133 GLBINDING_API void setBeforeCallback(FunctionCallback callback);
134 
144 GLBINDING_API FunctionCallback afterCallback();
145 
156 GLBINDING_API void setAfterCallback(FunctionCallback callback);
157 
158 
159 } // namespace glbinding
Contains all the classes of glbinding.
GLBINDING_API void removeCallbackMask(CallbackMask mask)
Updates the callback mask of all registered OpenGL functions in the current state to exclude the pass...
GLBINDING_API void setCallbackMask(CallbackMask mask)
Updates the callback mask of all registered OpenGL functions in the current state.
CallbackMask
The CallbackMask is a bitfield to encode the states of callbacks and logging for the OpenGL API funct...
Definition: CallbackMask.h:15
std::function< void(const AbstractFunction &)> SimpleFunctionCallback
The callback type of a simple function callback without parameters and return value.
Definition: callbacks.h:81
GLBINDING_API void addCallbackMask(CallbackMask mask)
Updates the callback mask of all registered OpenGL functions in the current state to include the pass...
GLBINDING_API void setCallbackMaskExcept(CallbackMask mask, const std::set< std::string > &blackList)
Updates the callback mask of all registered OpenGL functions in the current state, excluding the blacklisted functions.
GLBINDING_API void addCallbackMaskExcept(CallbackMask mask, const std::set< std::string > &blackList)
Updates the callback mask of all registered OpenGL functions in the current state to include the pass...
GLBINDING_API void setBeforeCallback(FunctionCallback callback)
Updates the before callback that is called before the actual OpenGL function invocation.
GLBINDING_API FunctionCallback beforeCallback()
Before callback accessor.
GLBINDING_API FunctionCallback afterCallback()
After callback accessor.
GLBINDING_API SimpleFunctionCallback unresolvedCallback()
Unresolved callback accessor.
GLBINDING_API void setUnresolvedCallback(SimpleFunctionCallback callback)
Updates the unresolved callback that is called upon invocation of an OpenGL function which have no co...
std::function< void(const FunctionCall &)> FunctionCallback
The callback type of a function callback with parameters and return value.
Definition: callbacks.h:87
GLBINDING_API void removeCallbackMaskExcept(CallbackMask mask, const std::set< std::string > &blackList)
Updates the callback mask of all registered OpenGL functions in the current state to exclude the pass...
GLBINDING_API void setAfterCallback(FunctionCallback callback)