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

Manage interface block bindings. More...

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

Public Member Functions

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 void bindBlocks (GLuint programId) const
 Bind interface blocks for the given program ID. More...
 
virtual std::string name (const std::string &name) const
 query interface block name for given string More...
 
virtual std::string name (const std::string &name, int index) const
 query interface block name given binding base name and index 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 Public Attributes

static const int theLightBlockBase = 6
 
static const int theLightBlockCount = 5
 
static const charosgMaterialUniformBlock
 
static const charosgAlphaThresholdBlock
 
static const charosgTransformStackBlock
 
static const charvrvPerChannelUniformBlock
 
static const charvrvLightDataBlock
 
static const charvrvTileLightIndexList
 

Protected Types

typedef std::map< std::string,
std::pair< DtBufferType,
GLuint > > 
BindingMap
 Map of binding names to bindings. More...
 

Protected Member Functions

 DtBindingManager ()
 CTOR. cannot construct directly. More...
 
virtual ~DtBindingManager ()
 cannot destruct directly More...
 
virtual std::string indexedName (const std::string &name, int index) const
 generate indexed name by appending index number More...
 
virtual void initializeBlockBindings ()
 initialize the block bindings More...
 
virtual void setBinding (const std::string &name, DtBufferType bufferType, GLuint binding)
 set binding for given name More...
 
virtual void setBinding (const std::string &name, DtBufferType bufferType, int index, GLuint binding)
 set binding for given name and index More...
 

Protected Attributes

BindingMap bindingMap
 

Private Member Functions

 DtBindingManager (const DtBindingManager &rhs)
 not allowed More...
 
DtBindingManageroperator= (const DtBindingManager &rhs)
 not allowed 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

Map of binding names to bindings.

Constructor & Destructor Documentation

makVrv::DtBindingManager::DtBindingManager ( )
protected

CTOR. cannot construct directly.

virtual makVrv::DtBindingManager::~DtBindingManager ( )
protectedvirtual

cannot destruct directly

makVrv::DtBindingManager::DtBindingManager ( const DtBindingManager rhs)
private

not allowed

Member Function Documentation

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

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

DtBindingManager& makVrv::DtBindingManager::operator= ( const DtBindingManager rhs)
private

not allowed

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 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.

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

query interface block name for given string

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

query interface block name given binding base name and index

virtual std::string makVrv::DtBindingManager::indexedName ( const std::string &  name,
int  index 
) const
protectedvirtual

generate indexed name by appending index number

virtual void makVrv::DtBindingManager::initializeBlockBindings ( )
protectedvirtual

initialize the block bindings

virtual void makVrv::DtBindingManager::setBinding ( const std::string &  name,
DtBufferType  bufferType,
GLuint  binding 
)
protectedvirtual

set binding for given name

virtual void makVrv::DtBindingManager::setBinding ( const std::string &  name,
DtBufferType  bufferType,
int  index,
GLuint  binding 
)
protectedvirtual

set binding for given name and index

Member Data Documentation

const int makVrv::DtBindingManager::theLightBlockBase = 6
static
const int makVrv::DtBindingManager::theLightBlockCount = 5
static
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::vrvLightDataBlock
static
const char* makVrv::DtBindingManager::vrvTileLightIndexList
static
BindingMap makVrv::DtBindingManager::bindingMap
protected

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

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)