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

#include <RenderTarget.hpp>

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

Public Member Functions

C3D_API RenderTarget (Engine &engine, TargetType type, castor::Size const &size, castor::PixelFormat pixelFormat)
 Specified constructor.
 
C3D_API ~RenderTarget () noexcept
 Destructor.
 
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 overlays GPU buffers to VRAM.
 
C3D_API crg::SemaphoreWaitArray render (ashes::Queue const &queue, crg::SemaphoreWaitArray const &toWait={})
 Renders one frame.
 
uint32_t countInitialisationSteps () const noexcept
 
C3D_API void initialise (RenderDevice const &device, QueueData const &queueData, ProgressBar *progress=nullptr)
 Initialisation function.
 
C3D_API void initialise (OnInitialisedFunc const &onInitialised, ProgressBar *progress=nullptr)
 Initialisation function.
 
C3D_API void cleanup (RenderDevice const &device)
 Cleanup function.
 
C3D_API ViewportType getViewportType () const
 
C3D_API void setViewportType (ViewportType value)
 Sets the ViewportType.
 
C3D_API void setCamera (Camera &camera)
 Sets the camera.
 
C3D_API void setScene (Scene &scene)
 Sets the scene.
 
C3D_API void setToneMappingType (castor::StringView name)
 Sets the tone mapping implementation type.
 
C3D_API PostEffectRPtr getPostEffect (castor::String const &name) const
 adds a post effect to the list.
 
C3D_API void resetSemaphore ()
 
C3D_API crg::FramePass const & createVertexTransformPass (crg::FramePassGroup &graph)
 
C3D_API HdrConfig const & getHdrConfig () const
 
C3D_API HdrConfiggetHdrConfig ()
 
C3D_API ColourGradingConfig const & getColourGradingConfig () const
 
C3D_API ColourGradingConfiggetColourGradingConfig ()
 
C3D_API ShadowMapLightTypeArray getShadowMaps () const
 
C3D_API ShadowBuffergetShadowBuffer () const
 
C3D_API TechniquePassVector getCustomRenderPasses () const
 
C3D_API CameraUbo const & getCameraUbo () const
 
C3D_API SceneUbo const & getSceneUbo () const
 
C3D_API bool hasIndirect () const noexcept
 
C3D_API bool hasSss () const noexcept
 
C3D_API bool areDebugTargetsEnabled () const noexcept
 
SsaoConfig const & getSsaoConfig () const noexcept
 
SsaoConfiggetSsaoConfig () noexcept
 
bool isInitialised () const noexcept
 
castor::Size const & getSize () const noexcept
 
bool hasTechnique () const noexcept
 
RenderTechniquegetTechnique () const noexcept
 
SceneRPtr getScene () const noexcept
 
CameraRPtr getCamera () const noexcept
 
Texture const & getTexture () const noexcept
 
Texture const & getVelocity () const noexcept
 
VkFormat getPixelFormat () const noexcept
 
TargetType getTargetType () const noexcept
 
uint32_t getIndex () const noexcept
 
PostEffectArray const & getHDRPostEffects () const noexcept
 
PostEffectArray const & getSRGBPostEffects () const noexcept
 
ToneMappingRPtr getToneMapping () const noexcept
 
crg::SemaphoreWaitArray const & getSemaphore () const noexcept
 
SceneCuller const & getCuller () const noexcept
 
SceneCullergetCuller () noexcept
 
castor::Point2f const & getJitter () const noexcept
 
castor::String const & getName () const noexcept
 
HdrConfigUbo const & getHdrConfigUbo () const noexcept
 
ColourGradingUbo const & getColourGradingUbo () const noexcept
 
crg::FrameGraph & getGraph () noexcept
 
crg::ResourcesCache & getResources () noexcept
 
bool isInitialising () const noexcept
 
bool isUsingStereo () const noexcept
 
float getIntraOcularDistance () const noexcept
 
