glbinding  3.3.0.0
A C++ binding for the OpenGL API, generated using the gl.xml specification.
Loading...
Searching...
No Matches
AbstractFunction.h
Go to the documentation of this file.
1
2#pragma once
3
4
5#include <string>
6#include <set>
7#include <vector>
8
9#include <glbinding/glbinding_api.h>
10
14
15
16namespace glbinding
17{
18
19
20class AbstractState;
21class Binding;
22
23
30{
31 friend class Binding;
32public:
40 AbstractFunction(const char * name);
41
47
55 const char * name() const;
56
62
70 bool isResolved() const;
71
80
89
98
107
116
128
140
148 virtual void resizeStates(int count) = 0;
149
159 static void unresolved(const AbstractFunction * function);
160
170 static void before(const FunctionCall & call);
171
181 static void after(const FunctionCall & call);
182
192 static void log(FunctionCall && call);
193
201 static int currentPos();
202
210 static int maxPos();
211
212
213protected:
224 virtual bool hasState() const = 0;
225
236 virtual bool hasState(int pos) const = 0;
237
245 virtual AbstractState & state() const = 0;
246
257 virtual AbstractState & state(int pos) const = 0;
258
259
260protected:
261 const char * m_name;
262};
263
264
265} // namespace glbinding
The AbstractFunction represents an OpenGL API function by its name and entry point after dynamic addr...
Definition AbstractFunction.h:30
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.
static void unresolved(const AbstractFunction *function)
Call unresolved callback.
const char * m_name
The function name, including the 'gl' prefix.
Definition AbstractFunction.h:261
bool isAnyEnabled(CallbackMask mask) const
Check if any bit of the parameter is set in the currently configured callback mask of the current sta...
ProcAddress address() const
Get function pointer.
CallbackMask callbackMask() const
Get callback mask.
void addCallbackMask(CallbackMask mask)
Reconfigures the callback mask for the current state in means of a bit-wise 'or' operation with the c...
virtual AbstractState & state() const =0
Get current state.
static void before(const FunctionCall &call)
Call before callback.
const char * name() const
Get function name.
AbstractFunction(const char *name)
Constructor.
static int currentPos()
Get index of current state.
bool isEnabled(CallbackMask mask) const
Check if all bits of the parameter are set in the currently configured callback mask of the current s...
static int maxPos()
Get highest state index currently used.
virtual void resizeStates(int count)=0
Resize internal cache of states.
void setCallbackMask(CallbackMask mask)
Reconfigures the callback mask for the current state.
static void log(FunctionCall &&call)
Call log callback.
virtual AbstractState & state(int pos) const =0
Get state.
virtual bool hasState(int pos) const =0
Checks for existence of a state.
static void after(const FunctionCall &call)
Call after callback.
virtual bool hasState() const =0
Checks for existence of the current configured state.
virtual ~AbstractFunction()
Destructor to guarantee correct memory deallocation of subclasses.
The State struct represents the configuration of a single OpenGL function for one thread....
Definition AbstractState.h:21
The main interface to handle additional features to OpenGL functions besides regular function calls.
Definition Binding.h:45
A FunctionCall represents a function call of an OpenGL API function, including the parameter and retu...
Definition FunctionCall.h:27
The Value class represents a printable wrapper around an OpenGL data type.
Definition Value.h:30
Contains all the classes of glbinding.
CallbackMask
The CallbackMask is a bitfield to encode the states of callbacks for the OpenGL API function calls.
Definition CallbackMask.h:18