Render delegates provide renderer-specific functionality to the render index, the main hydra state management structure.
More...
Inherits HdRenderDelegate.
|
| HdEmbreeRenderDelegate () |
| Render delegate constructor. More...
|
|
| HdEmbreeRenderDelegate (HdRenderSettingsMap const &settingsMap) |
| Render delegate constructor. More...
|
|
| ~HdEmbreeRenderDelegate () override |
| Render delegate destructor. More...
|
|
HdRenderParam * | GetRenderParam () const override |
| Return this delegate's render param. More...
|
|
const TfTokenVector & | GetSupportedRprimTypes () const override |
| Return a list of which Rprim types can be created by this class's CreateRprim. More...
|
|
const TfTokenVector & | GetSupportedSprimTypes () const override |
| Return a list of which Sprim types can be created by this class's CreateSprim. More...
|
|
const TfTokenVector & | GetSupportedBprimTypes () const override |
| Return a list of which Bprim types can be created by this class's CreateBprim. More...
|
|
HdResourceRegistrySharedPtr | GetResourceRegistry () const override |
| Returns the HdResourceRegistry instance used by this render delegate. More...
|
|
HdRenderSettingDescriptorList | GetRenderSettingDescriptors () const override |
| Returns a list of user-configurable render settings. More...
|
|
bool | IsPauseSupported () const override |
| Return true to indicate that pausing and resuming are supported. More...
|
|
bool | Pause () override |
| Pause background rendering threads. More...
|
|
bool | Resume () override |
| Resume background rendering threads. More...
|
|
HdRenderPassSharedPtr | CreateRenderPass (HdRenderIndex *index, HdRprimCollection const &collection) override |
| Create a renderpass. More...
|
|
HdInstancer * | CreateInstancer (HdSceneDelegate *delegate, SdfPath const &id) override |
| Create an instancer. More...
|
|
void | DestroyInstancer (HdInstancer *instancer) override |
| Destroy an instancer created with CreateInstancer. More...
|
|
HdRprim * | CreateRprim (TfToken const &typeId, SdfPath const &rprimId) override |
| Create a hydra Rprim, representing scene geometry. More...
|
|
void | DestroyRprim (HdRprim *rPrim) override |
| Destroy an Rprim created with CreateRprim. More...
|
|
HdSprim * | CreateSprim (TfToken const &typeId, SdfPath const &sprimId) override |
| Create a hydra Sprim, representing scene or viewport state like cameras or lights. More...
|
|
HdSprim * | CreateFallbackSprim (TfToken const &typeId) override |
| Create a hydra Sprim using default values, and with no scene graph binding. More...
|
|
void | DestroySprim (HdSprim *sPrim) override |
| Destroy an Sprim created with CreateSprim or CreateFallbackSprim. More...
|
|
HdBprim * | CreateBprim (TfToken const &typeId, SdfPath const &bprimId) override |
| Create a hydra Bprim, representing data buffers such as textures. More...
|
|
HdBprim * | CreateFallbackBprim (TfToken const &typeId) override |
| Create a hydra Bprim using default values, and with no scene graph binding. More...
|
|
void | DestroyBprim (HdBprim *bPrim) override |
| Destroy a Bprim created with CreateBprim or CreateFallbackBprim. More...
|
|
void | CommitResources (HdChangeTracker *tracker) override |
| This function is called after new scene data is pulled during prim Sync(), but before any tasks (such as draw tasks) are run, and gives the render delegate a chance to transfer any invalidated resources to the rendering kernel. More...
|
|
TfToken | GetMaterialBindingPurpose () const override |
| This function tells the scene which material variant to reference. More...
|
|
HdAovDescriptor | GetDefaultAovDescriptor (TfToken const &name) const override |
| This function returns the default AOV descriptor for a given named AOV. More...
|
|
VtDictionary | GetRenderStats () const override |
| This function allows the renderer to report back some useful statistics that the application can display to the user. More...
|
|
Render delegates provide renderer-specific functionality to the render index, the main hydra state management structure.
The render index uses the render delegate to create and delete scene primitives, which include geometry and also non-drawable objects. The render delegate is also responsible for creating renderpasses, which know how to draw this renderer's scene primitives.
Primitives in Hydra are split into Rprims (drawables), Sprims (state objects like cameras and materials), and Bprims (buffer objects like textures). The minimum set of primitives a renderer needs to support is one Rprim (so the scene's not empty) and the "camera" Sprim, which is required by HdxRenderTask, the task implementing basic hydra drawing.
A render delegate can report which prim types it supports via GetSupportedRprimTypes() (and Sprim, Bprim), and well-behaved applications won't call CreateRprim() (Sprim, Bprim) for prim types that aren't supported. The core hydra prim types are "mesh", "basisCurves", and "points", but a custom render delegate and a custom scene delegate could add support for other prims such as implicit surfaces or volumes.
HdEmbree Rprims create embree geometry objects in the render delegate's top-level embree scene; and HdEmbree's render pass draws by casting rays into the top-level scene. The renderpass writes to renderbuffers, which are then composited into the GL framebuffer.
The render delegate also has a hook for the main hydra execution algorithm (HdEngine::Execute()): between HdRenderIndex::SyncAll(), which pulls new scene data, and execution of tasks, the engine calls back to CommitResources(). This can be used to commit GPU buffers, or as a place to schedule a final BVH build (though Embree doesn't currenlty use it). Importantly, no scene updates are processed after CommitResources().
Definition at line 84 of file renderDelegate.h.