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

A class that contains a collection of named shader bindings, their semantic usages, and their values. More...

#include <omGraphicsShaderBindingSet.h>

Public Member Functions

 ShaderBindingSet ()
 Create a new default shader binding set with no bindings. More...
 
ShaderBindingDatagetData ()
 Return a reference to the object that stores the binding data for this binding set. More...
 
const ShaderBindingDatagetData () const
 Return a reference to the object that stores the binding data for this binding set. More...
 
Size getConstantCount () const
 Return the number of constant bindings associated with this shader binding set. More...
 
const ConstantBindinggetConstantBinding (Index constantIndex) const
 Return a reference to the ConstantBinding at the specified index in this shader binding set. More...
 
const ConstantBindinggetConstantBindings () const
 Return a pointer to the internal array of constant bindings. More...
 
UBytegetConstantData (Index constantIndex)
 Return a pointer to the internal data storage for the constant value at the specified index. More...
 
const UBytegetConstantData (Index constantIndex) const
 Return a pointer to the internal data storage for the constant value at the specified index. More...
 
Bool getConstant (Index constantIndex, AttributeValue &value, Index arrayIndex=Index(0)) const
 Get the constant value for this shader binding set at the specified index and array index. More...
 
Bool setConstant (Index constantIndex, const AttributeValue &value, Index arrayIndex=Index(0))
 Set the constant value for this shader binding set at the specified index and array index, replacing any previous value. More...
 
Bool getConstant (ConstantUsage::Enum usage, AttributeValue &value, Index arrayIndex=Index(0)) const
 Get the constant value for this shader binding set with the given usage and array index. More...
 
Bool setConstant (ConstantUsage::Enum usage, const AttributeValue &value, Index arrayIndex=Index(0))
 Set the constant value for this shader binding set with the given usage and array index, replacing any previous value. More...
 
Bool getConstant (const ConstantUsage &usage, AttributeValue &value, Index arrayIndex=Index(0)) const
 Get the constant value for this shader binding set with the given usage and array index. More...
 
Bool setConstant (const ConstantUsage &usage, const AttributeValue &value, Index arrayIndex=Index(0))
 Set the constant value for this shader binding set with the given usage and array index, replacing any previous value. More...
 
ConstantUsage getConstantUsage (Index constantIndex) const
 Return an object indicating the usage of the constant in this shader binding set at the given index. More...
 
Bool setConstantUsage (Index constantIndex, const ConstantUsage &newUsage)
 Set the usage of the constant in this shader binding set at the given index. More...
 
ShaderBindingFlags getConstantFlags (Index constantIndex) const
 Return an object indicating the flags of the constant in this shader binding set at the given index. More...
 
Bool setConstantFlags (Index constantIndex, const ShaderBindingFlags &newFlags)
 Set the flags of the constant in this shader binding set at the given index. More...
 
Bool getConstantIndex (const ShaderSourceString &constantName, Index &constantIndex) const
 Get the index of the binding for the constant variable with the specified name. More...
 
Bool getConstantIndex (ConstantUsage::Enum usage, Index &constantIndex) const
 Get the index of the first constant binding in the binding set that has the specified constant usage. More...
 
Bool getConstantIndex (const ConstantUsage &usage, Index &constantIndex) const
 Get the index of the first constant binding in the binding set that has the specified constant usage. More...
 
Bool addConstant (const ShaderSourceString &constantName, const ConstantUsage &usage, const AttributeType &type, Size arraySize=Size(1), const ShaderBindingFlags &flags=ShaderBindingFlags::DEFAULT)
 Add a constant binding for the variable with the given name and usage to this shader binding set. More...
 
Bool addConstant (const ShaderSourceString &constantName, const ConstantUsage &usage, const AttributeValue &value, Size arraySize=Size(1), const ShaderBindingFlags &flags=ShaderBindingFlags::DEFAULT)
 Add a constant binding for the variable with the given name and usage to this shader binding set. More...
 
Bool removeConstant (Index constantIndex)
 Remove the constant binding with the specified index in this shader binding set. More...
 
void clearConstants ()
 Clear all constant bindings from this shader binding set. More...
 
