LiteFX 0.3.1.2022
Computer Graphics Engine
LiteFX::Rendering::RenderTarget Class Reference

Implements a render target. More...

#include <rendering_api.hpp>

Inherits LiteFX::Rendering::IRenderTarget.

Classes

class  RenderTargetImpl
 

Public Member Functions

 RenderTarget () noexcept
 
 RenderTarget (const UInt32 &location, const RenderTargetType &type, const Format &format, const bool &clearBuffer, const Vector4f &clearValues={ 0.f, 0.f, 0.f, 0.f }, const bool &clearStencil=true, const bool &isVolatile=false, const BlendState &blendState={})
 Initializes the render target. More...
 
 RenderTarget (const String &name, const UInt32 &location, const RenderTargetType &type, const Format &format, const bool &clearBuffer, const Vector4f &clearValues={ 0.f, 0.f, 0.f, 0.f }, const bool &clearStencil=true, const bool &isVolatile=false, const BlendState &blendState={})
 Initializes the render target. More...
 
 RenderTarget (const RenderTarget &) noexcept
 
 RenderTarget (RenderTarget &&) noexcept
 
virtual ~RenderTarget () noexcept
 
RenderTargetoperator= (const RenderTarget &) noexcept
 
RenderTargetoperator= (RenderTarget &&) noexcept
 
virtual const Stringname () const noexcept override
 Returns the name of the render target. More...
 
virtual const UInt32location () const noexcept override
 Returns the location of the render target output attachment within the fragment shader. More...
 
virtual const RenderTargetType & type () const noexcept override
 Returns the type of the render target. More...
 
virtual const Format & format () const noexcept override
 Returns the internal format of the render target. More...
 
virtual const bool & clearBuffer () const noexcept override
 Returns true, if the render target should be cleared, when the render pass is started. If the format is set to a depth format, this clears the depth buffer. Otherwise it clears the color buffer. More...
 
virtual const bool & clearStencil () const noexcept override
 Returns true, if the render target stencil should be cleared, when the render pass is started. If the format is does not contain a stencil channel, this has no effect. More...
 
virtual const Vector4fclearValues () const noexcept override
 Returns the value, the render target is cleared with, if clearBuffer either or clearStencil is specified. More...
 
virtual const bool & isVolatile () const noexcept override
 Returns true, if the target should not be made persistent for access after the render pass has finished. More...
 
virtual const BlendStateblendState () const noexcept override
 Returns the render targets blend state. More...
 
- Public Member Functions inherited from LiteFX::Rendering::IRenderTarget
virtual ~IRenderTarget () noexcept=default
 
virtual const Stringname () const noexcept=0
 Returns the name of the render target. More...
 
virtual const UInt32location () const noexcept=0
 Returns the location of the render target output attachment within the fragment shader. More...
 
virtual const RenderTargetType & type () const noexcept=0
 Returns the type of the render target. More...
 
virtual const Format & format () const noexcept=0
 Returns the internal format of the render target. More...
 
virtual const bool & clearBuffer () const noexcept=0
 Returns true, if the render target should be cleared, when the render pass is started. If the format is set to a depth format, this clears the depth buffer. Otherwise it clears the color buffer. More...
 
virtual const bool & clearStencil () const noexcept=0
 Returns true, if the render target stencil should be cleared, when the render pass is started. If the format is does not contain a stencil channel, this has no effect. More...
 
virtual const Vector4fclearValues () const noexcept=0
 Returns the value, the render target is cleared with, if clearBuffer either or clearStencil is specified. More...
 
virtual const bool & isVolatile () const noexcept=0
 Returns true, if the target should not be made persistent for access after the render pass has finished. More...
 
virtual const BlendStateblendState () const noexcept=0
 Returns the render targets blend state. More...
 

Detailed Description

Implements a render target.

IRenderTarget

Constructor & Destructor Documentation

◆ RenderTarget() [1/5]

RenderTarget::RenderTarget ( )
noexcept

◆ RenderTarget() [2/5]

RenderTarget::RenderTarget ( const UInt32 location,
const RenderTargetType &  type,
const Format &  format,
const bool &  clearBuffer,
const Vector4f clearValues = { 0.f , 0.f, 0.f, 0.f },
const bool &  clearStencil = true,
const bool &  isVolatile = false,
const BlendState blendState = {} 
)
explicit

Initializes the render target.

Parameters
locationThe location of the render target output attachment.
typeThe type of the render target.
formatThe format of the render target.
clearBuffertrue, if the render target should be cleared, when a render pass is started.
clearValuesThe values with which the render target gets cleared.
clearStenciltrue, if the render target stencil should be cleared, when a render pass is started.
isVolatiletrue, if the target should not be made persistent for access after the render pass has finished.
blendStateThe render target blend state.

◆ RenderTarget() [3/5]

RenderTarget::RenderTarget ( const String name,
const UInt32 location,
const RenderTargetType &  type,
const Format &  format,
const bool &  clearBuffer,
const Vector4f clearValues = { 0.f , 0.f, 0.f, 0.f },
const bool &  clearStencil = true,
const bool &  isVolatile = false,
const BlendState blendState = {} 
)
explicit

Initializes the render target.

Parameters
locationThe name of the render target.
locationThe location of the render target output attachment.
typeThe type of the render target.
formatThe format of the render target.
clearBuffertrue, if the render target should be cleared, when a render pass is started.
clearValuesThe values with which the render target gets cleared.
clearStenciltrue, if the render target stencil should be cleared, when a render pass is started.
isVolatiletrue, if the target should not be made persistent for access after the render pass has finished.
blendStateThe render target blend state.

◆ RenderTarget() [4/5]

RenderTarget::RenderTarget ( const RenderTarget _other)
noexcept

◆ RenderTarget() [5/5]

RenderTarget::RenderTarget ( RenderTarget &&  _other)
noexcept

◆ ~RenderTarget()

RenderTarget::~RenderTarget ( )
virtualdefaultnoexcept

Member Function Documentation

◆ blendState()

const IRenderTarget::BlendState & RenderTarget::blendState ( ) const
overridevirtualnoexcept

Returns the render targets blend state.

Implements LiteFX::Rendering::IRenderTarget.

◆ clearBuffer()

const bool & RenderTarget::clearBuffer ( ) const
overridevirtualnoexcept

Returns true, if the render target should be cleared, when the render pass is started. If the format is set to a depth format, this clears the depth buffer. Otherwise it clears the color buffer.

Implements LiteFX::Rendering::IRenderTarget.

◆ clearStencil()

const bool & RenderTarget::clearStencil ( ) const
overridevirtualnoexcept

Returns true, if the render target stencil should be cleared, when the render pass is started. If the format is does not contain a stencil channel, this has no effect.

Implements LiteFX::Rendering::IRenderTarget.

◆ clearValues()

const Vector4f & RenderTarget::clearValues ( ) const
overridevirtualnoexcept

Returns the value, the render target is cleared with, if clearBuffer either or clearStencil is specified.

Implements LiteFX::Rendering::IRenderTarget.

◆ format()

const Format & RenderTarget::format ( ) const
overridevirtualnoexcept

Returns the internal format of the render target.

Implements LiteFX::Rendering::IRenderTarget.

◆ isVolatile()

const bool & RenderTarget::isVolatile ( ) const
overridevirtualnoexcept

Returns true, if the target should not be made persistent for access after the render pass has finished.

Implements LiteFX::Rendering::IRenderTarget.

◆ location()

const UInt32 & RenderTarget::location ( ) const
overridevirtualnoexcept

Returns the location of the render target output attachment within the fragment shader.

Implements LiteFX::Rendering::IRenderTarget.

◆ name()

const String & RenderTarget::name ( ) const
overridevirtualnoexcept

Returns the name of the render target.

Implements LiteFX::Rendering::IRenderTarget.

◆ operator=() [1/2]

RenderTarget & RenderTarget::operator= ( const RenderTarget _other)
inlinenoexcept

◆ operator=() [2/2]

RenderTarget & RenderTarget::operator= ( RenderTarget &&  _other)
inlinenoexcept

◆ type()

const RenderTargetType & RenderTarget::type ( ) const
overridevirtualnoexcept

Returns the type of the render target.

Implements LiteFX::Rendering::IRenderTarget.