Castor3D 0.16.0
Multiplatform 3D engine
Classes | Public Member Functions | List of all members
castor3d::PassBuffer Class Reference

#include <PassBuffer.hpp>

Classes

struct  PassDataPtr
 
struct  PassTypeData
 

Public Member Functions

C3D_API PassBuffer (Engine &engine, RenderDevice const &device, uint32_t count)
 Constructor.
 
C3D_API uint32_t addPass (Pass &pass)
 Adds a pass to the buffer.
 
C3D_API void removePass (Pass &pass) noexcept
 Removes a pass from the buffer.
 
C3D_API void update (SpecificsBuffers const &specifics, UploadData &uploader)
 Updates the passes buffer.
 
C3D_API void cleanup ()
 Clears the dirty passes container.
 
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 void createPassBinding (crg::FramePass &pass, uint32_t binding) const
 Creates a frame pass 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.
 
C3D_API PassDataPtr getData (uint32_t passID)
 
C3D_API uint32_t getMaxPassTypeCount () const
 
C3D_API uint32_t getPassTypeIndex (PassComponentCombineID passType, TextureCombineID textureCombine) const
 
C3D_API std::tuple< PassComponentCombineID, TextureCombineIDgetPassTypeDetails (uint32_t passTypeIndex) const
 
uint8_t * getPtr ()
 
uint32_t getCurrentPassTypeCount () const
 

Constructor & Destructor Documentation

◆ PassBuffer()

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

Constructor.

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

Member Function Documentation

◆ addPass()

C3D_API uint32_t castor3d::PassBuffer::addPass ( Pass & pass)

Adds a pass to the buffer.

Parameters
[in]passThe pass.

◆ cleanup()

C3D_API void castor3d::PassBuffer::cleanup ( )

Clears the dirty passes container.

◆ createBinding()

C3D_API void castor3d::PassBuffer::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::PassBuffer::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.

◆ createPassBinding()

C3D_API void castor3d::PassBuffer::createPassBinding ( crg::FramePass & pass,
uint32_t binding ) const

Creates a frame pass binding.

◆ getBinding()

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

Creates the descriptor write for this buffer.

◆ getCurrentPassTypeCount()

uint32_t castor3d::PassBuffer::getCurrentPassTypeCount ( ) const
inline

◆ getData()

C3D_API PassDataPtr castor3d::PassBuffer::getData ( uint32_t passID)
Returns
The pointer to the data for given pass ID.

◆ getMaxPassTypeCount()

C3D_API uint32_t castor3d::PassBuffer::getMaxPassTypeCount ( ) const
Returns
The maximum pass types count (for visibility buffer use).

◆ getPassTypeDetails()

C3D_API std::tuple< PassComponentCombineID, TextureCombineID > castor3d::PassBuffer::getPassTypeDetails ( uint32_t passTypeIndex) const
Returns
The pass type details for given pass type index (for visibility buffer use).

◆ getPassTypeIndex()

C3D_API uint32_t castor3d::PassBuffer::getPassTypeIndex ( PassComponentCombineID passType,
TextureCombineID textureCombine ) const
Returns
The pass type index (for visibility buffer use).

◆ getPtr()

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

References castor3d::ShaderBuffer::getPtr().

Here is the call graph for this function:

◆ removePass()

C3D_API void castor3d::PassBuffer::removePass ( Pass & pass)
noexcept

Removes a pass from the buffer.

Parameters
[in]passThe pass.

◆ update()

C3D_API void castor3d::PassBuffer::update ( SpecificsBuffers const & specifics,
UploadData & uploader )

Updates the passes buffer.

Parameters
[in]specificsThe buffers specific to pass components.
[in,out]uploaderReceives the upload requests.

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