Foundation
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Foundation::RenderCore::LambdaPass< FSetup, FRecord, FSkip > Struct Template Reference

Functional wrapper for a render pass. More...

#include <RenderPass.hpp>

Inheritance diagram for Foundation::RenderCore::LambdaPass< FSetup, FRecord, FSkip >:
Foundation::RenderCore::RenderPass Foundation::RHI::RHIObject

Public Member Functions

 LambdaPass (FSetup &&setup, FRecord &&record, FSkip &&skip={})
 
void Setup (PassHandle self, Renderer *r) override
 Perform any setup required for this pass. This may include creating resources, declaring resource accesses, etc.
 
void Record (PassHandle self, Renderer *r, RHICommandList *cmd) override
 Record the commands of this pass into the given command list.
 
bool IsSkipped (PassHandle self, Renderer *r) const override
 Determine whether this pass should be skipped during Record time.
 
- Public Member Functions inherited from Foundation::RenderCore::RenderPass
 RenderPass ()=default
 Constructor. You may also create resources here for early setup. However, access declaration must be done in Setup().
 
- Public Member Functions inherited from Foundation::RHI::RHIObject
 RHIObject ()=default
 
 RHIObject (RHIObject const &)=delete
 
RHIObjectoperator= (const RHIObject &)=delete
 
 RHIObject (RHIObject &&)=delete
 
RHIObjectoperator= (RHIObject &&)=delete
 
virtual ~RHIObject ()=default
 

Public Attributes

FSetup mSetup
 
FRecord mRecord
 
FSkip mSkip
 

Detailed Description

template<typename FSetup, typename FRecord, typename FSkip>
struct Foundation::RenderCore::LambdaPass< FSetup, FRecord, FSkip >

Functional wrapper for a render pass.

This is a convenience wrapper for stateless passes, and should be created via Renderer::CreatePass()

Constructor & Destructor Documentation

◆ LambdaPass()

Foundation::RenderCore::LambdaPass< FSetup, FRecord, FSkip >::LambdaPass ( FSetup &&  setup,
FRecord &&  record,
FSkip &&  skip = {} 
)
inline

Member Function Documentation

◆ IsSkipped()

bool Foundation::RenderCore::LambdaPass< FSetup, FRecord, FSkip >::IsSkipped ( PassHandle  self,
Renderer r 
) const
inlineoverridevirtual

Determine whether this pass should be skipped during Record time.

Returns
Whether this pass should be skipped during execution.

This is only executed after EndSetup() has been called, and when the render graph is actually executed.

Note
This is always called from the main (renderer's) thread.

Reimplemented from Foundation::RenderCore::RenderPass.

◆ Record()

void Foundation::RenderCore::LambdaPass< FSetup, FRecord, FSkip >::Record ( PassHandle  self,
Renderer r,
RHICommandList cmd 
)
inlineoverridevirtual

Record the commands of this pass into the given command list.

This is only executed after EndSetup() has been called, and when the render graph is actually executed.

Note
This may be called from multiple threads concurrently, and thus should ensure thread safety if accessing shared data.

Implements Foundation::RenderCore::RenderPass.

◆ Setup()

void Foundation::RenderCore::LambdaPass< FSetup, FRecord, FSkip >::Setup ( PassHandle  self,
Renderer r 
)
inlineoverridevirtual

Perform any setup required for this pass. This may include creating resources, declaring resource accesses, etc.

Note
This is only executed during the Setup phase of the render graph, and is always called from the main (renderer's) thread.

Implements Foundation::RenderCore::RenderPass.

Member Data Documentation

◆ mRecord

◆ mSetup

◆ mSkip


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