LiteFX 0.4.1.2025
Computer Graphics Engine
|
The interface for a render pass. More...
#include <rendering_api.hpp>
Inherits LiteFX::Rendering::IStateResource, and LiteFX::SharedObject.
Inherited by LiteFX::Rendering::RenderPass< DirectX12Queue, DirectX12FrameBuffer >, LiteFX::Rendering::RenderPass< VulkanQueue, VulkanFrameBuffer >, and LiteFX::Rendering::RenderPass< TCommandQueue, TFrameBuffer >.
Classes | |
struct | BeginEventArgs |
Event arguments that are published to subscribers when a render pass is beginning. More... | |
Public Member Functions | |
~IRenderPass () noexcept override=default | |
SharedPtr< const IFrameBuffer > | activeFrameBuffer () const noexcept |
Returns the current frame buffer from of the render pass. | |
const ICommandQueue & | commandQueue () const noexcept |
Returns the command queue, the render pass is executing on or nullptr , if the queue has already been released. | |
Enumerable< SharedPtr< const ICommandBuffer > > | commandBuffers () const |
Returns all command buffers, that can be currently used for recording multi-threaded commands in the render pass. | |
SharedPtr< const ICommandBuffer > | commandBuffer (UInt32 index) const |
Returns a command buffer that can be currently used for recording multi-threaded commands in the render pass. | |
virtual UInt32 | secondaryCommandBuffers () const noexcept=0 |
Returns the number of secondary command buffers the render pass stores for multi-threaded command recording. | |
virtual const Array< RenderTarget > & | renderTargets () const noexcept=0 |
Returns the list of render targets, the render pass renders into. | |
virtual const RenderTarget & | renderTarget (UInt32 location) const =0 |
Returns the render target mapped to the location provided by location . | |
virtual bool | hasPresentTarget () const noexcept=0 |
Returns true , if one of the render targets is used for presentation on a swap chain. | |
virtual const Array< RenderPassDependency > & | inputAttachments () const noexcept=0 |
Returns the input attachment the render pass is consuming. | |
virtual const RenderPassDependency & | inputAttachment (UInt32 location) const =0 |
Returns the input attachment at a location . | |
virtual const Optional< DescriptorBindingPoint > & | inputAttachmentSamplerBinding () const noexcept=0 |
Returns the binding point for input attachment samplers. | |
void | begin (const IFrameBuffer &frameBuffer) const |
Begins the render pass. | |
virtual UInt64 | end () const =0 |
Ends the render pass. | |
![]() | |
virtual | ~IStateResource () noexcept=default |
Releases the state resource instance. | |
virtual const String & | name () const noexcept=0 |
Returns the name of the resource. | |
![]() | |
virtual | ~SharedObject () noexcept=default |
Destroys the shared object. | |
template<typename TSelf > | |
auto | shared_from_this (this TSelf &&self) noexcept |
Returns a shared pointer to the current object instance. | |
template<typename TSelf > | |
auto | weak_from_this (this TSelf &&self) noexcept -> WeakPtr< std::remove_reference_t< TSelf > > |
Returns a weak pointer to the current object instance. | |
Public Attributes | |
Event< BeginEventArgs > | beginning |
Invoked, when the render pass is beginning. | |
Event< EventArgs > | ending |
Invoked, when the render pass is ending. | |
Protected Member Functions | |
IRenderPass () noexcept=default | |
IRenderPass (IRenderPass &&) noexcept=default | |
IRenderPass (const IRenderPass &)=delete | |
IRenderPass & | operator= (IRenderPass &&) noexcept=default |
IRenderPass & | operator= (const IRenderPass &)=delete |
![]() | |
IStateResource () noexcept=default | |
IStateResource (const IStateResource &)=delete | |
IStateResource (IStateResource &&) noexcept=default | |
IStateResource & | operator= (const IStateResource &)=delete |
IStateResource & | operator= (IStateResource &&) noexcept=default |
![]() | |
SharedObject () noexcept=default | |
Initializes a new shared object. | |
SharedObject (SharedObject &&) noexcept=default | |
SharedObject (const SharedObject &)=default | |
SharedObject & | operator= (SharedObject &&) noexcept=default |
SharedObject & | operator= (const SharedObject &)=default |
Additional Inherited Members | |
![]() | |
template<typename T , typename... TArgs> | |
static auto | create (TArgs &&... args) -> SharedPtr< T > |
Generic factory method used to create instances of the shared object. | |
The interface for a render pass.
|
protecteddefaultnoexcept |
|
protecteddefaultnoexcept |
|
protecteddelete |
|
overridedefaultnoexcept |
|
inlinenoexcept |
Returns the current frame buffer from of the render pass.
The frame buffer can only be obtained, if the render pass has been started by calling begin. If the render pass has ended or not yet started, the method will instead raise an exception.
buffer | The index of the frame buffer. |
nullptr
, if the render pass has not been started.
|
inline |
Begins the render pass.
frameBuffer | The frame buffer to obtain input attachments and render targets from. |
|
inline |
Returns a command buffer that can be currently used for recording multi-threaded commands in the render pass.
index | The index of the command buffer. |
RuntimeException | Thrown, if the render pass has not been begun. |
ArgumentOutOfRangeException | Thrown, if the frame buffer does not store a command buffer at index . |
|
inline |
Returns all command buffers, that can be currently used for recording multi-threaded commands in the render pass.
|
inlinenoexcept |
Returns the command queue, the render pass is executing on or nullptr
, if the queue has already been released.
|
pure virtual |
Ends the render pass.
If the frame buffer has a present render target, this causes the render pass to synchronize with the swap chain and issue a present command.
Implemented in LiteFX::Rendering::Backends::DirectX12RenderPass, and LiteFX::Rendering::Backends::VulkanRenderPass.
|
pure virtualnoexcept |
Returns true
, if one of the render targets is used for presentation on a swap chain.
true
, if one of the render targets is used for presentation on a swap chain.Implemented in LiteFX::Rendering::Backends::DirectX12RenderPass, and LiteFX::Rendering::Backends::VulkanRenderPass.
|
pure virtual |
Returns the input attachment at a location .
ArgumentOutOfRangeException | Thrown, if no input attachment is defined at the specified location . |
Implemented in LiteFX::Rendering::Backends::DirectX12RenderPass, and LiteFX::Rendering::Backends::VulkanRenderPass.
|
pure virtualnoexcept |
Returns the input attachment the render pass is consuming.
Implemented in LiteFX::Rendering::Backends::DirectX12RenderPass, and LiteFX::Rendering::Backends::VulkanRenderPass.
|
pure virtualnoexcept |
Returns the binding point for input attachment samplers.
Note that in Vulkan this is ignored, as render pass inputs are mapped to sub-pass inputs directly, which do not need to be sampled.
Implemented in LiteFX::Rendering::Backends::DirectX12RenderPass, and LiteFX::Rendering::Backends::VulkanRenderPass.
|
protecteddelete |
|
protecteddefaultnoexcept |
|
pure virtual |
Returns the render target mapped to the location provided by location .
location | The location to return the render target for. |
Implemented in LiteFX::Rendering::Backends::DirectX12RenderPass, and LiteFX::Rendering::Backends::VulkanRenderPass.
|
pure virtualnoexcept |
Returns the list of render targets, the render pass renders into.
Note that the actual render target image resources are stored within the individual FrameBuffers of the render pass.
Implemented in LiteFX::Rendering::Backends::DirectX12RenderPass, and LiteFX::Rendering::Backends::VulkanRenderPass.
|
pure virtualnoexcept |
Returns the number of secondary command buffers the render pass stores for multi-threaded command recording.
Implemented in LiteFX::Rendering::Backends::DirectX12RenderPass, and LiteFX::Rendering::Backends::VulkanRenderPass.
|
mutable |
Invoked, when the render pass is beginning.