Size getTextureCount () const
 Get the number of texture bindings associated with this shader binding set. More...
 
const TextureBindinggetTextureBinding (Index textureIndex) const
 Return a reference to the TextureBinding at the specified index in this shader pass. More...
 
const TextureBindinggetTextureBindings () const
 Return a pointer to the internal array of texture bindings. More...
 
TexturegetTexture (Index textureIndex, Index arrayIndex=Index(0)) const
 Get the texture in this shader binding set at the specified binding and array index. More...
 
Bool setTexture (Index textureIndex, Texture *texture, Index arrayIndex=Index(0))
 Set the texture in this shader binding set at the specified binding and array index, replacing any previous texture. More...
 
TexturegetTexture (TextureUsage::Enum usage, Index arrayIndex=Index(0)) const
 Get the texture for this shader binding set with the given usage and array index. More...
 
Bool setTexture (TextureUsage::Enum usage, Texture *texture, Index arrayIndex=Index(0))
 Set the texture for this shader binding set with the given usage and array index, replacing any previous texture. More...
 
TexturegetTexture (const TextureUsage &usage, Index arrayIndex=Index(0)) const
 Get the texture for this shader binding set with the given usage and array index. More...
 
Bool setTexture (const TextureUsage &usage, Texture *texture, Index arrayIndex=Index(0))
 Set the texture for this shader binding set with the given usage and array index, replacing any previous texture. More...
 
TextureUsage getTextureUsage (Index textureIndex) const
 Return an object indicating the usage of the texture in this shader binding set at the given index. More...
 
Bool setTextureUsage (Index textureIndex, const TextureUsage &newUsage)
 Set the usage of the texture in this shader binding set at the given index. More...
 
ShaderBindingFlags getTextureFlags (Index textureIndex) const
 Return an object indicating the flags of the texture in this shader binding set at the given index. More...
 
Bool setTextureFlags (Index textureIndex, const ShaderBindingFlags &newFlags)
 Set the flags of the texture in this shader binding set at the given index. More...
 
Bool getTextureIndex (const ShaderSourceString &variableName, Index &textureIndex) const
 Get the index of the binding for the texture variable with the specified name. More...
 
Bool getTextureIndex (TextureUsage::Enum usage, Index &textureIndex) const
 Get the index of the first texture binding in the binding set that has the specified texture usage. More...
 
Bool getTextureIndex (const TextureUsage &usage, Index &textureIndex) const
 Get the index of the first texture binding in the binding set that has the specified texture usage. More...
 
Bool addTexture (const ShaderSourceString &variableName, const TextureUsage &usage, const TextureType &type, Size arraySize=Size(1), const ShaderBindingFlags &flags=ShaderBindingFlags::DEFAULT)
 Add a texture binding for the variable with the given name to this shader binding set. More...
 
Bool addTexture (const ShaderSourceString &variableName, const TextureUsage &usage, Texture *texture, Size arraySize=Size(1), const ShaderBindingFlags &flags=ShaderBindingFlags::DEFAULT)
 Add a texture binding for the variable with the given name to this shader binding set. More...
 
Bool removeTexture (Index textureIndex)
 Remove the texture binding with the specified index in this shader binding set. More...
 
void clearTextures ()
 Clear all texture bindings from this shader binding set. More...
 
Size getVertexBufferCount () const
 Get the number of vertex bindings associated with this shader binding set. More...
 
const VertexBindinggetVertexBinding (Index bindingIndex) const
 Return a reference to the VertexBinding at the specified index in this shader pass. More...
 
const VertexBindinggetVertexBindings () const
 Return a pointer to the internal array of vertex buffer bindings. More...
 
VertexBuffergetVertexBuffer (Index bindingIndex, Index arrayIndex=Index(0)) const
 Get the vertex buffer in this shader binding set at the specified binding and array index. More...
 
Bool setVertexBuffer (Index bindingIndex, VertexBuffer *buffer, Index arrayIndex=Index(0))
 Set the vertex buffer in this shader binding set at the specified binding and array index, replacing any previous buffer. More...
 
VertexBuffergetVertexBuffer (VertexUsage::Enum usage, Index arrayIndex=Index(0)) const
 Return the vertex buffer for this shader binding set with the given usage and array index. More...
 