IntermediateViewArray const & getIntermediateViews () const noexcept
 
bool isFullLoadingEnabled () const noexcept
 
ClustersConfig const & getClustersConfig () const noexcept
 
FrustumClustersgetFrustumClusters () const noexcept
 
void setSsaoConfig (SsaoConfig config) noexcept
 
void setJitter (castor::Point2f const &value) noexcept
 
void setStereo (bool value) noexcept
 
void setIntraOcularDistance (float value) noexcept
 
TargetDebugConfiggetDebugConfig () noexcept
 
ClustersConfiggetClustersConfig () noexcept
 
void enableFullLoading (bool value) noexcept
 
void setClustersConfig (ClustersConfig config) noexcept
 
- Public Member Functions inherited from castor::OwnedBy< Engine >
Engine * getOwner () const
 

Static Public Attributes

static C3D_API const castor::String DefaultSamplerName
 The render target default sampler name.
 

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ RenderTarget()

C3D_API castor3d::RenderTarget::RenderTarget ( Engine & engine,
TargetType type,
castor::Size const & size,
castor::PixelFormat pixelFormat )

Specified constructor.

Parameters
[in]engineThe engine.
[in]typeThe render target type.
[in]sizeThe render target dimensions.
[in]pixelFormatThe target's pixels format.

◆ ~RenderTarget()

C3D_API castor3d::RenderTarget::~RenderTarget ( )
noexcept

Destructor.

Member Function Documentation

◆ areDebugTargetsEnabled()

C3D_API bool castor3d::RenderTarget::areDebugTargetsEnabled ( ) const
noexcept

◆ cleanup()

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

Cleanup function.

Parameters
[in]deviceThe GPU device.

◆ countInitialisationSteps()

uint32_t castor3d::RenderTarget::countInitialisationSteps ( ) const
noexcept
Returns
The number of steps needed for initialisation, to show progression.

◆ createVertexTransformPass()

C3D_API crg::FramePass const & castor3d::RenderTarget::createVertexTransformPass ( crg::FramePassGroup & graph)

◆ enableFullLoading()

void castor3d::RenderTarget::enableFullLoading ( bool value)
inlinenoexcept

◆ getCamera()

CameraRPtr castor3d::RenderTarget::getCamera ( ) const
inlinenoexcept

◆ getCameraUbo()

C3D_API CameraUbo const & castor3d::RenderTarget::getCameraUbo ( ) const

◆ getClustersConfig() [1/2]

ClustersConfig const & castor3d::RenderTarget::getClustersConfig ( ) const
inlinenoexcept

◆ getClustersConfig() [2/2]

ClustersConfig & castor3d::RenderTarget::getClustersConfig ( )
inlinenoexcept

◆ getColourGradingConfig() [1/2]

C3D_API ColourGradingConfig & castor3d::RenderTarget::getColourGradingConfig ( )

◆ getColourGradingConfig() [2/2]

C3D_API ColourGradingConfig const & castor3d::RenderTarget::getColourGradingConfig ( ) const

◆ getColourGradingUbo()

ColourGradingUbo const & castor3d::RenderTarget::getColourGradingUbo ( ) const
inlinenoexcept

References CU_Require.

◆ getCuller() [1/2]

SceneCuller const & castor3d::RenderTarget::getCuller ( ) const
inlinenoexcept

References CU_Require.

◆ getCuller() [2/2]

SceneCuller & castor3d::RenderTarget::getCuller ( )
inlinenoexcept

References CU_Require.

◆ getCustomRenderPasses()

C3D_API TechniquePassVector castor3d::RenderTarget::getCustomRenderPasses ( ) const

◆ getDebugConfig()

TargetDebugConfig & castor3d::RenderTarget::getDebugConfig ( )
inlinenoexcept

◆ getFrustumClusters()

FrustumClusters * castor3d::RenderTarget::getFrustumClusters ( ) const
inlinenoexcept

◆ getGraph()

