All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
unitTestNullRenderDelegate.h
1 //
2 // Copyright 2016 Pixar
3 //
4 // Licensed under the Apache License, Version 2.0 (the "Apache License")
5 // with the following modification; you may not use this file except in
6 // compliance with the Apache License and the following modification to it:
7 // Section 6. Trademarks. is deleted and replaced with:
8 //
9 // 6. Trademarks. This License does not grant permission to use the trade
10 // names, trademarks, service marks, or product names of the Licensor
11 // and its affiliates, except as required to comply with Section 4(c) of
12 // the License and to reproduce the content of the NOTICE file.
13 //
14 // You may obtain a copy of the Apache License at
15 //
16 // http://www.apache.org/licenses/LICENSE-2.0
17 //
18 // Unless required by applicable law or agreed to in writing, software
19 // distributed under the Apache License with the above modification is
20 // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21 // KIND, either express or implied. See the Apache License for the specific
22 // language governing permissions and limitations under the Apache License.
23 //
24 #ifndef PXR_IMAGING_HD_UNIT_TEST_NULL_RENDER_DELEGATE_H
25 #define PXR_IMAGING_HD_UNIT_TEST_NULL_RENDER_DELEGATE_H
26 
27 #include "pxr/pxr.h"
28 #include "pxr/imaging/hd/renderDelegate.h"
29 #include "pxr/imaging/hd/instancer.h"
30 
31 PXR_NAMESPACE_OPEN_SCOPE
32 
33 class Hd_UnitTestNullRenderDelegate final : public HdRenderDelegate
34 {
35 public:
36  Hd_UnitTestNullRenderDelegate() = default;
37  virtual ~Hd_UnitTestNullRenderDelegate() = default;
38 
39  virtual const TfTokenVector &GetSupportedRprimTypes() const override;
40  virtual const TfTokenVector &GetSupportedSprimTypes() const override;
41  virtual const TfTokenVector &GetSupportedBprimTypes() const override;
42  virtual HdRenderParam *GetRenderParam() const override;
43  virtual HdResourceRegistrySharedPtr GetResourceRegistry() const override;
44 
50 
51  virtual HdRenderPassSharedPtr CreateRenderPass(HdRenderIndex *index,
52  HdRprimCollection const& collection) override;
53 
59 
60  virtual HdInstancer *CreateInstancer(HdSceneDelegate *delegate,
61  SdfPath const& id) override;
62 
63  virtual void DestroyInstancer(HdInstancer *instancer) override;
64 
70 
71  virtual HdRprim *CreateRprim(TfToken const& typeId,
72  SdfPath const& rprimId) override;
73 
74  virtual void DestroyRprim(HdRprim *rPrim) override;
75 
76  virtual HdSprim *CreateSprim(TfToken const& typeId,
77  SdfPath const& sprimId) override;
78 
79  virtual HdSprim *CreateFallbackSprim(TfToken const& typeId) override;
80  virtual void DestroySprim(HdSprim *sprim) override;
81 
82  virtual HdBprim *CreateBprim(TfToken const& typeId,
83  SdfPath const& bprimId) override;
84 
85  virtual HdBprim *CreateFallbackBprim(TfToken const& typeId) override;
86 
87  virtual void DestroyBprim(HdBprim *bprim) override;
88 
94 
95  virtual void CommitResources(HdChangeTracker *tracker) override;
96 
97 
103 
104  virtual HdCommandDescriptors GetCommandDescriptors() const;
105 
106  virtual bool InvokeCommand(
107  const TfToken &command,
108  const HdCommandArgs &args = HdCommandArgs());
109 
110 
111 
112 private:
113  static const TfTokenVector SUPPORTED_RPRIM_TYPES;
114  static const TfTokenVector SUPPORTED_SPRIM_TYPES;
115  static const TfTokenVector SUPPORTED_BPRIM_TYPES;
116 
117  Hd_UnitTestNullRenderDelegate(
118  const Hd_UnitTestNullRenderDelegate &) = delete;
119  Hd_UnitTestNullRenderDelegate &operator =(
120  const Hd_UnitTestNullRenderDelegate &) = delete;
121 
122 };
123 
124 PXR_NAMESPACE_CLOSE_SCOPE
125 
126 #endif // PXR_IMAGING_HD_UNIT_TEST_NULL_RENDER_DELEGATE_H
The Hydra render index is a flattened representation of the client scene graph, which may be composed...
Definition: renderIndex.h:116
Tracks changes from the HdSceneDelegate, providing invalidation cues to the render engine...
Definition: changeTracker.h:50
This class exists to facilitate point cloud style instancing.
Definition: instancer.h:124
A map with string keys and VtValue values.
Definition: dictionary.h:63
The HdRenderParam is an opaque (to core Hydra) handle, to an object that is obtained from the render ...
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:87
The render engine state for a given rprim from the scene graph.
Definition: rprim.h:68
Adapter class providing data exchange with the client scene graph.
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:442
A named, semantic collection of objects.
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:288
Sprim (state prim) is a base class of managing state for non-drawable scene entity (e...
Definition: sprim.h:52
Bprim (buffer prim) is a base class of managing a blob of data that is used to communicate between th...
Definition: bprim.h:56