VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes
makVrv::DtBindingManager Class Reference

Manage interface block bindings. More...

Inheritance diagram for makVrv::DtBindingManager:
Inheritance graph
[legend]

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 DtBindingManagerinstance (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 charosgMaterialUniformBlock
 
static const charosgAlphaThresholdBlock
 
static const charosgTransformStackBlock
 
static const charvrvPerChannelUniformBlock
 
static const charvrvLightGridBlock
 
static const charvrvLightDataBlock
 
static const charvrvTileLightIndexList
 
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...
 

Detailed Description

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.

Member Typedef Documentation

typedef std::map<std::string, std::pair<DtBufferType, GLuint> > makVrv::DtBindingManager::BindingMap
protected
typedef BindingMap::const_iterator makVrv::DtBindingManager::const_iterator

Constructor & Destructor Documentation

makVrv::DtBindingManager::DtBindingManager ( )

CTOR.

Member Function Documentation

static DtBindingManager& makVrv::DtBindingManager::instance ( DtDe )
static

Get an instance of the shared settings manager from the DtDe;.

const_iterator makVrv::DtBindingManager::cbegin ( ) const
inline

Return constant_iterator to map begin.

const_iterator makVrv::DtBindingManager::cend ( ) const
inline

Return constant_iterator to map end.

virtual GLuint makVrv::DtBindingManager::binding ( const std::string &  name) const
virtual

query binding for given name

virtual GLuint makVrv::DtBindingManager::binding ( const std::string &  name,
int  index 
) const
virtual

query binding for given name and index

virtual GLuint makVrv::DtBindingManager::binding ( const_iterator  it) const
virtual

query binding given an iterator

virtual DtBufferType makVrv::DtBindingManager::type ( const_iterator  it) const
virtual

query buffer type for given iterator

virtual GLenum makVrv::DtBindingManager::glBlockType ( const_iterator  it) const
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 std::string makVrv::DtBindingManager::name ( const std::string &  name)
static

query interface block name for given string

static std::string makVrv::DtBindingManager::name ( const std::string &  name,
int  index 
)
static

query interface block name given binding base name and index

virtual const std::string& makVrv::DtBindingManager::name ( const_iterator  it) const
virtual

query interface block name given iterator

virtual void makVrv::DtBindingManager::bindBlocks ( GLuint  programId) const
virtual

Bind interface blocks for the given program ID.

This need only be done at program creation time, unless reset via some other mechanism.

static std::string makVrv::DtBindingManager::indexedName ( const std::string &  name,
int  index 
)
staticprotected

generate indexed name by appending index number

void makVrv::DtBindingManager::initializeBlockBindings ( )
protected

initialize the block bindings

Member Data Documentation

const char* makVrv::DtBindingManager::osgMaterialUniformBlock
static
const char* makVrv::DtBindingManager::osgAlphaThresholdBlock
static
const char* makVrv::DtBindingManager::osgTransformStackBlock
static
const char* makVrv::DtBindingManager::vrvPerChannelUniformBlock
static
const char* makVrv::DtBindingManager::vrvLightGridBlock
static
const char* makVrv::DtBindingManager::vrvLightDataBlock
static
const char* makVrv::DtBindingManager::vrvTileLightIndexList
static
const int makVrv::DtBindingManager::theLightBlockBase = 6
static
const int makVrv::DtBindingManager::theLightBlockCount = 6
static
BindingMap makVrv::DtBindingManager::bindingMap
protected

Map of binding names to bindings.


The documentation for this class was generated from the following file:

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)