Bool setVertexBuffer (VertexUsage::Enum usage, VertexBuffer *buffer, Index arrayIndex=Index(0))
 Set the vertex buffer for this shader binding set with the given usage and array index, replacing any previous buffer. More...
 
VertexBuffergetVertexBuffer (const VertexUsage &usage, Index arrayIndex=Index(0)) const
 Return the vertex buffer for this shader binding set with the given usage and array index. More...
 
Bool setVertexBuffer (const VertexUsage &usage, VertexBuffer *buffer, Index arrayIndex=Index(0))
 Set the vertex buffer for this shader binding set with the given usage and array index, replacing any previous buffer. More...
 
VertexUsage getVertexBufferUsage (Index bindingIndex) const
 Return an object indicating the usage of the texture in this shader binding set at the given index. More...
 
Bool setVertexBufferUsage (Index bindingIndex, const VertexUsage &newUsage)
 Set the usage of the texture in this shader binding set at the given index. More...
 
ShaderBindingFlags getVertexBufferFlags (Index bindingIndex) const
 Return an object indicating the flags of the vertex binding in this shader binding set at the given index. More...
 
Bool setVertexBufferFlags (Index bindingIndex, const ShaderBindingFlags &newFlags)
 Set the flags of the vertex binding in this shader binding set at the given index. More...
 
Bool getVertexBufferIndex (const ShaderSourceString &variableName, Index &bindingIndex) const
 Get the index of the binding for the vertex variable with the specified name. More...
 
Bool getVertexBufferIndex (VertexUsage::Enum usage, Index &bindingIndex) const
 Get the index of the first vertex binding in the binding set that has the specified vertex usage. More...
 
Bool getVertexBufferIndex (const VertexUsage &usage, Index &bindingIndex) const
 Get the index of the first vertex binding in the binding set that has the specified vertex usage. More...
 
Bool addVertexBuffer (const ShaderSourceString &variableName, const VertexUsage &usage, Size arraySize=Size(1), const ShaderBindingFlags &flags=ShaderBindingFlags::DEFAULT)
 Add a vertex binding for the variable with the given name to this shader binding set. More...
 
Bool addVertexBuffer (const ShaderSourceString &variableName, const VertexUsage &usage, VertexBuffer *buffer, Size arraySize=Size(1), const ShaderBindingFlags &flags=ShaderBindingFlags::DEFAULT)
 Add a vertex binding for the variable with the given name to this shader binding set. More...
 
Bool removeVertexBuffer (Index vertexBufferIndex)
 Remove the vertex binding with the specified index in this shader binding set. More...
 
void clearVertexBuffers ()
 Clear all vertex bindings from this shader binding set. More...
 
void clear ()
 Clear all bindings and binding data from this shader binding set. More...
 

Detailed Description

A class that contains a collection of named shader bindings, their semantic usages, and their values.

Constructor & Destructor Documentation

om::graphics::materials::ShaderBindingSet::ShaderBindingSet ( )

Create a new default shader binding set with no bindings.

Member Function Documentation

ShaderBindingData& om::graphics::materials::ShaderBindingSet::getData ( )
inline

Return a reference to the object that stores the binding data for this binding set.

const ShaderBindingData& om::graphics::materials::ShaderBindingSet::getData ( ) const
inline

Return a reference to the object that stores the binding data for this binding set.

Size om::graphics::materials::ShaderBindingSet::getConstantCount ( ) const
inline

Return the number of constant bindings associated with this shader binding set.

const ConstantBinding& om::graphics::materials::ShaderBindingSet::getConstantBinding ( Index  constantIndex) const
inline

Return a reference to the ConstantBinding at the specified index in this shader binding set.

Binding indices range from 0 to the number of bindings minus one.

const ConstantBinding* om::graphics::materials::ShaderBindingSet::getConstantBindings ( ) const
inline

Return a pointer to the internal array of constant bindings.

UByte* om::graphics::materials::ShaderBindingSet::getConstantData ( Index  constantIndex)
inline

Return a pointer to the internal data storage for the constant value at the specified index.

