Murl::Graph::IConstantBufferContainer Interface Referenceabstract

The IConstantBufferContainer property interface. More...

#include "murl_graph_i_constant_buffer_container.h"

Inheritance diagram for Murl::Graph::IConstantBufferContainer:

Public Member Functions

virtual SInt32 AddConstantBuffer (IEnums::ConstantBufferItem item)=0
 Add a constant buffer with predefined semantics. More...
 
virtual SInt32 AddConstantBuffer (const String &name)=0
 Add a constant buffer with custom semantics. More...
 
virtual SInt32 GetConstantBufferIndex (IEnums::ConstantBufferItem item) const =0
 Query the location of a predefined constant buffer in the container. More...
 
virtual SInt32 GetConstantBufferIndex (const String &name) const =0
 Query the location of a constant buffer with custom semantics. More...
 
virtual UInt32 GetNumberOfConstantBuffers () const =0
 Get the total number of individual constant buffers in the container. More...
 
virtual IEnums::ConstantBufferItem GetConstantBufferItem (UInt32 index) const =0
 Query the predefined semantic item of a constant buffer at a given index. More...
 
virtual const StringGetConstantBufferName (UInt32 index) const =0
 Query the semantic name of a constant buffer at a given index. More...
 
virtual IConstantBufferGetConstantBuffer (UInt32 index) const =0
 Get the constant buffer object at a given index. More...
 

Detailed Description

The IConstantBufferContainer property interface.

This interface provides a way to manage multiple individual constant buffer objects, which each of them holdin a set of different shader variables.

Member Function Documentation

◆ AddConstantBuffer() [1/2]

virtual SInt32 Murl::Graph::IConstantBufferContainer::AddConstantBuffer ( IEnums::ConstantBufferItem  item)
pure virtual

Add a constant buffer with predefined semantics.

This method creates and adds a constant buffer to the container, using one of the available predefined semantics defined in IEnums::ConstantBufferItem. If successful, this method returns the zero-based index of the newly created constant buffer within the container; if failed, -1 is returned.

Parameters
itemThe predefined constant buffer item to add.
Returns
The zero-based index of the buffer in the container, or -1 if failed.

◆ AddConstantBuffer() [2/2]

virtual SInt32 Murl::Graph::IConstantBufferContainer::AddConstantBuffer ( const String name)
pure virtual

Add a constant buffer with custom semantics.

This method creates and adds a constant buffer to the container, using custom semantics defined via a unique name. If successful, this method returns the zero-based index of the newly created constant buffer within the container; if failed, -1 is returned.

Parameters
nameThe custom semantic name.
Returns
The zero-based index of the buffer in the container, or -1 if failed.

◆ GetConstantBufferIndex() [1/2]

virtual SInt32 Murl::Graph::IConstantBufferContainer::GetConstantBufferIndex ( IEnums::ConstantBufferItem  item) const
pure virtual

Query the location of a predefined constant buffer in the container.

This method can be used to query the zero-based index of a constant buffer with given predefined semantics. If the container does not hold a buffer with the requested semantics, -1 is returned.

Parameters
itemThe predefined constant buffer item to query.
Returns
The zero-based index of the buffer, or -1 if not found.

◆ GetConstantBufferIndex() [2/2]

virtual SInt32 Murl::Graph::IConstantBufferContainer::GetConstantBufferIndex ( const String name) const
pure virtual

Query the location of a constant buffer with custom semantics.

This method can be used to query the zero-based index of a constant buffer with given user-defined semantics. If the container does not hold a buffer with the requested semantics, -1 is returned.

Parameters
nameThe custom semantic name.
Returns
The zero-based index of the buffer, or -1 if not found.

◆ GetNumberOfConstantBuffers()

virtual UInt32 Murl::Graph::IConstantBufferContainer::GetNumberOfConstantBuffers ( ) const
pure virtual

Get the total number of individual constant buffers in the container.

Returns
The total number of buffers added.

◆ GetConstantBufferItem()

virtual IEnums::ConstantBufferItem Murl::Graph::IConstantBufferContainer::GetConstantBufferItem ( UInt32  index) const
pure virtual

Query the predefined semantic item of a constant buffer at a given index.

If the buffer at the given index represents has predefined semantics, this method returns the actual item, e.g. IEnums::CONSTANT_BUFFER_ITEM_MATERIAL for a material- related buffer. If the buffer is a user-defined one, it returns IEnums::CONSTANT_BUFFER_ITEM_CUSTOM.

Parameters
indexThe zero-based index of the buffer to query.
Returns
The predefined constant buffer semantics item.

◆ GetConstantBufferName()

virtual const String& Murl::Graph::IConstantBufferContainer::GetConstantBufferName ( UInt32  index) const
pure virtual

Query the semantic name of a constant buffer at a given index.

If the buffer at the given index has user-defined semantics, this method returns its actual name string. If it has predefined semantics, an empty string is returned.

Parameters
indexThe zero-based index of the buffer to query.
Returns
The user-defined constant buffer semantics item.

◆ GetConstantBuffer()

virtual IConstantBuffer* Murl::Graph::IConstantBufferContainer::GetConstantBuffer ( UInt32  index) const
pure virtual

Get the constant buffer object at a given index.

Parameters
indexThe zero-based index of the buffer to retrieve.
Returns
The constant buffer object.

The documentation for this interface was generated from the following file:
  • murl_graph_i_constant_buffer_container.h


Copyright © 2011-2018 Spraylight GmbH.