![]() |
Castor3D 0.17.0
Multiplatform 3D engine
|
Wrapper class to select between SSBO or TBO. More...
#include <StructuredShaderBuffer.hpp>

Public Types | |
| using | ElementType = typename ElementTypeTraits::ElementType |
Public Member Functions | |
| C3D_API | StructuredShaderBuffer (Engine &engine, ShaderBuffer &buffer, uint32_t &elementID, uint32_t count) |
| Constructor. | |
| C3D_API uint32_t | add (ElementType &element) |
| Adds an element to the buffer. | |
| C3D_API void | remove (ElementType &element) |
| Removes an element from the buffer. | |
| C3D_API void | update () |
| Updates the buffer. | |
| C3D_API void | bind (uint32_t index) const |
| Binds the buffer. | |
Static Public Attributes | |
| static uint32_t constexpr | ElementSize = ElementTypeTraits::ElementSize |
Protected Attributes | |
| ShaderBuffer & | m_buffer |
| uint32_t & | m_elementID |
| ElementTypeTraits | m_traits |
| castor::Vector< ashes::AttributeFormat * > | m_elements |
| castor::Vector< ashes::AttributeFormat const * > | m_dirty |
| uint32_t const | m_maxElemCount |
| castor::Vector< typename ElementType::OnChangedConnection > | m_connections |
Wrapper class to select between SSBO or TBO.
| using castor3d::StructuredShaderBuffer< ElementTypeTraits >::ElementType = typename ElementTypeTraits::ElementType |
| C3D_API castor3d::StructuredShaderBuffer< ElementTypeTraits >::StructuredShaderBuffer | ( | Engine & | engine, |
| ShaderBuffer & | buffer, | ||
| uint32_t & | elementID, | ||
| uint32_t | count ) |
Constructor.
| [in] | engine | The engine. |
| [in] | buffer | The shader buffer. |
| [in] | elementID | The ID for the next element to add. |
| [in] | count | The maximum number of elements. |
| C3D_API uint32_t castor3d::StructuredShaderBuffer< ElementTypeTraits >::add | ( | ElementType & | element | ) |
Adds an element to the buffer.
| [in] | element | The element. |
| C3D_API void castor3d::StructuredShaderBuffer< ElementTypeTraits >::bind | ( | uint32_t | index | ) | const |
Binds the buffer.
| [in] | index | The binding point. |
| C3D_API void castor3d::StructuredShaderBuffer< ElementTypeTraits >::remove | ( | ElementType & | element | ) |
Removes an element from the buffer.
| [in] | element | The element. |
| C3D_API void castor3d::StructuredShaderBuffer< ElementTypeTraits >::update | ( | ) |
Updates the buffer.
|
staticconstexpr |
|
protected |
The ShaderBuffer.
|
protected |
The connections to change signal for current elements.
|
protected |
The modified elements.
|
protected |
The next element ID.
|
protected |
The current elements.
|
protected |
The maximum element count.
|
protected |
The traits.