const UByte* om::graphics::materials::ShaderBindingSet::getConstantData ( Index  constantIndex) const
inline

Return a pointer to the internal data storage for the constant value at the specified index.

Bool om::graphics::materials::ShaderBindingSet::getConstant ( Index  constantIndex,
AttributeValue value,
Index  arrayIndex = Index(0) 
) const

Get the constant value for this shader binding set at the specified index and array index.

The method returns whether or not the constant at that index and array index was able to be accessed. The constant value is stored in the output value parameter.

Bool om::graphics::materials::ShaderBindingSet::setConstant ( Index  constantIndex,
const AttributeValue value,
Index  arrayIndex = Index(0) 
)

Set the constant value for this shader binding set at the specified index and array index, replacing any previous value.

The method returns whether or not the constant at that index and array index was able to be changed.

Bool om::graphics::materials::ShaderBindingSet::getConstant ( ConstantUsage::Enum  usage,
AttributeValue value,
Index  arrayIndex = Index(0) 
) const
inline

Get the constant value for this shader binding set with the given usage and array index.

The method returns whether or not the constant with that usage and array index was able to be accessed. The constant value is stored in the output value parameter.

Bool om::graphics::materials::ShaderBindingSet::setConstant ( ConstantUsage::Enum  usage,
const AttributeValue value,
Index  arrayIndex = Index(0) 
)
inline

Set the constant value for this shader binding set with the given usage and array index, replacing any previous value.

The method returns whether or not the constant with that usage and array index was able to be changed.

Bool om::graphics::materials::ShaderBindingSet::getConstant ( const ConstantUsage usage,
AttributeValue value,
Index  arrayIndex = Index(0) 
) const

Get the constant value for this shader binding set with the given usage and array index.

The method returns whether or not the constant with that usage and array index was able to be accessed. The constant value is stored in the output value parameter.

Bool om::graphics::materials::ShaderBindingSet::setConstant ( const ConstantUsage usage,
const AttributeValue value,
Index  arrayIndex = Index(0) 
)

Set the constant value for this shader binding set with the given usage and array index, replacing any previous value.

The method returns whether or not the constant with that usage and array index was able to be changed.

ConstantUsage om::graphics::materials::ShaderBindingSet::getConstantUsage ( Index  constantIndex) const

Return an object indicating the usage of the constant in this shader binding set at the given index.

Bool om::graphics::materials::ShaderBindingSet::setConstantUsage ( Index  constantIndex,
const ConstantUsage newUsage 
)

Set the usage of the constant in this shader binding set at the given index.

The method returns whether or not the constant's usage was able to be modified.

ShaderBindingFlags om::graphics::materials::ShaderBindingSet::getConstantFlags ( Index  constantIndex) const

Return an object indicating the flags of the constant in this shader binding set at the given index.

Bool om::graphics::materials::ShaderBindingSet::setConstantFlags ( Index  constantIndex,
const ShaderBindingFlags newFlags 
)

Set the flags of the constant in this shader binding set at the given index.

The method returns whether or not the constant's flags were able to be modified.

Bool om::graphics::materials::ShaderBindingSet::getConstantIndex ( const ShaderSourceString constantName,
Index constantIndex 
) const

Get the index of the binding for the constant variable with the specified name.

This method finds the binding with the specified name and places its index in the output reference parameter if the binding was found.

The method returns whether or not there was a binding for a constant with that name.

Bool om::graphics::materials::ShaderBindingSet::getConstantIndex ( ConstantUsage::Enum  usage,
Index constantIndex 
) const
inline

Get the index of the first constant binding in the binding set that has the specified constant usage.

Bool om::graphics::materials::ShaderBindingSet::getConstantIndex ( const ConstantUsage usage,
Index constantIndex 
) const

Get the index of the first constant binding in the binding set that has the specified constant usage.

Bool om::graphics::materials::ShaderBindingSet::addConstant ( const ShaderSourceString constantName,
const ConstantUsage usage,
const AttributeType type,
Size  arraySize = Size(1),
const ShaderBindingFlags flags = ShaderBindingFlags::DEFAULT 
)

Add a constant binding for the variable with the given name and usage to this shader binding set.

The constant's values are initialized to zero.

Bool om::graphics::materials::ShaderBindingSet::addConstant ( const ShaderSourceString constantName,
const ConstantUsage usage,
const AttributeValue value,
Size  arraySize = Size(1),
const ShaderBindingFlags flags = ShaderBindingFlags::DEFAULT 
)

Add a constant binding for the variable with the given name and usage to this shader binding set.

The constant's values are initialized to the given value.

Bool om::graphics::materials::ShaderBindingSet::removeConstant ( Index  constantIndex)

Remove the constant binding with the specified index in this shader binding set.

If the constant binding is successfully removed, TRUE is returned. Otherwise FALSE is returned and the shader binding set is unmodified. This method removes the constant binding and replaces it with the shader binding set's last constant binding (if there is one) in the list order.

void om::graphics::materials::ShaderBindingSet::clearConstants ( )

Clear all constant bindings from this shader binding set.

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

Get the number of texture bindings associated with this shader binding set.

const TextureBinding& om::graphics::materials::ShaderBindingSet::getTextureBinding ( Index  textureIndex) const
inline

Return a reference to the TextureBinding at the specified index in this shader pass.

Binding indices range from 0 to the number of bindings minus one.

const TextureBinding* om::graphics::materials::ShaderBindingSet::getTextureBindings ( ) const
inline

Return a pointer to the internal array of texture bindings.

Texture* om::graphics::materials::ShaderBindingSet::getTexture ( Index  textureIndex,
Index  arrayIndex = Index(0) 
) const

Get the texture in this shader binding set at the specified binding and array index.

If there is no texture for that array index, NULL is returned.

Bool om::graphics::materials::ShaderBindingSet::setTexture ( Index  textureIndex,
Texture texture,
Index  arrayIndex = Index(0) 
)

Set the texture in this shader binding set at the specified binding and array index, replacing any previous texture.

The method returns whether or not the texture at that index and array index was able to be changed.

Texture* om::graphics::materials::ShaderBindingSet::getTexture ( TextureUsage::Enum  usage,
Index  arrayIndex = Index(0) 
) const
inline

Get the texture for this shader binding set with the given usage and array index.

If there is no texture for that usage or array index, NULL is returned.

Bool om::graphics::materials::ShaderBindingSet::setTexture ( TextureUsage::Enum  usage,
Texture texture,
Index  arrayIndex = Index(0) 
)
inline

Set the texture for this shader binding set with the given usage and array index, replacing any previous texture.

The method returns whether or not the texture with that usage and array index was able to be changed.

Texture* om::graphics::materials::ShaderBindingSet::getTexture ( const TextureUsage usage,
Index  arrayIndex = Index(0) 
) const

Get the texture for this shader binding set with the given usage and array index.

If there is no texture for that usage or array index, NULL is returned.

Bool om::graphics::materials::ShaderBindingSet::setTexture ( const TextureUsage usage,
Texture texture,
Index  arrayIndex = Index(0) 
)

Set the texture for this shader binding set with the given usage and array index, replacing any previous texture.

The method returns whether or not the texture with that usage and array index was able to be changed.

TextureUsage om::graphics::materials::ShaderBindingSet::getTextureUsage ( Index  textureIndex) const

Return an object indicating the usage of the texture in this shader binding set at the given index.

Bool om::graphics::materials::ShaderBindingSet::setTextureUsage ( Index  textureIndex,
const TextureUsage newUsage 
)

Set the usage of the texture in this shader binding set at the given index.

The method returns whether or not the texture's usage was able to be modified.

ShaderBindingFlags om::graphics::materials::ShaderBindingSet::getTextureFlags ( Index  textureIndex) const

Return an object indicating the flags of the texture in this shader binding set at the given index.

Bool om::graphics::materials::ShaderBindingSet::setTextureFlags ( Index  textureIndex,
const ShaderBindingFlags newFlags 
)

Set the flags of the texture in this shader binding set at the given index.

The method returns whether or not the texture's flags were able to be modified.

Bool om::graphics::materials::ShaderBindingSet::getTextureIndex ( const ShaderSourceString variableName,
Index textureIndex 
) const

Get the index of the binding for the texture variable with the specified name.

