XII Release 0.1.0
Loading...
Searching...
No Matches
xiiRenderingSetup Class Reference

#include <RenderTargetSetup.h>

Public Member Functions

XII_FORCE_INLINE xiiRenderingSetupAddColorAttachment (const xiiAttachmentSettings &attachmentSettings)
 Adds a color attachment based on the provided settings.
 
XII_FORCE_INLINE xiiRenderingSetupSetDepthStencilAttachment (const xiiDepthStencilSettings &depthStencilSettings)
 Sets (or replaces) the depth-stencil attachment.
 
XII_FORCE_INLINE xiiRenderingSetupAddSubPass (const xiiGALSubPassDescription &subPass)
 Adds a sub pass description directly.
 
XII_FORCE_INLINE xiiRenderingSetupAddSubPassDependency (const xiiGALSubPassDependencyDescription &dependency)
 Adds a sub pass dependency.
 
void Build ()
 Finalizes the setup. This gathers all attachments into the render pass and framebuffer creation descriptors. Optionally, if no sub passes were added, a default sub pass is generated with color attachments as render targets and the depth-stencil attachment as the depth attachment.
 
void Reset ()
 This is the same as creating a new instance.
 
XII_ALWAYS_INLINE const xiiGALRenderPassCreationDescriptionGetRenderPassDescription () const
 Retrieves the render pass description.
 
XII_ALWAYS_INLINE const xiiGALFramebufferCreationDescriptionGetFramebufferDescription () const
 Retrieves the framebuffer description.
 
XII_ALWAYS_INLINE xiiArrayPtr< const xiiGALOptimizedClearValueGetClearValues () const
 Retrieves the render pass clear values.
 

Friends

class xiiRenderContext
 

Detailed Description

xiiRenderingSetup encapsulates creating both the render pass and the framebuffer. It offers a unified interface with a fluent API:

xiiRenderingSetup setup;
setup.AddColorAttachment(myColorSettings)
.SetDepthStencilAttachment(myDepthSettings)
.AddSubPass(myCustomSubPass)
.AddSubPassDependency(mySubPassDependency)
.Build();
XII_FORCE_INLINE xiiRenderingSetup & SetDepthStencilAttachment(const xiiDepthStencilSettings &depthStencilSettings)
Sets (or replaces) the depth-stencil attachment.
Definition RenderTargetSetup.h:75
void Build()
Finalizes the setup. This gathers all attachments into the render pass and framebuffer creation descr...
Definition RenderTargetSetup.cpp:20
XII_FORCE_INLINE xiiRenderingSetup & AddSubPass(const xiiGALSubPassDescription &subPass)
Adds a sub pass description directly.
Definition RenderTargetSetup.h:83
XII_FORCE_INLINE xiiRenderingSetup & AddSubPassDependency(const xiiGALSubPassDependencyDescription &dependency)
Adds a sub pass dependency.
Definition RenderTargetSetup.h:90
XII_FORCE_INLINE xiiRenderingSetup & AddColorAttachment(const xiiAttachmentSettings &attachmentSettings)
Adds a color attachment based on the provided settings.
Definition RenderTargetSetup.h:67

It automatically deduces the framebuffer size from the first attachment that is added.

See also
xiiGALRenderPassCreationDescription, xiiGALFramebufferCreationDescription, xiiRenderContext::BeginRendering

Member Function Documentation

◆ GetFramebufferDescription()

XII_ALWAYS_INLINE const xiiGALFramebufferCreationDescription & xiiRenderingSetup::GetFramebufferDescription ( ) const
inlinenodiscard

Retrieves the framebuffer description.

Note
The render pass pointer is null, and is meant to be filled externally.

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