Castor3D 0.16.0
Multiplatform 3D engine
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
castor3d::PostEffect Class Referenceabstract

#include <PostEffect.hpp>

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

Public Types

enum class  Kind { eHDR , eSRGB , eOverlay }
 

Public Member Functions

virtual C3D_API ~PostEffect () noexcept=default
 Destructor.
 
C3D_API bool writeInto (castor::StringStream &file, castor::String const &tabs)
 Writes the effect into a text file.
 
C3D_API bool initialise (castor3d::RenderDevice const &device, Texture const &source, Texture const &target, crg::FramePass const &previousPass)
 Initialisation function.
 
C3D_API void cleanup (castor3d::RenderDevice const &device)
 Cleanup function.
 
C3D_API bool update (CpuUpdater &updater, Texture const &source)
 
C3D_API void update (GpuUpdater &updater)
 
virtual C3D_API void accept (ConfigurationVisitorBase &visitor)=0
 Visitor acceptance function.
 
void enable (bool value) noexcept
 
virtual C3D_API crg::FramePass const & getPass () const =0
 
virtual C3D_API void setParameters (Parameters parameters)=0
 
bool isAfterToneMapping () const noexcept
 
castor::String const & getFullName () const noexcept
 
bool const & isEnabled () const noexcept
 
- Public Member Functions inherited from castor::OwnedBy< RenderSystem >
RenderSystem * getOwner () const
 
- Public Member Functions inherited from castor::NamedBaseT< T >
 NamedBaseT (T name) noexcept
 Constructor.
 
T const & getName () const noexcept
 Retrieves the name.
 
void rename (T name) noexcept
 

Protected Member Functions

C3D_API PostEffect (castor::String const &name, castor::String const &groupName, castor::String const &fullName, RenderTarget &renderTarget, RenderSystem &renderSystem, Parameters const &parameters, uint32_t passesCount=1u, Kind kind=Kind::eHDR)
 Constructor.
 
- Protected Member Functions inherited from castor::OwnedBy< RenderSystem >
 OwnedBy (RenderSystem &owner)
 Constructor.
 

Protected Attributes

castor::String m_fullName
 
RenderTargetm_renderTarget
 
crg::FramePassGroup & m_graph
 
uint32_t m_passesCount { 1u }
 
Kind m_kind { Kind::eHDR }
 
bool m_enabled { true }
 
uint32_t m_passIndex {}
 
Texture const * m_source {}
 
- Protected Attributes inherited from castor::NamedBaseT< T >
m_name
 

Member Enumeration Documentation

◆ Kind

enum class castor3d::PostEffect::Kind
strong
Enumerator
eHDR 
eSRGB 
eOverlay 

Constructor & Destructor Documentation

◆ PostEffect()

C3D_API castor3d::PostEffect::PostEffect ( castor::String const & name,
castor::String const & groupName,
castor::String const & fullName,
RenderTarget & renderTarget,
RenderSystem & renderSystem,
Parameters const & parameters,
uint32_t passesCount = 1u,
Kind kind = Kind::eHDR )
protected

Constructor.

Parameters
[in]nameThe effect name.
[in]groupNameThe effect passes group name.
[in]fullNameThe effect full (fancy) name.
[in]renderTargetThe render target to which is attached this effect.
[in]renderSystemThe render system.
[in]parametersThe optional parameters.
[in]passesCountThe number of passes for this post effect.
[in]kindThe post effect kind.

◆ ~PostEffect()

virtual C3D_API castor3d::PostEffect::~PostEffect ( )
virtualdefaultnoexcept

Destructor.

Member Function Documentation

◆ accept()

virtual C3D_API void castor3d::PostEffect::accept ( ConfigurationVisitorBase & visitor)
pure virtual

Visitor acceptance function.

Parameters
visitorThe ... visitor.

◆ cleanup()

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

Cleanup function.

Parameters
[in]deviceThe GPU device.

◆ enable()

void castor3d::PostEffect::enable ( bool value)
inlinenoexcept

name Mutators.

References m_enabled.

◆ getFullName()

castor::String const & castor3d::PostEffect::getFullName ( ) const
inlinenoexcept

References m_fullName.

◆ getPass()

virtual C3D_API crg::FramePass const & castor3d::PostEffect::getPass ( ) const
pure virtual

name Getters.

◆ initialise()

C3D_API bool castor3d::PostEffect::initialise ( castor3d::RenderDevice const & device,
Texture const & source,
Texture const & target,
crg::FramePass const & previousPass )

Initialisation function.

Parameters
[in]deviceThe GPU device.
[in]sourceThe source texture.
[in]targetThe target texture.
[in]previousPassThe previous frame pass.
Returns
true if ok.

◆ isAfterToneMapping()

bool castor3d::PostEffect::isAfterToneMapping ( ) const
inlinenoexcept

References eSRGB, and m_kind.

◆ isEnabled()

bool const & castor3d::PostEffect::isEnabled ( ) const
inlinenoexcept

References m_enabled.

◆ setParameters()

virtual C3D_API void castor3d::PostEffect::setParameters ( Parameters parameters)
pure virtual

◆ update() [1/2]

C3D_API bool castor3d::PostEffect::update ( CpuUpdater & updater,
Texture const & source )
Parameters
[in,out]updaterThe update data.
[in]sourceThe current source image.

◆ update() [2/2]

C3D_API void castor3d::PostEffect::update ( GpuUpdater & updater)
Parameters
[in,out]updaterThe update data.

◆ writeInto()

C3D_API bool castor3d::PostEffect::writeInto ( castor::StringStream & file,
castor::String const & tabs )

Writes the effect into a text file.

Parameters
[in]fileThe file.
[in]tabsThe current indentation.

Member Data Documentation

◆ m_enabled

bool castor3d::PostEffect::m_enabled { true }
protected

Referenced by enable(), and isEnabled().

◆ m_fullName

castor::String castor3d::PostEffect::m_fullName
protected

Referenced by getFullName().

◆ m_graph

crg::FramePassGroup& castor3d::PostEffect::m_graph
protected

◆ m_kind

Kind castor3d::PostEffect::m_kind { Kind::eHDR }
protected

Referenced by isAfterToneMapping().

◆ m_passesCount

uint32_t castor3d::PostEffect::m_passesCount { 1u }
protected

◆ m_passIndex

uint32_t castor3d::PostEffect::m_passIndex {}
protected

◆ m_renderTarget

RenderTarget& castor3d::PostEffect::m_renderTarget
protected

◆ m_source

Texture const* castor3d::PostEffect::m_source {}
protected

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