![]() |
Castor3D 0.12.0
Multiplatform 3D engine
|
#include <LightCache.hpp>
Public Types | |
using | ElementT = Light |
using | ElementKeyT = castor::String |
using | ElementCacheTraitsT = LightCacheTraits |
using | ElementObjectCacheT = ObjectCacheBaseT< ElementT, ElementKeyT, ElementCacheTraitsT > |
using | ElementPtrT = typename ElementObjectCacheT::ElementPtrT |
using | ElementContT = typename ElementObjectCacheT::ElementContT |
using | ElementInitialiserT = typename ElementObjectCacheT::ElementInitialiserT |
using | ElementCleanerT = typename ElementObjectCacheT::ElementCleanerT |
using | ElementMergerT = typename ElementObjectCacheT::ElementMergerT |
using | ElementAttacherT = typename ElementObjectCacheT::ElementAttacherT |
using | ElementDetacherT = typename ElementObjectCacheT::ElementDetacherT |
![]() | |
using | OnChangedFunction = std::function< void() > |
using | OnChanged = castor::SignalT< OnChangedFunction > |
Public Member Functions | |
C3D_API | ObjectCacheT (Scene &scene, SceneNodeSPtr rootNode, SceneNodeSPtr rootCameraNode, SceneNodeSPtr rootObjectNode) |
Constructor. More... | |
C3D_API | ~ObjectCacheT ()=default |
Destructor. More... | |
C3D_API void | initialise (castor3d::RenderDevice const &device) |
Intialises GPU buffer. More... | |
C3D_API void | cleanup () |
Sets all the elements to be cleaned up. More... | |
C3D_API void | update (CpuUpdater &updater) |
Updates the render pass, CPU wise. More... | |
C3D_API void | update (GpuUpdater &updater) |
Updates the render pass, GPU wise. More... | |
C3D_API void | upload (ashes::CommandBuffer const &cb) const |
Uploads all GPU buffers to VRAM. More... | |
C3D_API LightsArray | getLights (LightType type) const |
Retrieves the lights of given type. More... | |
C3D_API void | createPassBinding (crg::FramePass &pass, uint32_t binding) const |
Creates a frame pass binding. More... | |
C3D_API VkDescriptorSetLayoutBinding | createLayoutBinding (uint32_t index=0u) const |
Creates the descriptor set layout binding at given point. More... | |
C3D_API ashes::WriteDescriptorSet | getBinding (uint32_t binding) const |
Creates the descriptor write for the lights buffer. More... | |
C3D_API ashes::WriteDescriptorSet | getBinding (uint32_t binding, VkDeviceSize offset, VkDeviceSize size) const |
Creates the descriptor write for the lights buffer. More... | |
uint32_t | getLightsCount (LightType type) const |
Retrieves the count of the lights of given type. More... | |
![]() | |
void | mergeInto (ElementObjectCacheT &destination) |
Merges this cache's elements to the one given. More... | |
Engine * | getEngine () const |
castor::String const & | getObjectTypeName () const |
Light cache.
using castor3d::ObjectCacheT< Light, castor::String, LightCacheTraits >::ElementAttacherT = typename ElementObjectCacheT::ElementAttacherT |
using castor3d::ObjectCacheT< Light, castor::String, LightCacheTraits >::ElementCacheTraitsT = LightCacheTraits |
using castor3d::ObjectCacheT< Light, castor::String, LightCacheTraits >::ElementCleanerT = typename ElementObjectCacheT::ElementCleanerT |
using castor3d::ObjectCacheT< Light, castor::String, LightCacheTraits >::ElementContT = typename ElementObjectCacheT::ElementContT |
using castor3d::ObjectCacheT< Light, castor::String, LightCacheTraits >::ElementDetacherT = typename ElementObjectCacheT::ElementDetacherT |
using castor3d::ObjectCacheT< Light, castor::String, LightCacheTraits >::ElementInitialiserT = typename ElementObjectCacheT::ElementInitialiserT |
using castor3d::ObjectCacheT< Light, castor::String, LightCacheTraits >::ElementKeyT = castor::String |
using castor3d::ObjectCacheT< Light, castor::String, LightCacheTraits >::ElementMergerT = typename ElementObjectCacheT::ElementMergerT |
using castor3d::ObjectCacheT< Light, castor::String, LightCacheTraits >::ElementObjectCacheT = ObjectCacheBaseT< ElementT, ElementKeyT, ElementCacheTraitsT > |
using castor3d::ObjectCacheT< Light, castor::String, LightCacheTraits >::ElementPtrT = typename ElementObjectCacheT::ElementPtrT |
using castor3d::ObjectCacheT< Light, castor::String, LightCacheTraits >::ElementT = Light |
C3D_API castor3d::ObjectCacheT< Light, castor::String, LightCacheTraits >::ObjectCacheT | ( | Scene & | scene, |
SceneNodeSPtr | rootNode, | ||
SceneNodeSPtr | rootCameraNode, | ||
SceneNodeSPtr | rootObjectNode | ||
) |
Constructor.
[in] | scene | The scene. |
[in] | rootNode | The root node. |
[in] | rootCameraNode | The cameras root node. |
[in] | rootObjectNode | The objects root node. |
|
default |
Destructor.
C3D_API void castor3d::ObjectCacheT< Light, castor::String, LightCacheTraits >::cleanup | ( | ) |
Sets all the elements to be cleaned up.
C3D_API VkDescriptorSetLayoutBinding castor3d::ObjectCacheT< Light, castor::String, LightCacheTraits >::createLayoutBinding | ( | uint32_t | index = 0u | ) | const |
Creates the descriptor set layout binding at given point.
[in] | index | The binding point index. |
C3D_API void castor3d::ObjectCacheT< Light, castor::String, LightCacheTraits >::createPassBinding | ( | crg::FramePass & | pass, |
uint32_t | binding | ||
) | const |
Creates a frame pass binding.
C3D_API ashes::WriteDescriptorSet castor3d::ObjectCacheT< Light, castor::String, LightCacheTraits >::getBinding | ( | uint32_t | binding | ) | const |
Creates the descriptor write for the lights buffer.
C3D_API ashes::WriteDescriptorSet castor3d::ObjectCacheT< Light, castor::String, LightCacheTraits >::getBinding | ( | uint32_t | binding, |
VkDeviceSize | offset, | ||
VkDeviceSize | size | ||
) | const |
Creates the descriptor write for the lights buffer.
C3D_API LightsArray castor3d::ObjectCacheT< Light, castor::String, LightCacheTraits >::getLights | ( | LightType | type | ) | const |
Retrieves the lights of given type.
[in] | type | The light type. |
|
inline |
Retrieves the count of the lights of given type.
[in] | type | The light type. |
C3D_API void castor3d::ObjectCacheT< Light, castor::String, LightCacheTraits >::initialise | ( | castor3d::RenderDevice const & | device | ) |
Intialises GPU buffer.
[in] | device | The GPU device. |
C3D_API void castor3d::ObjectCacheT< Light, castor::String, LightCacheTraits >::update | ( | CpuUpdater & | updater | ) |
Updates the render pass, CPU wise.
[in,out] | updater | The update data. |
C3D_API void castor3d::ObjectCacheT< Light, castor::String, LightCacheTraits >::update | ( | GpuUpdater & | updater | ) |
Updates the render pass, GPU wise.
[in,out] | updater | The update data. |
C3D_API void castor3d::ObjectCacheT< Light, castor::String, LightCacheTraits >::upload | ( | ashes::CommandBuffer const & | cb | ) | const |
Uploads all GPU buffers to VRAM.
[in] | cb | The command buffer on which transfer commands are recorded. |