glbinding  3.3.0.0
A C++ binding for the OpenGL API, generated using the gl.xml specification.
Loading...
Searching...
No Matches
glbinding Namespace Reference

Contains all the classes of glbinding. More...

Namespaces

namespace  aux
 

Classes

class  AbstractFunction
 The AbstractFunction represents an OpenGL API function by its name and entry point after dynamic address resolution. More...
 
class  AbstractState
 The State struct represents the configuration of a single OpenGL function for one thread. This includes the driver function pointer (is allowed to differ between contexts) and the callback mask. More...
 
class  AbstractValue
 The AbstractValue class represents the superclass of a printable wrapper around a data type. More...
 
class  Binding
 The main interface to handle additional features to OpenGL functions besides regular function calls. More...
 
class  Boolean8
 Boolean type based on an 8-bit integer. More...
 
struct  CallbackType
 A callback signature with return type and multiple arguments. More...
 
struct  CallbackType< void, Arguments... >
 A callback signature with multiple arguments but no return type. More...
 
class  Function
 The Function represents an OpenGL API function with additional features. More...
 
class  FunctionCall
 A FunctionCall represents a function call of an OpenGL API function, including the parameter and return values. More...
 
struct  FunctionHelper
 Helper struct for calling GL functions and registered callbacks. More...
 
struct  intersect_SharedBitfield
 Break condition for the SharedBitfield intersection. More...
 
struct  intersect_SharedBitfield< SharedBitfield< T, Types... >, SharedBitfield< OtherTypes... > >
 The SharedBitfield type list intersection. More...
 
struct  is_member_of_SharedBitfield
 Break condition for the is_member_of_SharedBitfield metaprogramming. More...
 
struct  is_member_of_SharedBitfield< T, U, Types... >
 Test condition and recursion for the is_member_of_SharedBitfield metaprogramming. More...
 
struct  prepend_to_SharedBitfield
 Break condition for the SharedBitfield type concatenation. More...
 
struct  prepend_to_SharedBitfield< T, SharedBitfield< Types... > >
 The SharedBitfield type concatenation. More...
 
class  SharedBitfield
 A representation of a bitfield value that could be member of multiple bitfield types as allowed in OpenGL. More...
 
class  SharedBitfield< Type >
 A representation of a bitfield value that could be member of multiple bitfield types as allowed in OpenGL. This template is the break condition of a former SharedBitfield that got reduced to just one valid bitfield type through operations. More...
 
class  SharedBitfield< Type, Types... >
 A representation of a bitfield value that could be member of multiple bitfield types as allowed in OpenGL. More...
 
class  SharedBitfield<>
 Invalid SharedBitfield class as it contains no valid bitfield types. More...
 
class  SharedBitfieldBase
 The base class of a SharedBitfield, containing the actual (and convertible) bitfield value. More...
 
class  State
 The State class represents the configuration of a function for one thread. This includes the driver function pointer (is allowed to differ between contexts) and the callback mask. More...
 
class  Value
 The Value class represents a printable wrapper around an OpenGL data type. More...
 
class  Version
 The Version class represents an OpenGL feature, consisting of major version and minor version, excluding the profile information. More...
 

Typedefs

using ContextHandle = long long int
 Type for storing context handles.
 
using SimpleFunctionCallback = std::function<void(const AbstractFunction &)>
 The signature of the unresolved callback.
 
using FunctionCallback = std::function<void(const FunctionCall &)>
 The signature of the before and after callbacks.
 
using FunctionLogCallback = std::function<void(FunctionCall *)>
 The signature of the log callback.
 
using ContextSwitchCallback = std::function<void(ContextHandle)>
 The signature of the context switch callback.
 
using ProcAddress = void(*)()
 The generic pointer to a function.
 
using GetProcAddress = std::function<ProcAddress(const char*)>
 The signature for the getProcAddress function.
 

Enumerations

enum class  CallbackMask : unsigned char {
  None = 0 , Unresolved = 1 << 0 , Before = 1 << 1 , After = 1 << 2 ,
  Parameters = 1 << 3 , ReturnValue = 1 << 4 , Logging = 1 << 5 , Timestamp = 1 << 6 ,
  ParametersAndReturnValue = Parameters | ReturnValue , BeforeAndAfter = Before | After , All = Unresolved | Before | After | Parameters | ReturnValue | Logging | Timestamp
}
 The CallbackMask is a bitfield to encode the states of callbacks for the OpenGL API function calls. More...
 

Functions

GLBINDING_CONSTEXPR CallbackMask operator~ (CallbackMask a)
 External operator for bit-wise CallbackMask inverting.
 
GLBINDING_CONSTEXPR CallbackMask operator| (CallbackMask a, CallbackMask b)
 External operator for bit-wise 'or' of CallbackMasks.
 
GLBINDING_CONSTEXPR CallbackMask operator& (CallbackMask a, CallbackMask b)
 External operator for bit-wise 'and' of CallbackMasks.
 
GLBINDING_CONSTEXPR CallbackMask operator^ (CallbackMask a, CallbackMask b)
 External operator for bit-wise 'xor' of CallbackMasks.
 
CallbackMaskoperator|= (CallbackMask &a, CallbackMask b)
 External operator for bit-wise 'or' assignment of CallbackMasks.
 
CallbackMaskoperator&= (CallbackMask &a, CallbackMask b)
 External operator for bit-wise 'and' assignment of CallbackMasks.
 
CallbackMaskoperator^= (CallbackMask &a, CallbackMask b)
 External operator for bit-wise 'xor' assignment of CallbackMasks.
 
ProcAddress getProcAddress (const char *name)
 Default getProcAddress implementation using libdl (Unix) and LoadLibrary (Windows).
 
void initialize (glbinding::GetProcAddress functionPointerResolver, bool resolveFunctions=true)
 Initializes the binding for the current active OpenGL context.
 
void initialize (ContextHandle context, glbinding::GetProcAddress functionPointerResolver, bool useContext=true, bool resolveFunctions=true)
 Initializes the binding for the current active OpenGL context.
 
void useCurrentContext ()
 Update the current context state in glbinding.
 
void useContext (ContextHandle context)
 Update the current context state in glbinding.
 
void releaseCurrentContext ()
 Removes the current context from the state of glbinding.
 
void releaseContext (ContextHandle context)
 Removes the current context from the state of glbinding.
 
void registerAdditionalFunction (AbstractFunction *function)
 Registers an additional function for the additional features.
 
ProcAddress resolveFunction (const char *name)
 Resolve a single function pointer by given name.
 
void resolveFunctions ()
 Resolves the funtion pointers of all registered OpenGL functions immediately for the current context.
 
void setCallbackMask (CallbackMask mask)
 Updates the callback mask of all registered OpenGL functions in the current state.
 
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.
 
void addCallbackMask (CallbackMask mask)
 Updates the callback mask of all registered OpenGL functions in the current state to include the passed CallbackMask.
 
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 passed CallbackMask, excluding the blacklisted functions.
 
void removeCallbackMask (CallbackMask mask)
 Updates the callback mask of all registered OpenGL functions in the current state to exclude the passed CallbackMask.
 
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 passed CallbackMask, excluding the blacklisted functions.
 
SimpleFunctionCallback unresolvedCallback ()
 Unresolved callback accessor.
 
void setUnresolvedCallback (SimpleFunctionCallback callback)
 Updates the unresolved callback that is called upon invocation of an OpenGL function which have no counterpart in the OpenGL driver.
 
FunctionCallback beforeCallback ()
 Before callback accessor.
 
void setBeforeCallback (FunctionCallback callback)
 Updates the before callback that is called before the actual OpenGL function invocation.
 
FunctionCallback afterCallback ()
 After callback accessor.
 
void setAfterCallback (FunctionCallback callback)
 Updates the after callback that is called after the actual OpenGL function invocation.
 
FunctionLogCallback logCallback ()
 Logging callback accessor.
 
void setLogCallback (FunctionLogCallback callback)
 Updates the logging callback that is called to log the actual OpenGL function invocation.
 
void addContextSwitchCallback (ContextSwitchCallback callback)
 Registers an additional callback that gets called each time the context is switched using the useContext method.
 
template<typename Enum , typename ConvertibleEnum >
GLBINDING_CONSTEXPR std::enable_if< std::is_base_of< SharedBitfieldBase< typenamestd::underlying_type< typenamestd::enable_if< std::is_enum< Enum >::value, Enum >::type >::type >, ConvertibleEnum >::value, Enum >::type operator| (Enum a, ConvertibleEnum b)
 External bit-wise 'or' operator for bitfield types on the left hand side.
 
template<typename ConvertibleEnum , typename Enum >
GLBINDING_CONSTEXPR std::enable_if< std::is_base_of< SharedBitfieldBase< typenamestd::underlying_type< typenamestd::enable_if< std::is_enum< Enum >::value, Enum >::type >::type >, ConvertibleEnum >::value, Enum >::type operator| (ConvertibleEnum a, Enum b)
 External bit-wise 'or' operator for bitfield types on the right hand side.
 
template<typename Enum , typename ConvertibleEnum >
std::enable_if< std::is_base_of< SharedBitfieldBase< typenamestd::underlying_type< typenamestd::enable_if< std::is_enum< Enum >::value, Enum >::type >::type >, ConvertibleEnum >::value, Enum >::type operator|= (Enum &a, ConvertibleEnum b)
 External bit-wise 'or' assignment operator for bitfield types on the left hand side.
 
template<typename Enum , typename ConvertibleEnum >
GLBINDING_CONSTEXPR std::enable_if< std::is_base_of< SharedBitfieldBase< typenamestd::underlying_type< typenamestd::enable_if< std::is_enum< Enum >::value, Enum >::type >::type >, ConvertibleEnum >::value, Enum >::type operator& (Enum a, ConvertibleEnum b)
 External bit-wise 'and' operator for bitfield types on the left hand side.
 
template<typename ConvertibleEnum , typename Enum >
GLBINDING_CONSTEXPR std::enable_if< std::is_base_of< SharedBitfieldBase< typenamestd::underlying_type< typenamestd::enable_if< std::is_enum< Enum >::value, Enum >::type >::type >, ConvertibleEnum >::value, Enum >::type operator& (ConvertibleEnum a, Enum b)
 External bit-wise 'and' operator for bitfield types on the right hand side.
 
template<typename Enum , typename ConvertibleEnum >
std::enable_if< std::is_base_of< SharedBitfieldBase< typenamestd::underlying_type< typenamestd::enable_if< std::is_enum< Enum >::value, Enum >::type >::type >, ConvertibleEnum >::value, Enum >::type operator&= (Enum &a, ConvertibleEnum b)
 External bit-wise 'and' assignment operator for bitfield types on the left hand side.
 
template<typename Enum , typename ConvertibleEnum >
GLBINDING_CONSTEXPR std::enable_if< std::is_base_of< SharedBitfieldBase< typenamestd::underlying_type< typenamestd::enable_if< std::is_enum< Enum >::value, Enum >::type >::type >, ConvertibleEnum >::value, Enum >::type operator^ (Enum a, ConvertibleEnum b)
 External bit-wise 'xor' operator for bitfield types on the left hand side.
 
template<typename ConvertibleEnum , typename Enum >
GLBINDING_CONSTEXPR std::enable_if< std::is_base_of< SharedBitfieldBase< typenamestd::underlying_type< typenamestd::enable_if< std::is_enum< Enum >::value, Enum >::type >::type >, ConvertibleEnum >::value, Enum >::type operator^ (ConvertibleEnum a, Enum b)
 External bit-wise 'xor' operator for bitfield types on the right hand side.
 
template<typename Enum , typename ConvertibleEnum >
std::enable_if< std::is_base_of< SharedBitfieldBase< typenamestd::underlying_type< typenamestd::enable_if< std::is_enum< Enum >::value, Enum >::type >::type >, ConvertibleEnum >::value, Enum >::type operator^= (Enum &a, ConvertibleEnum b)
 External bit-wise 'xor' assignment operator for bitfield types on the left hand side.
 
template<typename Argument >
std::unique_ptr< AbstractValuecreateValue (const Argument &argument)
 A wrapper around the type deduction and memory allocation of a specific argument.
 
template<typename... Arguments>
std::vector< std::unique_ptr< AbstractValue > > createValues (Arguments &&... arguments)
 A wrapper around the creation of a vector of arguments.
 
template<typename T >
std::ostream & operator<< (std::ostream &stream, const Value< T > &value)
 Generic ostream operator for the Value template.
 
template<typename T >
std::ostream & operator<< (std::ostream &stream, const Value< T * > &value)
 Generic ostream operator for the Value template with pointer types.
 
template<>
std::ostream & operator<< (std::ostream &stream, const Value< gl::GLenum > &value)
 A specialized ostream operator for the gl::GLenum Value template.
 
template<>
std::ostream & operator<< (std::ostream &stream, const Value< gl::GLboolean > &value)
 A specialized ostream operator for the gl::GLenum Value template.
 
template<>
std::ostream & operator<< (std::ostream &stream, const Value< const char * > &value)
 A specialized ostream operator for the const char * Value template.
 
template<>
std::ostream & operator<< (std::ostream &stream, const Value< gl::GLubyte * > &value)
 A specialized ostream operator for the GLubyte * Value template.
 
template<>
std::ostream & operator<< (std::ostream &stream, const Value< gl::GLchar * > &value)
 A specialized ostream operator for the GLchar * Value template.
 
