Om  1.0.0
A universal framework for multimedia simulation
Public Member Functions | Static Public Attributes | List of all members
om::graphics::materials::ConstantBindingData Class Reference

A class that stores the input constant data for a shader program. More...

#include <omGraphicsConstantBindingData.h>

Public Member Functions

 ConstantBindingData ()
 Create a new shader binding data object with no allocated data. More...
 
 ConstantBindingData (Size constantDataCapacity)
 Create a new shader binding data object with the specified initial capacity for each data type. More...
 
Size getConstantDataSize () const
 Return an pointer to the internal array of shader constant data. More...
 
UBytegetConstants ()
 Return a pointer to the internal array of shader constant data. More...
 
const UBytegetConstants () const
 Return a const pointer to the internal array of shader constant data. More...
 
UByteallocateConstant (Size sizeInBytes)
 Allocate a new constant for this shader binding data and return a pointer to the constant storage. More...
 
void clearConstants ()
 Remove all stored constants from this shader binding data object. More...
 
void setData (const ConstantBindingData &other)
 Copy all data from the other shader binding data object into this one. More...
 

Static Public Attributes

static const Size DEFAULT_CAPACITY = 64
 The default size of a shader pass's constant set in bytes. More...
 

Detailed Description

A class that stores the input constant data for a shader program.

Constructor & Destructor Documentation

om::graphics::materials::ConstantBindingData::ConstantBindingData ( )

Create a new shader binding data object with no allocated data.

om::graphics::materials::ConstantBindingData::ConstantBindingData ( Size  constantDataCapacity)

Create a new shader binding data object with the specified initial capacity for each data type.

Member Function Documentation

Size om::graphics::materials::ConstantBindingData::getConstantDataSize ( ) const
inline

Return an pointer to the internal array of shader constant data.

UByte* om::graphics::materials::ConstantBindingData::getConstants ( )
inline

Return a pointer to the internal array of shader constant data.

const UByte* om::graphics::materials::ConstantBindingData::getConstants ( ) const
inline

Return a const pointer to the internal array of shader constant data.

UByte* om::graphics::materials::ConstantBindingData::allocateConstant ( Size  sizeInBytes)
inline

Allocate a new constant for this shader binding data and return a pointer to the constant storage.

void om::graphics::materials::ConstantBindingData::clearConstants ( )
inline

Remove all stored constants from this shader binding data object.

void om::graphics::materials::ConstantBindingData::setData ( const ConstantBindingData other)

Copy all data from the other shader binding data object into this one.

Member Data Documentation

const Size om::graphics::materials::ConstantBindingData::DEFAULT_CAPACITY = 64
static

The default size of a shader pass's constant set in bytes.


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