![]() |
Castor3D 0.17.0
Multiplatform 3D engine
|
#include <TargetCache.hpp>
Public Member Functions | |
C3D_API | RenderTargetCache (Engine &engine) |
Constructor. | |
C3D_API RenderTargetRPtr | addNew (TargetType type, castor::Size const &size, castor::PixelFormat pixelFormat) |
Creates a render target of given type. | |
C3D_API void | remove (RenderTarget const *target) noexcept |
Removes a render target from the render loop. | |
C3D_API void | update (CpuUpdater &updater) |
Updates the render pass, CPU wise. | |
C3D_API void | update (GpuUpdater &updater) |
Updates the render pass, GPU wise. | |
C3D_API void | upload (UploadData &uploader) |
Uploads all overlay GPU buffers to VRAM. | |
C3D_API crg::SemaphoreWaitArray | render (RenderDevice const &device, RenderInfo &info, ashes::Queue const &queue, crg::SemaphoreWaitArray signalsToWait) |
Renders into the render targets. | |
C3D_API void | cleanup (RenderDevice const &device) |
Cleans up the collection. | |
C3D_API void | clear () |
Flushes the collection. | |
C3D_API void | registerToneMappingName (castor::String const &name, castor::StringView fullName) |
Registers tone mapping display name. | |
void | lock () const |
Locks the collection mutex. | |
void | unlock () const |
Unlocks the collection mutex. | |
template<typename FuncType > | |
void | forEach (FuncType func) const |
Applies a function to all the elements of this cache. | |
template<typename FuncType > | |
void | forEach (FuncType func) |
Applies a function to all the elements of this cache. | |
castor::String const & | getToneMappingName (castor::String const &name) const |
ToneMappingFactory const & | getToneMappingFactory () const |
ToneMappingFactory & | getToneMappingFactory () |
PostEffectFactory const & | getPostEffectFactory () const |
PostEffectFactory & | getPostEffectFactory () |
RenderTargetArray const & | getRenderTargets (TargetType type) |
![]() | |
Engine * | getOwner () const noexcept |
void | setOwner (Engine &owner) noexcept |
Additional Inherited Members | |
![]() | |
OwnedBy (Engine &owner) noexcept | |
Constructor. | |
Constructor.
[in] | engine | The engine. |
C3D_API RenderTargetRPtr castor3d::RenderTargetCache::addNew | ( | TargetType | type, |
castor::Size const & | size, | ||
castor::PixelFormat | pixelFormat ) |
Creates a render target of given type.
[in] | type | The render target type. |
[in] | size | The render target dimensions. |
[in] | pixelFormat | The render target pixels format. |
C3D_API void castor3d::RenderTargetCache::cleanup | ( | RenderDevice const & | device | ) |
Cleans up the collection.
[in] | device | The GPU device. |
C3D_API void castor3d::RenderTargetCache::clear | ( | ) |
Flushes the collection.
|
inline |
Applies a function to all the elements of this cache.
[in] | func | The function. |
References lock(), and castor::makeUniqueLock().
|
inline |
Applies a function to all the elements of this cache.
[in] | func | The function. |
References lock(), and castor::makeUniqueLock().
|
inline |
|
inline |
|
inline |
References CU_Require.
|
inline |
|
inline |
|
inline |
name Getters.
References CU_Require.
|
inline |
C3D_API void castor3d::RenderTargetCache::registerToneMappingName | ( | castor::String const & | name, |
castor::StringView | fullName ) |
Registers tone mapping display name.
|
noexcept |
Removes a render target from the render loop.
[in] | target | The render target |
C3D_API crg::SemaphoreWaitArray castor3d::RenderTargetCache::render | ( | RenderDevice const & | device, |
RenderInfo & | info, | ||
ashes::Queue const & | queue, | ||
crg::SemaphoreWaitArray | signalsToWait ) |
Renders into the render targets.
[in] | device | The GPU device. |
[in,out] | info | Receives the render informations. |
[in] | queue | The queue to which the render commands will be submitted to. |
[in] | signalsToWait | The semaphores and stages to wait for. |
|
inline |
Unlocks the collection mutex.
C3D_API void castor3d::RenderTargetCache::update | ( | CpuUpdater & | updater | ) |
Updates the render pass, CPU wise.
[in,out] | updater | The update data. |
C3D_API void castor3d::RenderTargetCache::update | ( | GpuUpdater & | updater | ) |
Updates the render pass, GPU wise.
[in,out] | updater | The update data. |
C3D_API void castor3d::RenderTargetCache::upload | ( | UploadData & | uploader | ) |
Uploads all overlay GPU buffers to VRAM.
[in,out] | uploader | Receives the upload requests. |