Castor3D 0.16.0
Multiplatform 3D engine
|
#include <ShaderBuffer.hpp>
Public Member Functions | |
C3D_API | ShaderBuffer (RenderDevice const &device, VkDeviceSize size, castor::String const &name, crg::AccessState wantedState={ VK_ACCESS_SHADER_READ_BIT, VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT }) |
Constructor. | |
C3D_API void | upload (UploadData &uploader) const |
Updates the buffer. | |
C3D_API void | upload (UploadData &uploader, VkDeviceSize offset, VkDeviceSize size) const |
Updates the buffer on GPU. | |
C3D_API VkDescriptorSetLayoutBinding | createLayoutBinding (uint32_t index=0u, 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 at given point. | |
C3D_API void | createPassBinding (crg::FramePass &pass, uint32_t binding) const |
Creates a frame pass binding. | |
C3D_API ashes::WriteDescriptorSet | getSingleBinding (uint32_t binding, VkDeviceSize offset, VkDeviceSize size) const |
Creates the descriptor write for this buffer. | |
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 () const noexcept |
VkDeviceSize | getSize () const noexcept |
RenderDevice const & | getDevice () const noexcept |
ashes::BufferBase const & | getBuffer () const noexcept |
void | setFirstCount (uint32_t value) noexcept |
void | setSecondCount (uint32_t value) noexcept |
void | setThirdCount (uint32_t value) noexcept |
void | setFourthCount (uint32_t value) noexcept |
void | setCount (uint32_t value) noexcept |
C3D_API castor3d::ShaderBuffer::ShaderBuffer | ( | RenderDevice const & | device, |
VkDeviceSize | size, | ||
castor::String const & | name, | ||
crg::AccessState | wantedState = { VK_ACCESS_SHADER_READ_BIT, VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT } ) |
Constructor.
[in] | device | The GPU device. |
[in] | size | The buffer size. |
[in] | name | The shader buffer name. |
[in] | wantedState | The wanted state, after upload. |
C3D_API void castor3d::ShaderBuffer::createBinding | ( | ashes::DescriptorSet & | descriptorSet, |
VkDescriptorSetLayoutBinding const & | binding ) const |
Creates the descriptor set binding at given point.
[in,out] | descriptorSet | Receives the created binding. |
[in] | binding | The descriptor set layout binding. |
C3D_API VkDescriptorSetLayoutBinding castor3d::ShaderBuffer::createLayoutBinding | ( | uint32_t | index = 0u, |
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 at given point.
[in] | index | The binding point index. |
[in] | stages | The shader stages. |
C3D_API void castor3d::ShaderBuffer::createPassBinding | ( | crg::FramePass & | pass, |
uint32_t | binding ) const |
Creates a frame pass binding.
C3D_API ashes::WriteDescriptorSet castor3d::ShaderBuffer::getBinding | ( | uint32_t | binding | ) | const |
Creates the descriptor write for this buffer.
[in] | binding | The descriptor set layout binding. |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
name Getters.
Referenced by castor3d::FontGlyphBuffer::getPtr(), castor3d::LightBuffer::getPtr(), castor3d::PassBuffer::getPtr(), castor3d::SssProfileBuffer::getPtr(), castor3d::TextureAnimationBuffer::getPtr(), and castor3d::TextureConfigurationBuffer::getPtr().
C3D_API ashes::WriteDescriptorSet castor3d::ShaderBuffer::getSingleBinding | ( | uint32_t | binding, |
VkDeviceSize | offset, | ||
VkDeviceSize | size ) const |
Creates the descriptor write for this buffer.
[in] | binding | The descriptor set layout binding. |
[in] | offset,size | The updated range. |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Referenced by castor3d::FontGlyphBuffer::setImgHeight().
|
inlinenoexcept |
Referenced by castor3d::FontGlyphBuffer::setMaxHeight().
|
inlinenoexcept |
C3D_API void castor3d::ShaderBuffer::upload | ( | UploadData & | uploader | ) | const |
Updates the buffer.
[in,out] | uploader | Receives the upload requests. |
C3D_API void castor3d::ShaderBuffer::upload | ( | UploadData & | uploader, |
VkDeviceSize | offset, | ||
VkDeviceSize | size ) const |
Updates the buffer on GPU.
[in,out] | uploader | Receives the upload requests. |
[in] | offset,size | The updated range. |