std::ostream & operator<< (std::ostream &stream, const Version &version)
 The operator to allow Versions to be printed onto a std::ostream.
 
std::ostream & operator<< (std::ostream &stream, const AbstractValue *value)
 The operator to allow AbstractValues to be printed onto a std::ostream.
 

Detailed Description

Contains all the classes of glbinding.

TODO: Detailed documentation for glbinding here.

Typedef Documentation

◆ ContextHandle

using glbinding::ContextHandle = long long int

Type for storing context handles.

◆ SimpleFunctionCallback

using glbinding::SimpleFunctionCallback = std::function<void(const AbstractFunction &)>

The signature of the unresolved callback.

◆ FunctionCallback

using glbinding::FunctionCallback = std::function<void(const FunctionCall &)>

The signature of the before and after callbacks.

◆ FunctionLogCallback

using glbinding::FunctionLogCallback = std::function<void(FunctionCall *)>

The signature of the log callback.

◆ ContextSwitchCallback

using glbinding::ContextSwitchCallback = std::function<void(ContextHandle)>

The signature of the context switch callback.

◆ ProcAddress

using glbinding::ProcAddress = void(*)()

The generic pointer to a function.

◆ GetProcAddress

using glbinding::GetProcAddress = std::function<ProcAddress(const char*)>

The signature for the getProcAddress function.

Enumeration Type Documentation

◆ CallbackMask

enum class glbinding::CallbackMask : unsigned char
strong

The CallbackMask is a bitfield to encode the states of callbacks for the OpenGL API function calls.

Enumerator
None 

All callbacks are disabled.

Unresolved 

Enables the callback for unresolved function calls.

Before 

Enables the before callbacks.

After 

Enables the after callbacks.

Parameters 

Enables the provision of parameter values in the before and after callbacks.

ReturnValue 

Enables the provision of a return value in the after callback.

Logging 

Enables logging.

Timestamp 

Enables the provision of the timestamp.

ParametersAndReturnValue 

Shorthand for Parameters | ReturnValue

BeforeAndAfter 

Shorthand for Before | After

All 

Shorthand for all callbacks.

Function Documentation

◆ operator~()

GLBINDING_CONSTEXPR CallbackMask glbinding::operator~ ( CallbackMask a)
inline

External operator for bit-wise CallbackMask inverting.

Parameters
[in]aThe CallbackMask to invert
Returns
The inverted CallbackMask

◆ operator|() [1/3]

GLBINDING_CONSTEXPR CallbackMask glbinding::operator| ( CallbackMask a,
CallbackMask b )
inline

External operator for bit-wise 'or' of CallbackMasks.

Parameters
[in]aThe first CallbackMask
[in]bThe second CallbackMask
Returns
The compound CallbackMask

◆ operator&() [1/3]

GLBINDING_CONSTEXPR CallbackMask glbinding::operator& ( CallbackMask a,
CallbackMask b )
inline

External operator for bit-wise 'and' of CallbackMasks.

Parameters
[in]aThe first CallbackMask
[in]bThe second CallbackMask
Returns
The compound CallbackMask

◆ operator^() [1/3]

GLBINDING_CONSTEXPR CallbackMask glbinding::operator^ ( CallbackMask a,
CallbackMask b )
inline

External operator for bit-wise 'xor' of CallbackMasks.

Parameters
[in]aThe first CallbackMask
[in]bThe second CallbackMask
Returns
The compound CallbackMask

◆ operator|=() [1/2]

CallbackMask & glbinding::operator|= ( CallbackMask & a,
CallbackMask b )
inline

External operator for bit-wise 'or' assignment of CallbackMasks.

Parameters
[in]aThe first CallbackMask
[in]bThe second CallbackMask
Returns
The first, now manipulated, CallbackMask

◆ operator&=() [1/2]

CallbackMask & glbinding::operator&= ( CallbackMask & a,
CallbackMask b )
inline

External operator for bit-wise 'and' assignment of CallbackMasks.

Parameters
[in]aThe first CallbackMask
[in]bThe second CallbackMask
Returns
The first, now manipulated, CallbackMask

◆ operator^=() [1/2]

CallbackMask & glbinding::operator^= ( CallbackMask & a,
CallbackMask b )
inline

External operator for bit-wise 'xor' assignment of CallbackMasks.

Parameters
[in]aThe first CallbackMask
[in]bThe second CallbackMask
Returns
The first, now manipulated, CallbackMask

◆ getProcAddress()

ProcAddress glbinding::getProcAddress ( const char * name)

Default getProcAddress implementation using libdl (Unix) and LoadLibrary (Windows).

