#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 |
( |
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() [1/2]
C3D_API ashes::WriteDescriptorSet castor3d::LightBuffer::getBinding |
( |
uint32_t |
binding | ) |
const |
Creates the descriptor write for this buffer.
◆ getBinding() [2/2]
C3D_API ashes::WriteDescriptorSet castor3d::LightBuffer::getBinding |
( |
uint32_t |
binding, |
|
|
VkDeviceSize |
offset, |
|
|
VkDeviceSize |
size |
|
) |
| const |
Creates the descriptor write for this buffer.
◆ getData()
- Returns
- The pointer to the data for given light source.
◆ getIndex()
C3D_API uint32_t castor3d::LightBuffer::getIndex |
( |
Light const & |
light | ) |
const |
- Returns
- The light source buffer index.
◆ getLights()
LightsArray castor3d::LightBuffer::getLights |
( |
LightType |
type | ) |
const |
|
inline |
◆ getPtr()
uint8_t * castor3d::LightBuffer::getPtr |
( |
| ) |
|
|
inline |
◆ getType()
VkDescriptorType castor3d::LightBuffer::getType |
( |
| ) |
const |
|
inline |
◆ operator[]() [1/2]
LightData & castor3d::LightBuffer::operator[] |
( |
size_t |
index | ) |
|
|
inline |
◆ operator[]() [2/2]
LightData const & castor3d::LightBuffer::operator[] |
( |
size_t |
index | ) |
const |
|
inline |
◆ 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()
C3D_API void castor3d::LightBuffer::upload |
( |
ashes::CommandBuffer const & |
commandBuffer | ) |
|
Uploads the buffer to VRAM.
- Parameters
-
[in] | commandBuffer | Receives the upload commands. |
◆ DataSize
constexpr uint32_t castor3d::LightBuffer::DataSize = sizeof( LightData ) |
|
staticconstexpr |
The documentation for this class was generated from the following file: