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...
|
|
virtual | ~HdEmbreeRenderDelegate () |
| Render delegate destructor. More...
|
|
virtual HdRenderParam * | GetRenderParam () const override |
| Return this delegate's render param. More...
|
|
virtual const TfTokenVector & | GetSupportedRprimTypes () const override |
| Return a list of which Rprim types can be created by this class's CreateRprim. More...
|
|
virtual const TfTokenVector & | GetSupportedSprimTypes () const override |
| Return a list of which Sprim types can be created by this class's CreateSprim. More...
|
|
virtual const TfTokenVector & | GetSupportedBprimTypes () const override |
| Return a list of which Bprim types can be created by this class's CreateBprim. More...
|
|
virtual HdResourceRegistrySharedPtr | GetResourceRegistry () const override |
| Returns the HdResourceRegistry instance used by this render delegate. More...
|
|
virtual
HdRenderSettingDescriptorList | GetRenderSettingDescriptors () const override |
| Returns a list of user-configurable render settings. More...
|
|
virtual bool | IsPauseSupported () const override |
| Return true to indicate that pausing and resuming are supported. More...
|
|
virtual bool | Pause () override |
| Pause background rendering threads. More...
|
|
virtual bool | Resume () override |
| Resume background rendering threads. More...
|
|
virtual HdRenderPassSharedPtr | CreateRenderPass (HdRenderIndex *index, HdRprimCollection const &collection) override |
| Create a renderpass. More...
|
|
virtual HdInstancer * | CreateInstancer (HdSceneDelegate *delegate, SdfPath const &id) override |
| Create an instancer. More...
|
|
virtual void | DestroyInstancer (HdInstancer *instancer) override |
| Destroy an instancer created with CreateInstancer. More...
|
|
virtual HdRprim * | CreateRprim (TfToken const &typeId, SdfPath const &rprimId) override |
| Create a hydra Rprim, representing scene geometry. More...
|
|
virtual void | DestroyRprim (HdRprim *rPrim) override |
| Destroy an Rprim created with CreateRprim. More...
|
|
virtual HdSprim * | CreateSprim (TfToken const &typeId, SdfPath const &sprimId) override |
| Create a hydra Sprim, representing scene or viewport state like cameras or lights. More...
|
|
virtual HdSprim * | CreateFallbackSprim (TfToken const &typeId) override |
| Create a hydra Sprim using default values, and with no scene graph binding. More...
|
|
virtual void | DestroySprim (HdSprim *sPrim) override |
| Destroy an Sprim created with CreateSprim or CreateFallbackSprim. More...
|
|
virtual HdBprim * | CreateBprim (TfToken const &typeId, SdfPath const &bprimId) override |
| Create a hydra Bprim, representing data buffers such as textures. More...
|
|
virtual HdBprim * | CreateFallbackBprim (TfToken const &typeId) override |
| Create a hydra Bprim using default values, and with no scene graph binding. More...
|
|
virtual void | DestroyBprim (HdBprim *bPrim) override |
| Destroy a Bprim created with CreateBprim or CreateFallbackBprim. More...
|
|
virtual 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...
|
|
virtual TfToken | GetMaterialBindingPurpose () const override |
| This function tells the scene which material variant to reference. More...
|
|
virtual HdAovDescriptor | GetDefaultAovDescriptor (TfToken const &name) const override |
| This function returns the default AOV descriptor for a given named AOV. More...
|
|
virtual VtDictionary | GetRenderStats () const override |
| This function allows the renderer to report back some useful statistics that the application can display to the user. More...
|
|
virtual HD_API void | SetDrivers (HdDriverVector const &drivers) |
| Set list of driver objects, such as a rendering context / devices. More...
|
|
virtual const TfTokenVector & | GetSupportedRprimTypes () const =0 |
| Returns a list of typeId's of all supported Rprims by this render delegate. More...
|
|
virtual const TfTokenVector & | GetSupportedSprimTypes () const =0 |
| Returns a list of typeId's of all supported Sprims by this render delegate. More...
|
|
virtual const TfTokenVector & | GetSupportedBprimTypes () const =0 |
| Returns a list of typeId's of all supported Bprims by this render delegate. More...
|
|
virtual HD_API HdRenderParam * | GetRenderParam () const |
| Returns an opaque handle to a render param, that in turn is passed to each prim created by the render delegate during sync processing. More...
|
|
virtual HdResourceRegistrySharedPtr | GetResourceRegistry () const =0 |
| Returns a shared ptr to the resource registry of the current render delegate. More...
|
|
virtual HD_API void | SetRenderSetting (TfToken const &key, VtValue const &value) |
| Set a custom render setting on this render delegate. More...
|
|
virtual HD_API VtValue | GetRenderSetting (TfToken const &key) const |
| Get the current value for a render setting. More...
|
|
template<typename T > |
T | GetRenderSetting (TfToken const &key, T const &defValue) const |
| Get the current value for a render setting, taking a desired type and a fallback value in case of type mismatch. More...
|
|
virtual HD_API
HdRenderSettingDescriptorList | GetRenderSettingDescriptors () const |
| Get the backend-exported render setting descriptors. More...
|
|
virtual HD_API unsigned int | GetRenderSettingsVersion () const |
| Get the current version of the render settings dictionary. More...
|
|
virtual HD_API VtDictionary | GetRenderStats () const |
| Returns an open-format dictionary of render statistics. More...
|
|
virtual HD_API bool | IsPauseSupported () const |
| Control of background rendering threads. More...
|
|
virtual HD_API bool | Pause () |
| Pause all of this delegate's background rendering threads. More...
|
|
virtual HD_API bool | Resume () |
| Resume all of this delegate's background rendering threads previously paused by a call to Pause. More...
|
|
virtual HD_API bool | IsStopSupported () const |
| Advertise whether this delegate supports stopping and restarting of background render threads. More...
|
|
virtual HD_API bool | Stop () |
| Stop all of this delegate's background rendering threads. More...
|
|
virtual HD_API bool | Restart () |
| Restart all of this delegate's background rendering threads previously stopped by a call to Stop. More...
|
|
virtual HdRenderPassSharedPtr | CreateRenderPass (HdRenderIndex *index, HdRprimCollection const &collection)=0 |
| Renderpass Factory. More...
|
|
virtual HD_API
HdRenderPassStateSharedPtr | CreateRenderPassState () const |
| Request to create a new renderpass state. More...
|
|
virtual HdInstancer * | CreateInstancer (HdSceneDelegate *delegate, SdfPath const &id)=0 |
| Instancer Factory. More...
|
|
virtual void | DestroyInstancer (HdInstancer *instancer)=0 |
|
virtual HdRprim * | CreateRprim (TfToken const &typeId, SdfPath const &rprimId)=0 |
| Prim Factories. More...
|
|
virtual void | DestroyRprim (HdRprim *rPrim)=0 |
| Request to Destruct and deallocate the prim. More...
|
|
virtual HdSprim * | CreateSprim (TfToken const &typeId, SdfPath const &sprimId)=0 |
| Request to Allocate and Construct a new Sprim. More...
|
|
virtual HdSprim * | CreateFallbackSprim (TfToken const &typeId)=0 |
| Request to Allocate and Construct an Sprim to use as a standin, if there if an error with another another Sprim of the same type. More...
|
|
virtual void | DestroySprim (HdSprim *sprim)=0 |
| Request to Destruct and deallocate the prim. More...
|
|
virtual HdBprim * | CreateBprim (TfToken const &typeId, SdfPath const &bprimId)=0 |
| Request to Allocate and Construct a new Bprim. More...
|
|
virtual HdBprim * | CreateFallbackBprim (TfToken const &typeId)=0 |
| Request to Allocate and Construct a Bprim to use as a standin, if there if an error with another another Bprim of the same type. More...
|
|
virtual void | DestroyBprim (HdBprim *bprim)=0 |
| Request to Destruct and deallocate the prim. More...
|
|
virtual void | CommitResources (HdChangeTracker *tracker)=0 |
| Sync, Execute & Dispatch Hooks. More...
|
|
virtual HD_API TfToken | GetMaterialBindingPurpose () const |
| Materials. More...
|
|
virtual HD_API TfToken | GetMaterialNetworkSelector () const |
|
virtual HD_API TfTokenVector | GetMaterialRenderContexts () const |
| Returns a list, in descending order of preference, that can be used to select among multiple material network implementations. More...
|
|
virtual HD_API bool | IsPrimvarFilteringNeeded () const |
| Return true to indicate that the render delegate wants rprim primvars to be filtered by the scene delegate to reduce the amount of primvars that are send to the render delegate. More...
|
|
virtual HD_API TfTokenVector | GetShaderSourceTypes () const |
| Returns the ordered list of shader source types that the render delegate supports. More...
|
|
virtual HD_API HdAovDescriptor | GetDefaultAovDescriptor (TfToken const &name) const |
| AOVs. More...
|
|
virtual HD_API HdCommandDescriptors | GetCommandDescriptors () const |
| Commands API. More...
|
|
virtual HD_API bool | InvokeCommand (const TfToken &command, const HdCommandArgs &args=HdCommandArgs()) |
| Invokes the command described by the token command with optional args . 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.