crg::FrameGraph & castor3d::RenderTarget::getGraph ( )
inlinenoexcept

◆ getHdrConfig() [1/2]

C3D_API HdrConfig & castor3d::RenderTarget::getHdrConfig ( )

◆ getHdrConfig() [2/2]

C3D_API HdrConfig const & castor3d::RenderTarget::getHdrConfig ( ) const

name Getters.

◆ getHdrConfigUbo()

HdrConfigUbo const & castor3d::RenderTarget::getHdrConfigUbo ( ) const
inlinenoexcept

References CU_Require.

◆ getHDRPostEffects()

PostEffectArray const & castor3d::RenderTarget::getHDRPostEffects ( ) const
inlinenoexcept

◆ getIndex()

uint32_t castor3d::RenderTarget::getIndex ( ) const
inlinenoexcept

◆ getIntermediateViews()

IntermediateViewArray const & castor3d::RenderTarget::getIntermediateViews ( ) const
inlinenoexcept

◆ getIntraOcularDistance()

float castor3d::RenderTarget::getIntraOcularDistance ( ) const
inlinenoexcept

◆ getJitter()

castor::Point2f const & castor3d::RenderTarget::getJitter ( ) const
inlinenoexcept

◆ getName()

castor::String const & castor3d::RenderTarget::getName ( ) const
inlinenoexcept

◆ getPixelFormat()

VkFormat castor3d::RenderTarget::getPixelFormat ( ) const
inlinenoexcept

◆ getPostEffect()

C3D_API PostEffectRPtr castor3d::RenderTarget::getPostEffect ( castor::String const & name) const

adds a post effect to the list.

Parameters
[in]nameThe effect name.

◆ getResources()

crg::ResourcesCache & castor3d::RenderTarget::getResources ( )
inlinenoexcept

◆ getScene()

SceneRPtr castor3d::RenderTarget::getScene ( ) const
inlinenoexcept

◆ getSceneUbo()

C3D_API SceneUbo const & castor3d::RenderTarget::getSceneUbo ( ) const

◆ getSemaphore()

crg::SemaphoreWaitArray const & castor3d::RenderTarget::getSemaphore ( ) const
inlinenoexcept

◆ getShadowBuffer()

C3D_API ShadowBuffer * castor3d::RenderTarget::getShadowBuffer ( ) const

◆ getShadowMaps()

C3D_API ShadowMapLightTypeArray castor3d::RenderTarget::getShadowMaps ( ) const

◆ getSize()

castor::Size const & castor3d::RenderTarget::getSize ( ) const
inlinenoexcept

◆ getSRGBPostEffects()

PostEffectArray const & castor3d::RenderTarget::getSRGBPostEffects ( ) const
inlinenoexcept

◆ getSsaoConfig() [1/2]

SsaoConfig const & castor3d::RenderTarget::getSsaoConfig ( ) const
inlinenoexcept

◆ getSsaoConfig() [2/2]

SsaoConfig & castor3d::RenderTarget::getSsaoConfig ( )
inlinenoexcept

◆ getTargetType()

TargetType castor3d::RenderTarget::getTargetType ( ) const
inlinenoexcept

◆ getTechnique()

RenderTechnique & castor3d::RenderTarget::getTechnique ( ) const
inlinenoexcept

References CU_Require, and hasTechnique().

Here is the call graph for this function:

◆ getTexture()

Texture const & castor3d::RenderTarget::getTexture ( ) const
inlinenoexcept

◆ getToneMapping()

ToneMappingRPtr castor3d::RenderTarget::getToneMapping ( ) const
inlinenoexcept

References CU_Require.

◆ getVelocity()

Texture const & castor3d::RenderTarget::getVelocity ( ) const
inlinenoexcept

◆ getViewportType()

C3D_API ViewportType castor3d::RenderTarget::getViewportType ( ) const
Returns
The ViewportType.

◆ hasIndirect()

