Castor3D 0.16.0
Multiplatform 3D engine
Public Member Functions | List of all members
castor3d::RenderTargetCache Class Reference

#include <TargetCache.hpp>

Inheritance diagram for castor3d::RenderTargetCache:
Inheritance graph
[legend]
Collaboration diagram for castor3d::RenderTargetCache:
Collaboration graph
[legend]

Public Member Functions

C3D_API RenderTargetCache (Engine &engine)
 Constructor.
 
C3D_API RenderTargetRPtr add (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
 
ToneMappingFactorygetToneMappingFactory ()
 
PostEffectFactory const & getPostEffectFactory () const
 
PostEffectFactorygetPostEffectFactory ()
 
RenderTargetArray const & getRenderTargets (TargetType type)
 
- Public Member Functions inherited from castor::OwnedBy< Engine >
Engine * getOwner () const
 

Additional Inherited Members

- Protected Member Functions inherited from castor::OwnedBy< Engine >
 OwnedBy (Engine &owner)
 Constructor.
 

Constructor & Destructor Documentation

◆ RenderTargetCache()

C3D_API castor3d::RenderTargetCache::RenderTargetCache ( Engine & engine)
explicit

Constructor.

Parameters
[in]engineThe engine.

Member Function Documentation

◆ add()

C3D_API RenderTargetRPtr castor3d::RenderTargetCache::add ( TargetType type,
castor::Size const & size,
castor::PixelFormat pixelFormat )

Creates a render target of given type.

Parameters
[in]typeThe render target type.
[in]sizeThe render target dimensions.
[in]pixelFormatThe render target pixels format.
Returns
The render target

◆ cleanup()

C3D_API void castor3d::RenderTargetCache::cleanup ( RenderDevice const & device)

Cleans up the collection.

Parameters
[in]deviceThe GPU device.

◆ clear()

C3D_API void castor3d::RenderTargetCache::clear ( )

Flushes the collection.

◆ forEach() [1/2]

template<typename FuncType >
void castor3d::RenderTargetCache::forEach ( FuncType func)
inline

Applies a function to all the elements of this cache.

Parameters
[in]funcThe function.

References lock(), and castor::makeUniqueLock().

Here is the call graph for this function:

◆ forEach() [2/2]

template<typename FuncType >
void castor3d::RenderTargetCache::forEach ( FuncType func) const
inline

Applies a function to all the elements of this cache.

Parameters
[in]funcThe function.

References lock(), and castor::makeUniqueLock().

Here is the call graph for this function:

◆ getPostEffectFactory() [1/2]

PostEffectFactory & castor3d::RenderTargetCache::getPostEffectFactory ( )
inline

◆ getPostEffectFactory() [2/2]

PostEffectFactory const & castor3d::RenderTargetCache::getPostEffectFactory ( ) const
inline

◆ getRenderTargets()

RenderTargetArray const & castor3d::RenderTargetCache::getRenderTargets ( TargetType type)
inline

References CU_Require.

◆ getToneMappingFactory() [1/2]

ToneMappingFactory & castor3d::RenderTargetCache::getToneMappingFactory ( )
inline

◆ getToneMappingFactory() [2/2]

ToneMappingFactory const & castor3d::RenderTargetCache::getToneMappingFactory ( ) const
inline

◆ getToneMappingName()

castor::String const & castor3d::RenderTargetCache::getToneMappingName ( castor::String const & name) const
inline

name Getters.

References CU_Require.

◆ lock()

void castor3d::RenderTargetCache::lock ( ) const
inline

Locks the collection mutex.

Referenced by forEach(), and forEach().

Here is the caller graph for this function:

◆ registerToneMappingName()

C3D_API void castor3d::RenderTargetCache::registerToneMappingName ( castor::String const & name,
castor::StringView fullName )

Registers tone mapping display name.

◆ remove()

C3D_API void castor3d::RenderTargetCache::remove ( RenderTarget const * target)
noexcept

Removes a render target from the render loop.

Parameters
[in]targetThe render target

◆ render()

C3D_API crg::SemaphoreWaitArray castor3d::RenderTargetCache::render ( RenderDevice const & device,
RenderInfo & info,
ashes::Queue const & queue,
crg::SemaphoreWaitArray signalsToWait )

Renders into the render targets.

Parameters
[in]deviceThe GPU device.
[in,out]infoReceives the render informations.
[in]queueThe queue to which the render commands will be submitted to.
[in]signalsToWaitThe semaphores and stages to wait for.
Returns
The semaphores and stages that will be signaled.

◆ unlock()

void castor3d::RenderTargetCache::unlock ( ) const
inline

Unlocks the collection mutex.

◆ update() [1/2]

C3D_API void castor3d::RenderTargetCache::update ( CpuUpdater & updater)

Updates the render pass, CPU wise.

Parameters
[in,out]updaterThe update data.

◆ update() [2/2]

C3D_API void castor3d::RenderTargetCache::update ( GpuUpdater & updater)

Updates the render pass, GPU wise.

Parameters
[in,out]updaterThe update data.

◆ upload()

C3D_API void castor3d::RenderTargetCache::upload ( UploadData & uploader)

Uploads all overlay GPU buffers to VRAM.

Parameters
[in,out]uploaderReceives the upload requests.

The documentation for this class was generated from the following file: