HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
legacyRenderControlInterface.h
Go to the documentation of this file.
1 //
2 // Copyright 2025 Pixar
3 //
4 // Licensed under the terms set forth in the LICENSE.txt file available at
5 // https://openusd.org/license.
6 //
7 #ifndef PXR_IMAGING_HD_LEGACY_RENDER_CONTROL_INTERFACE_H
8 #define PXR_IMAGING_HD_LEGACY_RENDER_CONTROL_INTERFACE_H
9 
10 #include "pxr/pxr.h"
11 
12 #include "pxr/imaging/hd/api.h"
13 
14 #include "pxr/imaging/hd/aov.h"
15 #include "pxr/imaging/hd/command.h"
16 #include "pxr/usd/sdf/path.h"
17 
19 
21 class HdRenderBuffer;
23  std::vector<struct HdRenderSettingDescriptor>;
25  std::vector<struct HdCommandDescriptor>;
26 
27 ///
28 /// \class HdLegacyRenderControlInterface
29 ///
30 /// Transitory Hydra-1.0-like API for HdRenderer.
31 ///
33 {
34 public:
35  /// \name Task control
36  /// @{
37 
38  virtual void Execute(
39  const SdfPathVector &taskPaths) = 0;
40 
41  virtual bool AreTasksConverged(
42  const SdfPathVector &taskPaths) const = 0;
43 
44  virtual bool GetTaskContextData(
45  const TfToken &name, VtValue *data) const = 0;
46 
47  virtual void SetTaskContextData(
48  const TfToken &name, const VtValue &data) = 0;
49 
50  /// @}
51 
52  /// \name AOVs
53  /// @{
54 
56  const TfToken &name) const = 0;
57 
59  const SdfPath &path) const = 0;
60 
61  /// @}
62 
63  /// \name Render settings
64  /// @{
65 
67  GetRenderSettingDescriptors() const = 0;
68  virtual VtValue GetRenderSetting(
69  const TfToken &name) const = 0;
70  virtual void SetRenderSetting(
71  const TfToken &name, VtValue const &value) = 0;
72 
73  /// @}
74 
75  /// \name Commands
76  /// @{
77 
79 
80  ///
81  /// Invokes the command described by the token \p command with optional
82  /// \p args.
83  ///
84  /// If the command succeeds, returns \c true, otherwise returns \c false.
85  /// A command will generally fail if it is not among those returned by
86  /// GetCommandDescriptors().
87  ///
88  virtual bool InvokeCommand(
89  TfToken const &name, const HdCommandArgs &args = {}) = 0;
90 
91  /// @}
92 
93  /// \name Background rendering control
94  /// @{
95 
96  virtual bool IsPauseSupported() const = 0;
97  virtual bool Pause() = 0;
98  virtual bool Resume() = 0;
99  virtual bool IsStopSupported() const = 0;
100  virtual bool Stop(bool blocking = true) = 0;
101  virtual bool Restart() = 0;
102 
103  /// @}
104 
105  /// \name Resolution information
106  /// @{
107 
108  virtual TfToken GetMaterialBindingPurpose() const = 0;
109  virtual TfTokenVector GetMaterialRenderContexts() const = 0;
110  virtual TfTokenVector GetRenderSettingsNamespaces() const = 0;
111  virtual bool IsPrimvarFilteringNeeded() const = 0;
112  virtual TfTokenVector GetShaderSourceTypes() const = 0;
113  /// This is for UsdImagingDelegate::_coordSysEnabled that has a
114  /// surprising performance impact.
115  virtual bool IsCoordSysSupported() const = 0;
116 
117  HD_API
119  /// @}
120 
121  /// \name Misc
122  /// @{
123 
124  /// Provides value for HdxTaskControllerSceneIndex::Parameters::isForStorm
125  /// to configure task controller scene inedx.
126  virtual bool RequiresStormTasks() const = 0;
127 
128  virtual VtDictionary GetRenderStats() = 0;
129 
130  virtual SdfPath GetRprimPathFromPrimId(int primIdx) = 0;
131 
132  /// @}
133 };
134 
136 
137 #endif
virtual bool InvokeCommand(TfToken const &name, const HdCommandArgs &args={})=0
#define PXR_NAMESPACE_OPEN_SCOPE
Definition: pxr.h:73
virtual TfTokenVector GetRenderSettingsNamespaces() const =0
GLsizei const GLfloat * value
Definition: glcorearb.h:824
GLsizei const GLchar *const * path
Definition: glcorearb.h:3341
virtual TfToken GetMaterialBindingPurpose() const =0
virtual SdfPath GetRprimPathFromPrimId(int primIdx)=0
virtual HdAovDescriptor GetDefaultAovDescriptor(const TfToken &name) const =0
#define HD_API
Definition: api.h:23
virtual TfTokenVector GetMaterialRenderContexts() const =0
virtual bool IsPrimvarFilteringNeeded() const =0
virtual HdCommandDescriptors GetCommandDescriptors()=0
virtual void Execute(const SdfPathVector &taskPaths)=0
virtual HdRenderBuffer * GetRenderBuffer(const SdfPath &path) const =0
virtual void SetRenderSetting(const TfToken &name, VtValue const &value)=0
Definition: token.h:70
virtual TfTokenVector GetShaderSourceTypes() const =0
std::vector< class SdfPath > SdfPathVector
virtual bool RequiresStormTasks() const =0
std::vector< HdCommandDescriptor > HdCommandDescriptors
Definition: command.h:91
virtual VtDictionary GetRenderStats()=0
virtual bool IsCoordSysSupported() const =0
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:440
virtual bool Stop(bool blocking=true)=0
GLuint const GLchar * name
Definition: glcorearb.h:786
Definition: path.h:280
HD_API HdRenderDelegateInfo GetRenderDelegateInfo() const
virtual VtValue GetRenderSetting(const TfToken &name) const =0
std::vector< struct HdRenderSettingDescriptor > HdRenderSettingDescriptorList
virtual void SetTaskContextData(const TfToken &name, const VtValue &data)=0
virtual bool AreTasksConverged(const SdfPathVector &taskPaths) const =0
virtual HdRenderSettingDescriptorList GetRenderSettingDescriptors() const =0
virtual bool IsStopSupported() const =0
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
**If you just want to fire and args
Definition: thread.h:618
virtual bool IsPauseSupported() const =0
Definition: value.h:89
virtual bool GetTaskContextData(const TfToken &name, VtValue *data) const =0
Definition: format.h:1821