C3D_API bool castor3d::RenderTarget::hasIndirect ( ) const
noexcept

◆ hasSss()

C3D_API bool castor3d::RenderTarget::hasSss ( ) const
noexcept

◆ hasTechnique()

bool castor3d::RenderTarget::hasTechnique ( ) const
inlinenoexcept

Referenced by getTechnique().

Here is the caller graph for this function:

◆ initialise() [1/2]

C3D_API void castor3d::RenderTarget::initialise ( OnInitialisedFunc const & onInitialised,
ProgressBar * progress = nullptr )

Initialisation function.

Parameters
[in]onInitialisedThe callback called when initialisation ends.
[in]progressThe optional progress bar.

◆ initialise() [2/2]

C3D_API void castor3d::RenderTarget::initialise ( RenderDevice const & device,
QueueData const & queueData,
ProgressBar * progress = nullptr )

Initialisation function.

Parameters
[in]deviceThe GPU device.
[in]queueDataThe queue receiving the GPU commands.
[in]progressThe optional progress bar.

◆ isFullLoadingEnabled()

bool castor3d::RenderTarget::isFullLoadingEnabled ( ) const
inlinenoexcept

◆ isInitialised()

bool castor3d::RenderTarget::isInitialised ( ) const
inlinenoexcept

◆ isInitialising()

bool castor3d::RenderTarget::isInitialising ( ) const
inlinenoexcept

◆ isUsingStereo()

bool castor3d::RenderTarget::isUsingStereo ( ) const
inlinenoexcept

◆ render()

C3D_API crg::SemaphoreWaitArray castor3d::RenderTarget::render ( ashes::Queue const & queue,
crg::SemaphoreWaitArray const & toWait = {} )

Renders one frame.

Parameters
[in]queueThe queue receiving the render commands.
[in]toWaitThe semaphores to wait.
Returns
The semaphores signaled by this render.

◆ resetSemaphore()

C3D_API void castor3d::RenderTarget::resetSemaphore ( )

◆ setCamera()

C3D_API void castor3d::RenderTarget::setCamera ( Camera & camera)

Sets the camera.

Remarks
Defines also LEye and REye cameras.
Parameters
[in]cameraThe new camera.

◆ setClustersConfig()

void castor3d::RenderTarget::setClustersConfig ( ClustersConfig config)
inlinenoexcept

◆ setIntraOcularDistance()

void castor3d::RenderTarget::setIntraOcularDistance ( float value)
inlinenoexcept

◆ setJitter()

void castor3d::RenderTarget::setJitter ( castor::Point2f const & value)
inlinenoexcept

◆ setScene()

C3D_API void castor3d::RenderTarget::setScene ( Scene & scene)

Sets the scene.

Parameters
[in]sceneThe new scene.

◆ setSsaoConfig()

void castor3d::RenderTarget::setSsaoConfig ( SsaoConfig config)
inlinenoexcept

name Mutators.

◆ setStereo()

void castor3d::RenderTarget::setStereo ( bool value)
inlinenoexcept

◆ setToneMappingType()

C3D_API void castor3d::RenderTarget::setToneMappingType ( castor::StringView name)

Sets the tone mapping implementation type.

Parameters
[in]nameThe type.

◆ setViewportType()

C3D_API void castor3d::RenderTarget::setViewportType ( ViewportType value)

Sets the ViewportType.

Parameters
[in]valueThe new ViewportType.

◆ update() [1/2]

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

Updates the render pass, CPU wise.

Parameters
[in,out]updaterThe update data.

◆ update() [2/2]

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

Updates the render pass, GPU wise.

Parameters
[in,out]updaterThe update data.

◆ upload()

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

Uploads overlays GPU buffers to VRAM.

Parameters
[in,out]uploaderReceives the upload requests.

Member Data Documentation

◆ DefaultSamplerName

C3D_API const castor::String castor3d::RenderTarget::DefaultSamplerName
static

The render target default sampler name.


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