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

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

#include <omGraphicsShaderBindingData.h>

Public Member Functions

 ShaderBindingData ()
 Create a new shader binding data object with no allocated data. More...
 
 ShaderBindingData (Size constantDataCapacity, Size textureCapacity, Size vertexBufferCapacity)
 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...
 
Size getTextureCount () const
 Return an pointer to the internal array of shader textures. More...
 
Texture ** getTextures ()
 Return a pointer to the internal array of shader textures. More...
 
Texture *const * getTextures () const
 Return a const pointer to the internal array of shader textures. More...
 
Texture ** allocateTextures (Size texturesToAdd)
 Allocate the specified number of textures for this shader binding data and return a pointer to the texture storage. More...
 
void clearTextures ()
 Remove all stored textures from this shader binding data object. More...
 
Size getVertexBufferCount () const
 Return an pointer to the internal array of shader vertex buffers. More...
 
VertexBuffer ** getVertexBuffers ()
 Return a pointer to the internal array of shader vertex buffers. More...
 
VertexBuffer *const * getVertexBuffers () const
 Return a const pointer to the internal array of shader vertex buffers. More...
 
VertexBuffer ** allocateVertexBuffers (Size buffersToAdd)
 Allocate the specified number of vertex buffers for this shader binding data and return a pointer to the buffer storage. More...
 
void clearVertexBuffers ()
 Remove all stored vertex buffers from this shader binding data object. More...
 
Size getMinimumVertexBufferCapacity () const
 Return the smallest number of elements that are in any vertex buffer that is part of this shader pass. More...
 
void setData (const ShaderBindingData &other)
 Copy all data from the other shader binding data object into this one. More...
 

Detailed Description

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

Constructor & Destructor Documentation

om::graphics::materials::ShaderBindingData::ShaderBindingData ( )
inline

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

om::graphics::materials::ShaderBindingData::ShaderBindingData ( Size  constantDataCapacity,
Size  textureCapacity,
Size  vertexBufferCapacity 
)
inline

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

Member Function Documentation

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

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

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

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

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

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

UByte* om::graphics::materials::ShaderBindingData::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::ShaderBindingData::clearConstants ( )
inline

Remove all stored constants from this shader binding data object.

Size om::graphics::materials::ShaderBindingData::getTextureCount ( ) const
inline

Return an pointer to the internal array of shader textures.

Texture** om::graphics::materials::ShaderBindingData::getTextures ( )
inline

Return a pointer to the internal array of shader textures.

Texture* const* om::graphics::materials::ShaderBindingData::getTextures ( ) const
inline

Return a const pointer to the internal array of shader textures.

Texture** om::graphics::materials::ShaderBindingData::allocateTextures ( Size  texturesToAdd)
inline

Allocate the specified number of textures for this shader binding data and return a pointer to the texture storage.

void om::graphics::materials::ShaderBindingData::clearTextures ( )
inline

Remove all stored textures from this shader binding data object.

Size om::graphics::materials::ShaderBindingData::getVertexBufferCount ( ) const
inline

Return an pointer to the internal array of shader vertex buffers.

VertexBuffer** om::graphics::materials::ShaderBindingData::getVertexBuffers ( )
inline

Return a pointer to the internal array of shader vertex buffers.

VertexBuffer* const* om::graphics::materials::ShaderBindingData::getVertexBuffers ( ) const
inline

Return a const pointer to the internal array of shader vertex buffers.

VertexBuffer** om::graphics::materials::ShaderBindingData::allocateVertexBuffers ( Size  buffersToAdd)
inline

Allocate the specified number of vertex buffers for this shader binding data and return a pointer to the buffer storage.

void om::graphics::materials::ShaderBindingData::clearVertexBuffers ( )
inline

Remove all stored vertex buffers from this shader binding data object.

Size om::graphics::materials::ShaderBindingData::getMinimumVertexBufferCapacity ( ) const
inline

Return the smallest number of elements that are in any vertex buffer that is part of this shader pass.

If there are no vertex buffers attached, 0 is returned. This method can be used to make sure that a shader pass has enough vertex data for a particular draw call or index buffer.

void om::graphics::materials::ShaderBindingData::setData ( const ShaderBindingData other)
inline

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


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