Castor3D 0.12.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. More...
 
C3D_API ~RenderTargetCache ()
 Destructor. More...
 
C3D_API RenderTargetSPtr add (TargetType type, castor::Size const &size, castor::PixelFormat pixelFormat)
 Creates a render target of given type. More...
 
C3D_API void remove (RenderTargetSPtr target)
 Removes a render target from the render loop. 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)
 Uploads all overlay GPU buffers to VRAM. More...
 
C3D_API crg::SemaphoreWaitArray render (RenderDevice const &device, RenderInfo &info, ashes::Queue const &queue, crg::SemaphoreWaitArray signalsToWait)
 Renders into the render targets. More...
 
C3D_API void cleanup (RenderDevice const &device)
 Cleans up the collection. More...
 
C3D_API void clear ()
 Flushes the collection. More...
 
C3D_API void registerToneMappingName (castor::String const &name, castor::String const &fullName)
 Registers tone mapping display name. More...
 
void lock () const
 Locks the collection mutex. More...
 
void unlock () const
 Unlocks the collection mutex. More...
 
template<typename FuncType >
void forEach (FuncType func) const
 Applies a function to all the elements of this cache. More...
 
template<typename FuncType >
void forEach (FuncType func)
 Applies a function to all the elements of this cache. More...
 
castor::String const & getToneMappingName (castor::String const &name) const
 
ToneMappingFactory const & getToneMappingFactory () const
 
ToneMappingFactorygetToneMappingFactory ()
 
PostEffectFactory const & getPostEffectFactory () const
 
PostEffectFactorygetPostEffectFactory ()
 
RenderTargetArray const & getRenderTargets (TargetType type)
 

Constructor & Destructor Documentation

◆ RenderTargetCache()

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

Constructor.

Parameters
[in]engineThe engine.

◆ ~RenderTargetCache()

C3D_API castor3d::RenderTargetCache::~RenderTargetCache ( )

Destructor.

Member Function Documentation

◆ add()

C3D_API RenderTargetSPtr 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().

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().

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

◆ 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.

◆ lock()

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

Locks the collection mutex.

Referenced by forEach().

Here is the caller graph for this function:

◆ registerToneMappingName()

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

Registers tone mapping display name.

◆ remove()

C3D_API void castor3d::RenderTargetCache::remove ( RenderTargetSPtr  target)

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 ( ashes::CommandBuffer const &  cb)

Uploads all overlay GPU buffers to VRAM.

Parameters
[in]cbThe command buffer on which transfer commands are recorded.

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