LiteFX 0.3.1.2022
Computer Graphics Engine
|
Represents a render target, i.e. an abstract view of the output of an RenderPass. More...
#include <rendering_api.hpp>
Inherited by LiteFX::Rendering::RenderTarget.
Classes | |
struct | BlendState |
Describes the blend state of the render target. More... | |
Public Member Functions | |
virtual | ~IRenderTarget () noexcept=default |
virtual const String & | name () const noexcept=0 |
Returns the name of the render target. More... | |
virtual const UInt32 & | location () 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 Vector4f & | clearValues () 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 BlendState & | blendState () const noexcept=0 |
Returns the render targets blend state. More... | |
Represents a render target, i.e. an abstract view of the output of an RenderPass.
A render target represents one output of a render pass, stored within an IImage. It is contained by a RenderPass, that contains the FrameBuffer, that stores the actual render target image resource.
|
virtualdefaultnoexcept |
|
pure virtualnoexcept |
Returns the render targets blend state.
Implemented in LiteFX::Rendering::RenderTarget.
|
pure virtualnoexcept |
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.
true
, if the render target should be cleared, when the render pass is startedImplemented in LiteFX::Rendering::RenderTarget.
|
pure virtualnoexcept |
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.
true
, if the render target stencil should be cleared, when the render pass is startedImplemented in LiteFX::Rendering::RenderTarget.
|
pure virtualnoexcept |
Returns the value, the render target is cleared with, if clearBuffer either or clearStencil is specified.
If the format is a color format and clearBuffer is specified, this contains the clear color. However, if the format is a depth/stencil format, the R and G channels contain the depth and stencil value to clear the buffer with. Note that the stencil buffer is only cleared, if clearStencil is specified and vice versa.
Implemented in LiteFX::Rendering::RenderTarget.
|
pure virtualnoexcept |
Returns the internal format of the render target.
Implemented in LiteFX::Rendering::RenderTarget.
|
pure virtualnoexcept |
Returns true
, if the target should not be made persistent for access after the render pass has finished.
A render target can be marked as volatile if it does not need to be accessed after the render pass has finished. This can be used to optimize away unnecessary GPU/CPU memory round-trips. For example a depth buffer may only be used as an input for the lighting stage of a deferred renderer, but is not required after this. So instead of reading it from the GPU after the lighting pass has finished and then discarding it anyway, it can be marked as volatile in order to prevent it from being read from the GPU memory again in the first place.
true
, if the target should not be made persistent for access after the render pass has finished.Implemented in LiteFX::Rendering::RenderTarget.
|
pure virtualnoexcept |
Returns the location of the render target output attachment within the fragment shader.
The locations of all render targets of a frame buffer must be within a continuous domain, starting at 0
. A frame buffer validates the render target locations when it is initialized and will raise an exception, if a location is either not mapped or assigned multiple times.
Implemented in LiteFX::Rendering::RenderTarget.
|
pure virtualnoexcept |
Returns the name of the render target.
Implemented in LiteFX::Rendering::RenderTarget.
|
pure virtualnoexcept |
Returns the type of the render target.
Implemented in LiteFX::Rendering::RenderTarget.