HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HdRenderPass Class Referenceabstract

#include <renderPass.h>

+ Inheritance diagram for HdRenderPass:

Public Member Functions

HD_API HdRenderPass (HdRenderIndex *index, HdRprimCollection const &collection)
 
virtual HD_API ~HdRenderPass ()
 
HdRprimCollection constGetRprimCollection () const
 Returns the HdRprimCollection to be drawn by this RenderPass. More...
 
HD_API void SetRprimCollection (HdRprimCollection const &col)
 
HdDirtyListSharedPtr constGetDirtyList () const
 
HdRenderIndexGetRenderIndex () const
 Return the render index. More...
 
Synchronization
HD_API void Sync ()
 Sync the render pass resources. More...
 
Prepare
HD_API void Prepare (TfTokenVector const &renderTags)
 Prepare renderpass data. More...
 
Execution
HD_API void Execute (HdRenderPassStateSharedPtr const &renderPassState, TfTokenVector const &renderTags)
 Execute a subset of buckets of this renderpass. More...
 

Optional API hooks for progressive rendering

virtual bool IsConverged () const
 
virtual void _Execute (HdRenderPassStateSharedPtr const &renderPassState, TfTokenVector const &renderTags)=0
 
virtual void _MarkCollectionDirty ()
 Optional API: let derived classes mark their collection tracking as dirty. More...
 
virtual void _Sync ()
 Optional API: let derived classes sync data. More...
 
virtual void _Prepare (TfTokenVector const &renderTags)
 Optional API: let derived classes prepare data. More...
 

Detailed Description

An abstract class representing a single render iteration over a set of prims (the HdRprimCollection), for the camera/viewport parameters in HdRenderPassState.

Conceptually, a rendering task may be broken down into one or more HdRenderPass(es).

An HdRenderPass has two phases, Sync() and Execute(), in line with Hydra's execution phases (See HdEngine::Execute)

The base class implementation of Sync() takes care of syncing collection changes with the HdRenderIndex via HdDirtyList, and allows derived classes to track collection changes (via _MarkCollectionDirty) and sync additional resources (via _Sync)

Renderer backends implement _Execute, wherein the HdDrawItem(s) for the collection may be consumed via HdRenderIndex::GetDrawItems. Typically, the HdRenderPassState argument of _Execute is made available via the HdTaskContext.

Note
Rendering backends are expected to specialize this abstract class, and return the specialized object via HdRenderDelegate::CreateRenderPass

Definition at line 71 of file renderPass.h.

Constructor & Destructor Documentation

HD_API HdRenderPass::HdRenderPass ( HdRenderIndex index,
HdRprimCollection const collection 
)
virtual HD_API HdRenderPass::~HdRenderPass ( )
virtual

Member Function Documentation

virtual void HdRenderPass::_Execute ( HdRenderPassStateSharedPtr const renderPassState,
TfTokenVector const renderTags 
)
protectedpure virtual

Virtual API: Execute the buckets corresponding to renderTags; renderTags.empty() implies execute everything.

Implemented in HdSt_ImageShaderRenderPass, HdSt_RenderPass, and Hd_UnitTestNullRenderPass.

virtual void HdRenderPass::_MarkCollectionDirty ( )
inlineprotectedvirtual

Optional API: let derived classes mark their collection tracking as dirty.

Reimplemented in HdSt_ImageShaderRenderPass, and HdSt_RenderPass.

Definition at line 134 of file renderPass.h.

virtual void HdRenderPass::_Prepare ( TfTokenVector const renderTags)
inlineprotectedvirtual

Optional API: let derived classes prepare data.

Reimplemented in HdSt_ImageShaderRenderPass, and HdSt_RenderPass.

Definition at line 140 of file renderPass.h.

virtual void HdRenderPass::_Sync ( )
inlineprotectedvirtual

Optional API: let derived classes sync data.

Definition at line 137 of file renderPass.h.

HD_API void HdRenderPass::Execute ( HdRenderPassStateSharedPtr const renderPassState,
TfTokenVector const renderTags 
)

Execute a subset of buckets of this renderpass.

HdDirtyListSharedPtr const& HdRenderPass::GetDirtyList ( ) const
inline

Returns the dirty list (maintained in the change tracker) for efficient traversal

Definition at line 89 of file renderPass.h.

HdRenderIndex* HdRenderPass::GetRenderIndex ( ) const
inline

Return the render index.

Definition at line 94 of file renderPass.h.

HdRprimCollection const& HdRenderPass::GetRprimCollection ( ) const
inline

Returns the HdRprimCollection to be drawn by this RenderPass.

Definition at line 80 of file renderPass.h.

virtual bool HdRenderPass::IsConverged ( ) const
inlinevirtual

Virtual API: Execute the buckets corresponding to renderTags; renderTags.empty() implies execute everything.

Definition at line 125 of file renderPass.h.

HD_API void HdRenderPass::Prepare ( TfTokenVector const renderTags)

Prepare renderpass data.

HD_API void HdRenderPass::SetRprimCollection ( HdRprimCollection const col)

Sets the HdRprimCollection, note that this may invalidate internal caches used to accelerate drawing.

HD_API void HdRenderPass::Sync ( )

Sync the render pass resources.


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