#include <LightBuffer.hpp>
◆ LightsData
◆ LightBuffer()
Constructor.
- Parameters
-
[in] | engine | The engine. |
[in] | device | The GPU device. |
[in] | count | The max passes count. |
◆ addLight()
C3D_API void castor3d::LightBuffer::addLight |
( |
Light & | light | ) |
|
Adds a light source to the buffer.
- Parameters
-
[in] | light | The light source. |
◆ createBinding()
C3D_API void castor3d::LightBuffer::createBinding |
( |
ashes::DescriptorSet & | descriptorSet, |
|
|
VkDescriptorSetLayoutBinding const & | binding ) const |
Creates the descriptor set binding at given point.
- Parameters
-
[in] | descriptorSet | The descriptor set that receives the binding. |
[in] | binding | The descriptor set layout binding. |
◆ createLayoutBinding()
C3D_API VkDescriptorSetLayoutBinding castor3d::LightBuffer::createLayoutBinding |
( |
VkShaderStageFlags | stages, |
|
|
uint32_t | binding ) const |
Creates the descriptor set layout binding.
◆ createPassBinding()
C3D_API void castor3d::LightBuffer::createPassBinding |
( |
crg::FramePass & | pass, |
|
|
uint32_t | binding ) const |
Creates a frame pass binding.
◆ getBinding()
C3D_API ashes::WriteDescriptorSet castor3d::LightBuffer::getBinding |
( |
uint32_t | binding | ) |
const |
Creates the descriptor write for this buffer.
◆ getLights()
LightsArray castor3d::LightBuffer::getLights |
( |
LightType | type | ) |
const |
|
inline |
◆ getLightsBufferCount()
C3D_API uint32_t castor3d::LightBuffer::getLightsBufferCount |
( |
LightType | type | ) |
const |
|
noexcept |
- Parameters
-
- Returns
- The number of light sources of the given type, in the buffer.
◆ getPtr()
uint8_t * castor3d::LightBuffer::getPtr |
( |
| ) |
|
|
inline |
◆ getSingleBinding()
C3D_API ashes::WriteDescriptorSet castor3d::LightBuffer::getSingleBinding |
( |
uint32_t | binding, |
|
|
VkDeviceSize | offset, |
|
|
VkDeviceSize | size ) const |
Creates the descriptor write for this buffer.
◆ removeLight()
C3D_API void castor3d::LightBuffer::removeLight |
( |
Light & | light | ) |
|
Removes a light source from the buffer.
- Parameters
-
[in] | light | The light source. |
◆ update()
Updates the buffer CPU wise.
- Parameters
-
[in,out] | updater | The update data. |
◆ upload()
Uploads the buffer to VRAM.
- Parameters
-
[in,out] | uploader | Receives the upload requests. |
The documentation for this class was generated from the following file: