![]() |
VR-Forces 4.8 Class Documentation
|
Manage interface block bindings. More...

Public Types | |
| typedef BindingMap::const_iterator | const_iterator |
Public Member Functions | |
| DtBindingManager () | |
| CTOR. More... | |
| const_iterator | cbegin () const |
| Return constant_iterator to map begin. More... | |
| const_iterator | cend () const |
| Return constant_iterator to map end. More... | |
| virtual GLuint | binding (const std::string &name) const |
| query binding for given name More... | |
| virtual GLuint | binding (const std::string &name, int index) const |
| query binding for given name and index More... | |
| virtual GLuint | binding (const_iterator it) const |
| query binding given an iterator More... | |
| virtual DtBufferType | type (const_iterator it) const |
| query buffer type for given iterator More... | |
| virtual GLenum | glBlockType (const_iterator it) const |
| query GL block (NOT buffer!) type for given iterator More... | |
| void | setBinding (const std::string &name, DtBufferType bufferType, GLuint binding) |
| set binding for given name More... | |
| void | setBinding (const std::string &name, DtBufferType bufferType, int index, GLuint binding) |
| set binding for given name and index More... | |
| virtual const std::string & | name (const_iterator it) const |
| query interface block name given iterator More... | |
| virtual void | bindBlocks (GLuint programId) const |
| Bind interface blocks for the given program ID. More... | |
Public Member Functions inherited from makVrv::DtVirtualBaseClass | |
| DtVirtualBaseClass () | |
| Do nothing constructor. More... | |
| virtual | ~DtVirtualBaseClass () |
| Virtual do nothing destructor. More... | |
Static Public Member Functions | |
| static DtBindingManager & | instance (DtDe &) |
| Get an instance of the shared settings manager from the DtDe;. More... | |
| static std::string | name (const std::string &name) |
| query interface block name for given string More... | |
| static std::string | name (const std::string &name, int index) |
| query interface block name given binding base name and index More... | |
Static Public Attributes | |
| static const char * | osgMaterialUniformBlock |
| static const char * | osgAlphaThresholdBlock |
| static const char * | osgTransformStackBlock |
| static const char * | vrvPerChannelUniformBlock |
| static const char * | vrvLightGridBlock |
| static const char * | vrvLightDataBlock |
| static const char * | vrvTileLightIndexList |
| static const int | theLightBlockBase = 6 |
| static const int | theLightBlockCount = 6 |
Protected Types | |
| typedef std::map< std::string, std::pair< DtBufferType, GLuint > > | BindingMap |
Protected Member Functions | |
| void | initializeBlockBindings () |
| initialize the block bindings More... | |
Static Protected Member Functions | |
| static std::string | indexedName (const std::string &name, int index) |
| generate indexed name by appending index number More... | |
Protected Attributes | |
| BindingMap | bindingMap |
| Map of binding names to bindings. More... | |
Manage interface block bindings.
This knowledge was previously distributed several places in the code. This encapsulates the knowledge of which shader interface block names map to which bindings. It can be used for UBOs and SSBOs, and maybe other bindings later on if it grows to do so. It is only used at setup time, so performance is not critical.
|
protected |
| typedef BindingMap::const_iterator makVrv::DtBindingManager::const_iterator |
| makVrv::DtBindingManager::DtBindingManager | ( | ) |
CTOR.
|
static |
Get an instance of the shared settings manager from the DtDe;.
|
inline |
Return constant_iterator to map begin.
|
inline |
Return constant_iterator to map end.
|
virtual |
query binding for given name
|
virtual |
query binding for given name and index
|
virtual |
query binding given an iterator
|
virtual |
query buffer type for given iterator
|
virtual |
query GL block (NOT buffer!) type for given iterator
| void makVrv::DtBindingManager::setBinding | ( | const std::string & | name, |
| DtBufferType | bufferType, | ||
| GLuint | binding | ||
| ) |
set binding for given name
| void makVrv::DtBindingManager::setBinding | ( | const std::string & | name, |
| DtBufferType | bufferType, | ||
| int | index, | ||
| GLuint | binding | ||
| ) |
set binding for given name and index
|
static |
query interface block name for given string
|
static |
query interface block name given binding base name and index
|
virtual |
query interface block name given iterator
|
virtual |
Bind interface blocks for the given program ID.
This need only be done at program creation time, unless reset via some other mechanism.
|
staticprotected |
generate indexed name by appending index number
|
protected |
initialize the block bindings
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
protected |
Map of binding names to bindings.