glbinding  3.0.2.58901078581f
A C++ binding for the OpenGL API, generated using the gl.xml specification.
glbinding.h
Go to the documentation of this file.
1 
2 #pragma once
3 
4 
5 #include <set>
6 #include <vector>
7 #include <functional>
8 
9 #include <glbinding/glbinding_api.h>
10 #include <glbinding/glbinding_features.h>
11 
13 #include <glbinding/CallbackMask.h>
14 #include <glbinding/ProcAddress.h>
15 
16 
17 namespace glbinding
18 {
19 
20 
21 class AbstractFunction;
22 class FunctionCall;
23 
24 
25 using SimpleFunctionCallback = std::function<void(const AbstractFunction &)>;
26 using FunctionCallback = std::function<void(const FunctionCall &)>;
27 using FunctionLogCallback = std::function<void(FunctionCall *)>;
28 using ContextSwitchCallback = std::function<void(ContextHandle)>;
29 
30 GLBINDING_API void initialize(glbinding::GetProcAddress functionPointerResolver, bool resolveFunctions = true);
31 GLBINDING_API void registerAdditionalFunction(AbstractFunction * function);
32 GLBINDING_API ProcAddress resolveFunction(const char * name);
33 GLBINDING_API void resolveFunctions();
34 
35 GLBINDING_API void setCallbackMask(CallbackMask mask);
36 GLBINDING_API void setCallbackMaskExcept(CallbackMask mask, const std::set<std::string> & blackList);
37 GLBINDING_API void addCallbackMask(CallbackMask mask);
38 GLBINDING_API void addCallbackMaskExcept(CallbackMask mask, const std::set<std::string> & blackList);
39 GLBINDING_API void removeCallbackMask(CallbackMask mask);
40 GLBINDING_API void removeCallbackMaskExcept(CallbackMask mask, const std::set<std::string> & blackList);
42 GLBINDING_API void setUnresolvedCallback(SimpleFunctionCallback callback);
43 GLBINDING_API FunctionCallback beforeCallback();
44 GLBINDING_API void setBeforeCallback(FunctionCallback callback);
45 GLBINDING_API FunctionCallback afterCallback();
46 GLBINDING_API void setAfterCallback(FunctionCallback callback);
47 GLBINDING_API FunctionLogCallback logCallback();
48 GLBINDING_API void setLogCallback(FunctionLogCallback callback);
49 
50 GLBINDING_API void addContextSwitchCallback(ContextSwitchCallback callback);
51 GLBINDING_API void initialize(ContextHandle context, glbinding::GetProcAddress functionPointerResolver, bool useContext = true, bool resolveFunctions = true);
52 GLBINDING_API void useCurrentContext();
53 GLBINDING_API void useContext(ContextHandle context);
54 GLBINDING_API void releaseCurrentContext();
55 GLBINDING_API void releaseContext(ContextHandle context);
56 
57 
58 } // namespace glbinding
Contains all the classes of glbinding.
std::function< void(ContextHandle)> ContextSwitchCallback
The signature of the context switch callback.
Definition: glbinding.h:28
GLBINDING_API void removeCallbackMask(CallbackMask mask)
GLBINDING_API void setCallbackMask(CallbackMask mask)
CallbackMask
The CallbackMask is a bitfield to encode the states of callbacks for the OpenGL API function calls...
Definition: CallbackMask.h:17
GLBINDING_API void resolveFunctions()
GLBINDING_API void setLogCallback(FunctionLogCallback callback)
GLBINDING_API void useCurrentContext()
std::function< void(const AbstractFunction &)> SimpleFunctionCallback
Definition: glbinding.h:25
GLBINDING_API void addCallbackMask(CallbackMask mask)
std::function< ProcAddress(const char *)> GetProcAddress
The signature for the getProcAddress function.
Definition: ProcAddress.h:24
GLBINDING_API void setCallbackMaskExcept(CallbackMask mask, const std::set< std::string > &blackList)
GLBINDING_API void useContext(ContextHandle context)
GLBINDING_API void addCallbackMaskExcept(CallbackMask mask, const std::set< std::string > &blackList)
GLBINDING_API void setBeforeCallback(FunctionCallback callback)
GLBINDING_API void releaseContext(ContextHandle context)
GLBINDING_API FunctionCallback beforeCallback()
GLBINDING_API void registerAdditionalFunction(AbstractFunction *function)
void(*)( ProcAddress)
The generic pointer to an OpenGL function.
Definition: ProcAddress.h:18
GLBINDING_API FunctionCallback afterCallback()
GLBINDING_API void initialize(glbinding::GetProcAddress functionPointerResolver, bool resolveFunctions=true)
GLBINDING_API void addContextSwitchCallback(ContextSwitchCallback callback)
GLBINDING_API ProcAddress resolveFunction(const char *name)
The AbstractFunction represents an OpenGL API function by its name and entry point after dynamic addr...
Definition: AbstractFunction.h:29
GLBINDING_API SimpleFunctionCallback unresolvedCallback()
std::function< void(FunctionCall *)> FunctionLogCallback
Definition: glbinding.h:27
long long int ContextHandle
Definition: ContextHandle.h:9
GLBINDING_API void setUnresolvedCallback(SimpleFunctionCallback callback)
GLBINDING_API FunctionLogCallback logCallback()
std::function< void(const FunctionCall &)> FunctionCallback
Definition: glbinding.h:26
GLBINDING_API void removeCallbackMaskExcept(CallbackMask mask, const std::set< std::string > &blackList)
GLBINDING_API void releaseCurrentContext()
GLBINDING_API void setAfterCallback(FunctionCallback callback)