Parameters
[in]nameThe name of the OpenGL function
Returns
The resolved function pointer
Remarks
Using glbinding::getProcAddress is provided for convenience only. Please don't use this in new code. Instead, use an external function resolution callback, e.g.,
  • wglGetProcAddress
  • glxGetProcAddress
  • glfwGetProcAddress
  • QOpenGlContext::getProcAddress

◆ initialize() [1/2]

void glbinding::initialize ( glbinding::GetProcAddress functionPointerResolver,
bool resolveFunctions = true )

Initializes the binding for the current active OpenGL context.

Parameters
[in]functionPointerResolverA function pointer to resolve binding functions for this context. If nullptr is passed, glbinding::getProcAddress is used for convenience.
[in]resolveFunctions(optional) Whether to resolve function pointers lazily (resolveFunctions = false) or immediately
Remarks
This function is a convenience interface for applications that use only one OpenGL context. If you want to use more than one context, use explicit context identifiers and the dedicated Initialization interface initialize(ContextHandle, glbinding::GetProcAddress, bool, bool).
After this call, the initialized context is already set active for the current thread.
A functionPointerResolver with value 'nullptr' will get initialized with the function pointer from the initial thread.
Using glbinding::getProcAddress is provided for convenience only. Please don't use this in new code. Instead, use an external function resolution callback, e.g.,
  • wglGetProcAddress
  • glxGetProcAddress
  • glfwGetProcAddress
  • QOpenGlContext::getProcAddress

◆ initialize() [2/2]

void glbinding::initialize ( ContextHandle context,
glbinding::GetProcAddress functionPointerResolver,
bool useContext = true,
bool resolveFunctions = true )

Initializes the binding for the current active OpenGL context.

Parameters
[in]contextThe context handle of the context to initialize
[in]functionPointerResolverA function pointer to resolve binding functions for this context
[in]useContextWhether to set the context active (useContext = true) after the initialization
[in]resolveFunctions(optional) Whether to resolve function pointers lazily (resolveFunctions = false) or immediately
Remarks
A functionPointerResolver with value 'nullptr' will get initialized with the function pointer from the initial thread.

◆ useCurrentContext()

void glbinding::useCurrentContext ( )

Update the current context state in glbinding.

Remarks
This function queries the driver for the current OpenGL context

◆ useContext()

void glbinding::useContext ( ContextHandle context)

Update the current context state in glbinding.

Parameters
[in]contextThe context handle of the context to set current

◆ releaseCurrentContext()

void glbinding::releaseCurrentContext ( )

Removes the current context from the state of glbinding.

Remarks
This function queries the driver for the current OpenGL context

◆ releaseContext()

void glbinding::releaseContext ( ContextHandle context)

Removes the current context from the state of glbinding.

Parameters
[in]contextThe context handle of the context to remove

◆ registerAdditionalFunction()

void glbinding::registerAdditionalFunction ( AbstractFunction * function)

Registers an additional function for the additional features.

Parameters
[in]functionThe function to register
Remarks
The additional features are callbacks, and used in multi-context environments

◆ resolveFunction()

ProcAddress glbinding::resolveFunction ( const char * name)

Resolve a single function pointer by given name.

Parameters
[in]nameThe name of the function

◆ resolveFunctions()

void glbinding::resolveFunctions ( )

Resolves the funtion pointers of all registered OpenGL functions immediately for the current context.

◆ setCallbackMask()

void glbinding::setCallbackMask ( CallbackMask mask)

Updates the callback mask of all registered OpenGL functions in the current state.

Parameters
[in]maskThe new CallbackMask

◆ setCallbackMaskExcept()

void glbinding::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.

Parameters
[in]maskThe new CallbackMask
[in]blackListThe blacklist of functions to exclude in this update

◆ addCallbackMask()

void glbinding::addCallbackMask ( CallbackMask mask)

Updates the callback mask of all registered OpenGL functions in the current state to include the passed CallbackMask.

Parameters
[in]maskThe CallbackMask to include

◆ addCallbackMaskExcept()

void glbinding::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 passed CallbackMask, excluding the blacklisted functions.

Parameters
[in]maskThe CallbackMask to include
[in]blackListThe blacklist of functions to exclude in this update

◆ removeCallbackMask()

void glbinding::removeCallbackMask ( CallbackMask mask)

Updates the callback mask of all registered OpenGL functions in the current state to exclude the passed CallbackMask.

Parameters
[in]maskThe CallbackMask to exclude

◆ removeCallbackMaskExcept()