This method does an expensive linear search through the array of bindings until it finds the variable with the specified name and places its index in the output reference parameter.

The method returns whether or not there was a binding for a variable with that name.

Bool om::graphics::materials::ShaderBindingSet::getTextureIndex ( TextureUsage::Enum  usage,
Index textureIndex 
) const
inline

Get the index of the first texture binding in the binding set that has the specified texture usage.

Bool om::graphics::materials::ShaderBindingSet::getTextureIndex ( const TextureUsage usage,
Index textureIndex 
) const

Get the index of the first texture binding in the binding set that has the specified texture usage.

Bool om::graphics::materials::ShaderBindingSet::addTexture ( const ShaderSourceString variableName,
const TextureUsage usage,
const TextureType type,
Size  arraySize = Size(1),
const ShaderBindingFlags flags = ShaderBindingFlags::DEFAULT 
)

Add a texture binding for the variable with the given name to this shader binding set.

If there is no shader for this shader binding set, or the shader doesn't have a variable with the specified name, or the specified usage has an incompatible type with the shader variable, the method call fails and FALSE is returned. Otherwise, a new binding is added to the shader binding set with the given attributes and TRUE is returned.

Bool om::graphics::materials::ShaderBindingSet::addTexture ( const ShaderSourceString variableName,
const TextureUsage usage,
Texture texture,
Size  arraySize = Size(1),
const ShaderBindingFlags flags = ShaderBindingFlags::DEFAULT 
)

Add a texture binding for the variable with the given name to this shader binding set.

If there is no shader for this shader binding set, or the shader doesn't have a variable with the specified name, or the specified texture or usage has an incompatible type with the shader variable, the method call fails and FALSE is returned. Otherwise, a new binding is added to the shader binding set with the given attributes and TRUE is returned.

Bool om::graphics::materials::ShaderBindingSet::removeTexture ( Index  textureIndex)

Remove the texture binding with the specified index in this shader binding set.

If the texture binding is successfully removed, TRUE is returned. Otherwise FALSE is returned and the shader binding set is unmodified.

void om::graphics::materials::ShaderBindingSet::clearTextures ( )

Clear all texture bindings from this shader binding set.

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

Get the number of vertex bindings associated with this shader binding set.

const VertexBinding& om::graphics::materials::ShaderBindingSet::getVertexBinding ( Index  bindingIndex) const
inline

Return a reference to the VertexBinding at the specified index in this shader pass.

Binding indices range from 0 to the number of bindings minus one.

const VertexBinding* om::graphics::materials::ShaderBindingSet::getVertexBindings ( ) const
inline

Return a pointer to the internal array of vertex buffer bindings.

VertexBuffer* om::graphics::materials::ShaderBindingSet::getVertexBuffer ( Index  bindingIndex,
Index  arrayIndex = Index(0) 
) const

Get the vertex buffer in this shader binding set at the specified binding and array index.

The method returns whether or not the vertex buffer at that index and array index was able to be accessed. The vertex buffer is stored in the output parameter.

Bool om::graphics::materials::ShaderBindingSet::setVertexBuffer ( Index  bindingIndex,
VertexBuffer buffer,
Index  arrayIndex = Index(0) 
)

Set the vertex buffer in this shader binding set at the specified binding and array index, replacing any previous buffer.

The method returns whether or not the vertex buffer at that index and array index was able to be changed.

VertexBuffer* om::graphics::materials::ShaderBindingSet::getVertexBuffer ( VertexUsage::Enum  usage,
Index  arrayIndex = Index(0) 
) const
inline

Return the vertex buffer for this shader binding set with the given usage and array index.

If there is no vertex buffer for that usage or array index, NULL is returned.

Bool om::graphics::materials::ShaderBindingSet::setVertexBuffer ( VertexUsage::Enum  usage,
VertexBuffer buffer,
Index  arrayIndex = Index(0) 
)
inline

Set the vertex buffer for this shader binding set with the given usage and array index, replacing any previous buffer.

The method returns whether or not the vertex buffer with that usage and array index was able to be changed.

VertexBuffer* om::graphics::materials::ShaderBindingSet::getVertexBuffer ( const VertexUsage usage,
Index  arrayIndex = Index(0) 
) const

