8#include <glbinding/glbinding_api.h>
The AbstractFunction represents an OpenGL API function.
Definition: AbstractFunction.h:24
void unresolved() const
Triggers a call of the unresolved callback.
bool isResolved() const
Check for a valid function pointer in the current state.
void removeCallbackMask(CallbackMask mask)
Reconfigures the callback mask for the current state in means of a bit-wise 'clear' operation of the ...
void resolveAddress()
Lookup the function pointer and stores it in the current state.
const char * m_name
The OpenGL API function name, including the 'gl' prefix.
Definition: AbstractFunction.h:252
bool isAnyEnabled(CallbackMask mask) const
Check if any bit of the parameter is set in the currently configured callback mask of the current sta...
static void setStatePos(int pos)
Updates the currently used state.
static void provideState(int pos)
Extend the function states to include the state identified through pos.
ProcAddress address() const
Function pointer accessor.
State & state(int pos) const
State accessor.
CallbackMask callbackMask() const
Callback mask accessor.
State & state() const
Current state accessor.
void addCallbackMask(CallbackMask mask)
Reconfigures the callback mask for the current state in means of a bit-wise 'or' operation with the c...
bool hasState(int pos) const
Checks for existance of a state.
static int s_maxpos
The global maximum of states per function.
Definition: AbstractFunction.h:258
void before(const FunctionCall &call) const
Triggers a call of the before callback, passing the parameters.
const char * name() const
Name accessor.
AbstractFunction(const char *name)
Constructor.
bool isEnabled(CallbackMask mask) const
Check if all bits of the parameter are set in the currently configured callback mask of the current s...
bool hasState() const
Checks for existance of the current configured state.
std::vector< State > m_states
The list of all states.
Definition: AbstractFunction.h:254
static void neglectState(int pos)
Reconfigures the states so that the state identified through pos is neglected.
void setCallbackMask(CallbackMask mask)
Reconfigures the callback mask for the current state.
void after(const FunctionCall &call) const
Triggers a call of the after callback, passing the parameters and return value.
virtual ~AbstractFunction()
Destructor to guarantee correct memory deallocation of subclasses.
The main interface to handle additional features to OpenGL functions besides regular function calls.
Definition: Binding.h:28
Contains all the classes of glbinding.
void(*)() ProcAddress
The generic pointer to an OpenGL function.
Definition: ProcAddress.h:15
CallbackMask
The CallbackMask is a bitfield to encode the states of callbacks and logging for the OpenGL API funct...
Definition: CallbackMask.h:16
The State struct represents the configuration of an OpenGL function for one thread....
Definition: AbstractFunction.h:167
State()
Constructor that initializes all values with 0 / invalid.
CallbackMask callbackMask
The callback mask that is considered when dispatching function calls.
Definition: AbstractFunction.h:177
bool initialized
Whether this state is initialized or not.
Definition: AbstractFunction.h:175
ProcAddress address
The function pointer to the OpenGL function.
Definition: AbstractFunction.h:174
A FunctionCall represents a function call of an OpenGL API function, including the parameter and retu...
Definition: FunctionCall.h:23