void glbinding::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 passed CallbackMask, excluding the blacklisted functions.

Parameters
[in]maskThe CallbackMask to exclude
[in]blackListThe blacklist of functions to exclude in this update

◆ unresolvedCallback()

SimpleFunctionCallback glbinding::unresolvedCallback ( )

Unresolved callback accessor.

Returns
The callback to use instead of unresolved function calls
Remarks
Keep in mind that in addition to a registered callback, the callback mask of the current Function has to include the After flag to enable the callback

◆ setUnresolvedCallback()

void glbinding::setUnresolvedCallback ( SimpleFunctionCallback callback)

Updates the unresolved callback that is called upon invocation of an OpenGL function which have no counterpart in the OpenGL driver.

Parameters
[in]callbackThe callback to use instead of unresolved function calls
Remarks
This callback is registered globally across all states.
Keep in mind that in addition to a registered callback, the callback mask of the current Function has to include the Unresolved flag to enable the callback

◆ beforeCallback()

FunctionCallback glbinding::beforeCallback ( )

Before callback accessor.

Returns
The callback to use before an OpenGL function call
Remarks
Keep in mind that in addition to a registered callback, the callback mask of the current Function has to include the After flag to enable the callback

◆ setBeforeCallback()

void glbinding::setBeforeCallback ( FunctionCallback callback)

Updates the before callback that is called before the actual OpenGL function invocation.

Parameters
[in]callbackThe callback to use before an OpenGL function call
Remarks
This callback is registered globally across all states.
Keep in mind that in addition to a registered callback, the callback mask of the current Function has to include the Before flag to enable the callback

◆ afterCallback()

FunctionCallback glbinding::afterCallback ( )

After callback accessor.

Returns
The callback to use after an OpenGL function call
Remarks
Keep in mind that in addition to a registered callback, the callback mask of the current Function has to include the After flag to enable the callback

◆ setAfterCallback()

void glbinding::setAfterCallback ( FunctionCallback callback)

Updates the after callback that is called after the actual OpenGL function invocation.

Parameters
[in]callbackThe callback to use after an OpenGL function call
Remarks
This callback is registered globally across all states.
Keep in mind that in addition to a registered callback, the callback mask of the current Function has to include the After flag to enable the callback

◆ logCallback()

FunctionLogCallback glbinding::logCallback ( )

Logging callback accessor.

Returns
The callback to use for logging an OpenGL function call
Remarks
Keep in mind that in addition to a registered callback, the callback mask of the current Function has to include the Logging flag to enable the callback

◆ setLogCallback()

void glbinding::setLogCallback ( FunctionLogCallback callback)

Updates the logging callback that is called to log the actual OpenGL function invocation.

Parameters
[in]callbackThe callback to use for logging an OpenGL function call
Remarks
This callback is registered globally across all states.
Keep in mind that in addition to a registered callback, the callback mask of the current Function has to include the Logging flag to enable the callback

◆ addContextSwitchCallback()

void glbinding::addContextSwitchCallback ( ContextSwitchCallback callback)

Registers an additional callback that gets called each time the context is switched using the useContext method.

Remarks
There may be multiple context switch callbacks registered at once

◆ operator|() [2/3]

template<typename Enum , typename ConvertibleEnum >
GLBINDING_CONSTEXPR std::enable_if< std::is_base_of< SharedBitfieldBase< typenamestd::underlying_type< typenamestd::enable_if< std::is_enum< Enum >::value, Enum >::type >::type >, ConvertibleEnum >::value, Enum >::type glbinding::operator| ( Enum a,
ConvertibleEnum b )
inline

External bit-wise 'or' operator for bitfield types on the left hand side.

Template Parameters
EnumThe type of the bitfield
ConvertibleEnumThe SharedBitfield instance
Parameters
[in]aThe value of the bitfield
[in]bThe value of the SharedBitfield
Returns
A SharedBitfield with computed value
Remarks
This method is not visible to the compiler if the bitfield type is not in the list of types of the SharedBitfield and thus results in a compiler error

◆ operator|() [3/3]

template<typename ConvertibleEnum , typename Enum >
GLBINDING_CONSTEXPR std::enable_if< std::is_base_of< SharedBitfieldBase< typenamestd::underlying_type< typenamestd::enable_if< std::is_enum< Enum >::value, Enum >::type >::type >, ConvertibleEnum >::value, Enum >::type glbinding::operator| ( ConvertibleEnum a,
Enum b )
inline

External bit-wise 'or' operator for bitfield types on the right hand side.

