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 HD_UNIT_TEST_NULL_RENDER_DELEGATE
25 #define HD_UNIT_TEST_NULL_RENDER_DELEGATE
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,
62  SdfPath const& instancerId) override;
63 
64  virtual void DestroyInstancer(HdInstancer *instancer) override;
65 
71 
72  virtual HdRprim *CreateRprim(TfToken const& typeId,
73  SdfPath const& rprimId,
74  SdfPath const& instancerId) override;
75 
76  virtual void DestroyRprim(HdRprim *rPrim) override;
77 
78  virtual HdSprim *CreateSprim(TfToken const& typeId,
79  SdfPath const& sprimId) override;
80 
81  virtual HdSprim *CreateFallbackSprim(TfToken const& typeId) override;
82  virtual void DestroySprim(HdSprim *sprim) override;
83 
84  virtual HdBprim *CreateBprim(TfToken const& typeId,
85  SdfPath const& bprimId) override;
86 
87  virtual HdBprim *CreateFallbackBprim(TfToken const& typeId) override;
88 
89  virtual void DestroyBprim(HdBprim *bprim) override;
90 
96 
97  virtual void CommitResources(HdChangeTracker *tracker) override;
98 
99 
100 
101 private:
102  static const TfTokenVector SUPPORTED_RPRIM_TYPES;
103  static const TfTokenVector SUPPORTED_SPRIM_TYPES;
104  static const TfTokenVector SUPPORTED_BPRIM_TYPES;
105 
106  Hd_UnitTestNullRenderDelegate(
107  const Hd_UnitTestNullRenderDelegate &) = delete;
108  Hd_UnitTestNullRenderDelegate &operator =(
109  const Hd_UnitTestNullRenderDelegate &) = delete;
110 
111 };
112 
113 PXR_NAMESPACE_CLOSE_SCOPE
114 
115 #endif // HD_UNIT_TEST_NULL_RENDER_DELEGATE
The Hydra render index is a flattened representation of the client scene graph, which may be composed...
Definition: renderIndex.h:119
Tracks changes from the HdSceneDelegate, providing invalidation cues to the render engine...
Definition: changeTracker.h:55
This class exists to facilitate point cloud style instancing.
Definition: instancer.h:119
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:89
The render engine state for a given rprim from the scene graph.
Definition: rprim.h:67
Adapter class providing data exchange with the client scene graph.
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:438
A named, semantic collection of objects.
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:287
Sprim (state prim) is a base class of managing state for non-drawable scene entity (e...
Definition: sprim.h:54
Bprim (buffer prim) is a base class of managing a blob of data that is used to communicate between th...
Definition: bprim.h:56