Return the vertex buffer for this shader binding set with the given usage and array index.

If there is no vertex buffer for that usage or array index, NULL is returned.

Bool om::graphics::materials::ShaderBindingSet::setVertexBuffer ( const VertexUsage usage,
VertexBuffer buffer,
Index  arrayIndex = Index(0) 
)

Set the vertex buffer for this shader binding set with the given usage and array index, replacing any previous buffer.

The method returns whether or not the vertex buffer with that usage and array index was able to be changed.

VertexUsage om::graphics::materials::ShaderBindingSet::getVertexBufferUsage ( Index  bindingIndex) const

Return an object indicating the usage of the texture in this shader binding set at the given index.

Bool om::graphics::materials::ShaderBindingSet::setVertexBufferUsage ( Index  bindingIndex,
const VertexUsage newUsage 
)

Set the usage of the texture in this shader binding set at the given index.

The method returns whether or not the texture's usage was able to be modified.

ShaderBindingFlags om::graphics::materials::ShaderBindingSet::getVertexBufferFlags ( Index  bindingIndex) const

Return an object indicating the flags of the vertex binding in this shader binding set at the given index.

Bool om::graphics::materials::ShaderBindingSet::setVertexBufferFlags ( Index  bindingIndex,
const ShaderBindingFlags newFlags 
)

Set the flags of the vertex binding in this shader binding set at the given index.

The method returns whether or not the vertex binding's flags were able to be modified.

Bool om::graphics::materials::ShaderBindingSet::getVertexBufferIndex ( const ShaderSourceString variableName,
Index bindingIndex 
) const

Get the index of the binding for the vertex variable with the specified name.

This method does an expensive linear search through the array of bindings until it finds the variable with the specified name and places its index in the output reference parameter.

The method returns whether or not there was a binding for a variable with that name.

Bool om::graphics::materials::ShaderBindingSet::getVertexBufferIndex ( VertexUsage::Enum  usage,
Index bindingIndex 
) const
inline

Get the index of the first vertex binding in the binding set that has the specified vertex usage.

Bool om::graphics::materials::ShaderBindingSet::getVertexBufferIndex ( const VertexUsage usage,
Index bindingIndex 
) const

Get the index of the first vertex binding in the binding set that has the specified vertex usage.

Bool om::graphics::materials::ShaderBindingSet::addVertexBuffer ( const ShaderSourceString variableName,
const VertexUsage usage,
Size  arraySize = Size(1),
const ShaderBindingFlags flags = ShaderBindingFlags::DEFAULT 
)

Add a vertex binding for the variable with the given name to this shader binding set.

If there is no shader for this shader binding set, or the shader doesn't have a variable with the specified name, or the specified vertex or usage has an incompatible type with the shader variable, the method call fails and FALSE is returned. Otherwise, a new binding is added to the shader binding set with the given attributes and TRUE is returned.

Bool om::graphics::materials::ShaderBindingSet::addVertexBuffer ( const ShaderSourceString variableName,
const VertexUsage usage,
VertexBuffer buffer,
Size  arraySize = Size(1),
const ShaderBindingFlags flags = ShaderBindingFlags::DEFAULT 
)

Add a vertex binding for the variable with the given name to this shader binding set.

If there is no shader for this shader binding set, or the shader doesn't have a variable with the specified name, or the specified vertex or usage has an incompatible type with the shader variable, the method call fails and FALSE is returned. Otherwise, a new binding is added to the shader binding set with the given attributes and TRUE is returned.

Bool om::graphics::materials::ShaderBindingSet::removeVertexBuffer ( Index  vertexBufferIndex)

Remove the vertex binding with the specified index in this shader binding set.

If the vertex binding is successfully removed, TRUE is returned. Otherwise FALSE is returned and the shader binding set is unmodified.

void om::graphics::materials::ShaderBindingSet::clearVertexBuffers ( )

Clear all vertex bindings from this shader binding set.

void om::graphics::materials::ShaderBindingSet::clear ( )

Clear all bindings and binding data from this shader binding set.

This method does not deallocate the internal binding storage.


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