Castor3D 0.16.0
Multiplatform 3D engine
Public Types | Public Member Functions | Static Public Attributes | List of all members
castor3d::TextureAnimationBuffer Class Reference

#include <TextureAnimationBuffer.hpp>

Public Types

using TextureAnimationsData = castor::ArrayView< TextureAnimationData >
 

Public Member Functions

C3D_API TextureAnimationBuffer (Engine &engine, RenderDevice const &device, uint32_t count)
 Constructor.
 
C3D_API void addTextureAnimation (AnimatedTexture const &texture)
 Adds a configuration to the buffer.
 
C3D_API void removeTextureAnimation (AnimatedTexture const &texture) noexcept
 Removes a configuration from the buffer.
 
C3D_API void update (UploadData &uploader)
 Updates the configurations buffer.
 
C3D_API VkDescriptorSetLayoutBinding createLayoutBinding (uint32_t binding, VkShaderStageFlags stages=(VK_SHADER_STAGE_FRAGMENT_BIT|VK_SHADER_STAGE_GEOMETRY_BIT|VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT|VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT|VK_SHADER_STAGE_VERTEX_BIT)) const
 Creates the descriptor set layout binding.
 
C3D_API ashes::WriteDescriptorSet getBinding (uint32_t binding) const
 Creates the descriptor write for this buffer.
 
C3D_API void createBinding (ashes::DescriptorSet &descriptorSet, VkDescriptorSetLayoutBinding const &binding) const
 Creates the descriptor set binding at given point.
 
uint8_t * getPtr ()
 

Static Public Attributes

static uint32_t constexpr DataSize = uint32_t( sizeof( TextureAnimationData ) )
 

Member Typedef Documentation

◆ TextureAnimationsData

Constructor & Destructor Documentation

◆ TextureAnimationBuffer()

C3D_API castor3d::TextureAnimationBuffer::TextureAnimationBuffer ( Engine & engine,
RenderDevice const & device,
uint32_t count )

Constructor.

Parameters
[in]engineThe engine.
[in]deviceThe GPU device.
[in]countThe max configurations count.

Member Function Documentation

◆ addTextureAnimation()

C3D_API void castor3d::TextureAnimationBuffer::addTextureAnimation ( AnimatedTexture const & texture)

Adds a configuration to the buffer.

Parameters
[in]textureThe texture.

◆ createBinding()

C3D_API void castor3d::TextureAnimationBuffer::createBinding ( ashes::DescriptorSet & descriptorSet,
VkDescriptorSetLayoutBinding const & binding ) const

Creates the descriptor set binding at given point.

Parameters
[in]descriptorSetThe descriptor set that receives the binding.
[in]bindingThe descriptor set layout binding.

◆ createLayoutBinding()

C3D_API VkDescriptorSetLayoutBinding castor3d::TextureAnimationBuffer::createLayoutBinding ( uint32_t binding,
VkShaderStageFlags stages = (VK_SHADER_STAGE_FRAGMENT_BIT|VK_SHADER_STAGE_GEOMETRY_BIT|VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT|VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT|VK_SHADER_STAGE_VERTEX_BIT) ) const

Creates the descriptor set layout binding.

◆ getBinding()

C3D_API ashes::WriteDescriptorSet castor3d::TextureAnimationBuffer::getBinding ( uint32_t binding) const

Creates the descriptor write for this buffer.

◆ getPtr()

uint8_t * castor3d::TextureAnimationBuffer::getPtr ( )
inline
Returns
The pointer to the buffer.

References castor3d::ShaderBuffer::getPtr().

Here is the call graph for this function:

◆ removeTextureAnimation()

C3D_API void castor3d::TextureAnimationBuffer::removeTextureAnimation ( AnimatedTexture const & texture)
noexcept

Removes a configuration from the buffer.

Parameters
[in]textureThe texture.

◆ update()

C3D_API void castor3d::TextureAnimationBuffer::update ( UploadData & uploader)

Updates the configurations buffer.

Member Data Documentation

◆ DataSize

uint32_t constexpr castor3d::TextureAnimationBuffer::DataSize = uint32_t( sizeof( TextureAnimationData ) )
staticconstexpr

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