14#define WINAPI __stdcall
29template <
typename ReturnType,
typename... Arguments>
41template <
typename ReturnType,
typename... Arguments>
44 using type = std::function<void(ReturnType, Arguments...)>;
55template <
typename... Arguments>
58 using type = std::function<void(Arguments...)>;
76template <
typename ReturnType,
typename... Arguments>
109 inline ReturnType operator()(Arguments&... arguments)
const;
124 inline ReturnType call(Arguments&... arguments)
const;
139 inline ReturnType directCall(Arguments... arguments)
const;
157 inline void clearBeforeCallback();
175 inline void clearAfterCallback();
195 virtual bool hasState()
const override;
196 virtual bool hasState(
int pos)
const override;
201 virtual void resizeStates(
int count)
override;
#define WINAPI
Definition Function.h:16
The AbstractFunction represents an OpenGL API function by its name and entry point after dynamic addr...
Definition AbstractFunction.h:30
The State struct represents the configuration of a single OpenGL function for one thread....
Definition AbstractState.h:21
The Function represents an OpenGL API function with additional features.
Definition Function.h:78
ReturnType( *)(Arguments...) Signature
The c pointer type for a function call.
Definition Function.h:82
typename CallbackType< ReturnType, Arguments... >::type AfterCallback
The callback type for the after callback.
Definition Function.h:84
AfterCallback m_afterCallback
The currently registered after callback.
Definition Function.h:208
std::vector< State > m_states
List of States the function is registered in.
Definition Function.h:205
BeforeCallback m_beforeCallback
The currently registered before callback.
Definition Function.h:207
typename CallbackType< void, Arguments... >::type BeforeCallback
The callback type for the before callback.
Definition Function.h:83
Contains all the classes of glbinding.
void setAfterCallback(FunctionCallback callback)
Updates the after callback that is called after the actual OpenGL function invocation.
void setBeforeCallback(FunctionCallback callback)
Updates the before callback that is called before the actual OpenGL function invocation.
FunctionCallback afterCallback()
After callback accessor.
FunctionCallback beforeCallback()
Before callback accessor.
std::function< void(Arguments...)> type
Propagate the actual callable callback type.
Definition Function.h:58
A callback signature with return type and multiple arguments.
Definition Function.h:43
std::function< void(ReturnType, Arguments...)> type
Propagate the actual callable callback type.
Definition Function.h:44
Helper struct for calling GL functions and registered callbacks.
Definition Function.inl:47