HDK
|
#include <renderPass.h>
Public Member Functions | |
HD_API | HdRenderPass (HdRenderIndex *index, HdRprimCollection const &collection) |
virtual HD_API | ~HdRenderPass () |
HdRprimCollection const & | GetRprimCollection () const |
Returns the HdRprimCollection to be drawn by this RenderPass. More... | |
HD_API void | SetRprimCollection (HdRprimCollection const &col) |
HdRenderIndex * | GetRenderIndex () const |
Return the render index. More... | |
Synchronization | |
HD_API void | Sync () |
Sync the render pass resources. 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... | |
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.
Definition at line 69 of file renderPass.h.
HD_API HdRenderPass::HdRenderPass | ( | HdRenderIndex * | index, |
HdRprimCollection const & | collection | ||
) |
|
virtual |
|
protectedpure virtual |
Virtual API: Execute the buckets corresponding to renderTags; renderTags.empty() implies execute everything.
Implemented in HdSt_ImageShaderRenderPass, HdSt_RenderPass, and Hd_UnitTestNullRenderPass.
|
inlineprotectedvirtual |
Optional API: let derived classes mark their collection tracking as dirty.
Reimplemented in HdSt_RenderPass.
Definition at line 118 of file renderPass.h.
|
inlineprotectedvirtual |
Optional API: let derived classes sync data.
Definition at line 121 of file renderPass.h.
HD_API void HdRenderPass::Execute | ( | HdRenderPassStateSharedPtr const & | renderPassState, |
TfTokenVector const & | renderTags | ||
) |
Execute a subset of buckets of this renderpass.
|
inline |
Return the render index.
Definition at line 86 of file renderPass.h.
|
inline |
Returns the HdRprimCollection to be drawn by this RenderPass.
Definition at line 78 of file renderPass.h.
|
inlinevirtual |
Virtual API: Execute the buckets corresponding to renderTags; renderTags.empty() implies execute everything.
Definition at line 109 of file renderPass.h.
HD_API void HdRenderPass::SetRprimCollection | ( | HdRprimCollection const & | col | ) |
Sets the HdRprimCollection, note that this may invalidate internal caches used to accelerate drawing.