Template Parameters
ConvertibleEnumThe SharedBitfield instance
EnumThe type of the bitfield
Parameters
[in]aThe value of the SharedBitfield
[in]bThe value of the bitfield
Returns
A SharedBitfield with computed value
Remarks
This method is not visible to the compiler if the bitfield type is not in the list of types of the SharedBitfield and thus results in a compiler error

◆ operator|=() [2/2]

template<typename Enum , typename ConvertibleEnum >
std::enable_if< std::is_base_of< SharedBitfieldBase< typenamestd::underlying_type< typenamestd::enable_if< std::is_enum< Enum >::value, Enum >::type >::type >, ConvertibleEnum >::value, Enum >::type glbinding::operator|= ( Enum & a,
ConvertibleEnum b )
inline

External bit-wise 'or' assignment operator for bitfield types on the left hand side.

Template Parameters
EnumThe type of the bitfield
ConvertibleEnumThe SharedBitfield instance
Parameters
[in]aThe value of the bitfield
[in]bThe value of the SharedBitfield
Returns
The new value of the bitfield
Remarks
This method is not visible to the compiler if the bitfield type is not in the list of types of the SharedBitfield and thus results in a compiler error

◆ operator&() [2/3]

template<typename Enum , typename ConvertibleEnum >
GLBINDING_CONSTEXPR std::enable_if< std::is_base_of< SharedBitfieldBase< typenamestd::underlying_type< typenamestd::enable_if< std::is_enum< Enum >::value, Enum >::type >::type >, ConvertibleEnum >::value, Enum >::type glbinding::operator& ( Enum a,
ConvertibleEnum b )
inline

External bit-wise 'and' operator for bitfield types on the left hand side.

Template Parameters
EnumThe type of the bitfield
ConvertibleEnumThe SharedBitfield instance
Parameters
[in]aThe value of the bitfield
[in]bThe value of the SharedBitfield
Returns
A SharedBitfield with computed value
Remarks
This method is not visible to the compiler if the bitfield type is not in the list of types of the SharedBitfield and thus results in a compiler error

◆ operator&() [3/3]

template<typename ConvertibleEnum , typename Enum >
GLBINDING_CONSTEXPR std::enable_if< std::is_base_of< SharedBitfieldBase< typenamestd::underlying_type< typenamestd::enable_if< std::is_enum< Enum >::value, Enum >::type >::type >, ConvertibleEnum >::value, Enum >::type glbinding::operator& ( ConvertibleEnum a,
Enum b )
inline

External bit-wise 'and' operator for bitfield types on the right hand side.

Template Parameters
ConvertibleEnumThe SharedBitfield instance
EnumThe type of the bitfield
Parameters
[in]aThe value of the SharedBitfield
[in]bThe value of the bitfield
Returns
A SharedBitfield with computed value
Remarks
This method is not visible to the compiler if the bitfield type is not in the list of types of the SharedBitfield and thus results in a compiler error

◆ operator&=() [2/2]

template<typename Enum , typename ConvertibleEnum >
std::enable_if< std::is_base_of< SharedBitfieldBase< typenamestd::underlying_type< typenamestd::enable_if< std::is_enum< Enum >::value, Enum >::type >::type >, ConvertibleEnum >::value, Enum >::type glbinding::operator&= ( Enum & a,
ConvertibleEnum b )
inline

External bit-wise 'and' assignment operator for bitfield types on the left hand side.

Template Parameters
EnumThe type of the bitfield
ConvertibleEnumThe SharedBitfield instance
Parameters
[in]aThe value of the bitfield
[in]bThe value of the SharedBitfield
Returns
The new value of the bitfield
Remarks
This method is not visible to the compiler if the bitfield type is not in the list of types of the SharedBitfield and thus results in a compiler error

◆ operator^() [2/3]

template<typename Enum , typename ConvertibleEnum >
GLBINDING_CONSTEXPR std::enable_if< std::is_base_of< SharedBitfieldBase< typenamestd::underlying_type< typenamestd::enable_if< std::is_enum< Enum >::value, Enum >::type >::type >, ConvertibleEnum >::value, Enum >::type glbinding::operator^ ( Enum a,
ConvertibleEnum b )
inline

External bit-wise 'xor' operator for bitfield types on the left hand side.

Template Parameters
EnumThe type of the bitfield
ConvertibleEnumThe SharedBitfield instance
Parameters
[in]aThe value of the bitfield
[in]bThe value of the SharedBitfield
Returns
A SharedBitfield with computed value
Remarks
This method is not visible to the compiler if the bitfield type is not in the list of types of the SharedBitfield and thus results in a compiler error

◆ operator^() [3/3]

template<typename ConvertibleEnum , typename Enum >
GLBINDING_CONSTEXPR std::enable_if< std::is_base_of< SharedBitfieldBase< typenamestd::underlying_type< typenamestd::enable_if< std::is_enum< Enum >::value, Enum >::type >::type >, ConvertibleEnum >::value, Enum >::type glbinding::operator^ ( ConvertibleEnum a,
Enum b )
inline

External bit-wise 'xor' operator for bitfield types on the right hand side.

Template Parameters
ConvertibleEnumThe SharedBitfield instance
EnumThe type of the bitfield
Parameters
[in]aThe value of the SharedBitfield
[in]bThe value of the bitfield
Returns
A SharedBitfield with computed value
Remarks
This method is not visible to the compiler if the bitfield type is not in the list of types of the SharedBitfield and thus results in a compiler error

◆ operator^=() [2/2]

template<typename Enum , typename ConvertibleEnum >
std::enable_if< std::is_base_of< SharedBitfieldBase< typenamestd::underlying_type< typenamestd::enable_if< std::is_enum< Enum >::value, Enum >::type >::type >, ConvertibleEnum >::value, Enum >::type glbinding::operator^= ( Enum & a,
ConvertibleEnum b )
inline

External bit-wise 'xor' assignment operator for bitfield types on the left hand side.

Template Parameters
EnumThe type of the bitfield
ConvertibleEnumThe SharedBitfield instance
Parameters
[in]aThe value of the bitfield
[in]bThe value of the SharedBitfield
Returns
The new value of the bitfield
Remarks
This method is not visible to the compiler if the bitfield type is not in the list of types of the SharedBitfield and thus results in a compiler error

◆ createValue()

template<typename Argument >
std::unique_ptr< AbstractValue > glbinding::createValue ( const Argument & argument)
inline

A wrapper around the type deduction and memory allocation of a specific argument.

Template Parameters
ArgumentThe type of the argument, usually an OpenGL data type.
Parameters
[in]argumentThe argument to wrap into a Value of type Argument.

Referenced by glbinding::FunctionHelper< ReturnType, Arguments >::call().

◆ createValues()

template<typename... Arguments>
std::vector< std::unique_ptr< AbstractValue > > glbinding::createValues ( Arguments &&... arguments)
inline

A wrapper around the creation of a vector of arguments.

Template Parameters
ArgumentsThe types of the arguments, usually OpenGL data types
Parameters
[in]argumentsThe variadic parameter list of all arguments to convert
Remarks
Internally uses the createValue() function

Referenced by glbinding::Function< void, gl::GLenum, gl::GLfloat >::Function(), and glbinding::FunctionHelper< ReturnType, Arguments >::call().

◆ operator<<() [1/9]

template<typename T >
std::ostream & glbinding::operator<< ( std::ostream & stream,
const Value< T > & value )

Generic ostream operator for the Value template.

References glbinding::Value< T >::value().

◆ operator<<() [2/9]

template<typename T >
std::ostream & glbinding::operator<< ( std::ostream & stream,
const Value< T * > & value )

Generic ostream operator for the Value template with pointer types.

References glbinding::Value< T >::value().

◆ operator<<() [3/9]

template<>
std::ostream & glbinding::operator<< ( std::ostream & stream,
const Value< gl::GLenum > & value )

A specialized ostream operator for the gl::GLenum Value template.

◆ operator<<() [4/9]

template<>
std::ostream & glbinding::operator<< ( std::ostream & stream,
const Value< gl::GLboolean > & value )

A specialized ostream operator for the gl::GLenum Value template.

◆ operator<<() [5/9]

template<>
std::ostream & glbinding::operator<< ( std::ostream & stream,
const Value< const char * > & value )

A specialized ostream operator for the const char * Value template.

◆ operator<<() [6/9]

template<>
std::ostream & glbinding::operator<< ( std::ostream & stream,
const Value< gl::GLubyte * > & value )

A specialized ostream operator for the GLubyte * Value template.

◆ operator<<() [7/9]

template<>
std::ostream & glbinding::operator<< ( std::ostream & stream,
const Value< gl::GLchar * > & value )

A specialized ostream operator for the GLchar * Value template.

◆ operator<<() [8/9]

std::ostream & glbinding::operator<< ( std::ostream & stream,
const Version & version )

The operator to allow Versions to be printed onto a std::ostream.

◆ operator<<() [9/9]

std::ostream & glbinding::operator<< ( std::ostream & stream,
const AbstractValue * value )

The operator to allow AbstractValues to be printed onto a std::ostream.