HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
unitTestNullRenderDelegate.h
Go to the documentation of this file.
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"
30 
32 
34 {
35 public:
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 
45  ////////////////////////////////////////////////////////////////////////////
46  ///
47  /// Renderpass factory
48  ///
49  ////////////////////////////////////////////////////////////////////////////
50 
52  HdRprimCollection const& collection) override;
53 
54  ////////////////////////////////////////////////////////////////////////////
55  ///
56  /// Instancer Factory
57  ///
58  ////////////////////////////////////////////////////////////////////////////
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 
66  ////////////////////////////////////////////////////////////////////////////
67  ///
68  /// Prim Factories
69  ///
70  ////////////////////////////////////////////////////////////////////////////
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 
91  ////////////////////////////////////////////////////////////////////////////
92  ///
93  /// Sync, Execute & Dispatch Hooks
94  ///
95  ////////////////////////////////////////////////////////////////////////////
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 
107  const Hd_UnitTestNullRenderDelegate &) = delete;
108  Hd_UnitTestNullRenderDelegate &operator =(
109  const Hd_UnitTestNullRenderDelegate &) = delete;
110 
111 };
112 
114 
115 #endif // PXR_IMAGING_HD_UNIT_TEST_NULL_RENDER_DELEGATE_H
virtual HdSprim * CreateSprim(TfToken const &typeId, SdfPath const &sprimId) override
virtual const TfTokenVector & GetSupportedSprimTypes() const override
virtual void CommitResources(HdChangeTracker *tracker) override
std::shared_ptr< class HdRenderPass > HdRenderPassSharedPtr
Definition: engine.h:41
std::shared_ptr< class HdResourceRegistry > HdResourceRegistrySharedPtr
virtual void DestroyRprim(HdRprim *rPrim) override
GLuint index
Definition: glew.h:1814
virtual ~Hd_UnitTestNullRenderDelegate()=default
virtual const TfTokenVector & GetSupportedBprimTypes() const override
virtual HdRenderParam * GetRenderParam() const override
virtual HdBprim * CreateBprim(TfToken const &typeId, SdfPath const &bprimId) override
virtual HdInstancer * CreateInstancer(HdSceneDelegate *delegate, SdfPath const &id, SdfPath const &instancerId) override
Definition: token.h:87
virtual void DestroyBprim(HdBprim *bprim) override
Definition: rprim.h:68
virtual const TfTokenVector & GetSupportedRprimTypes() const override
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:446
Definition: path.h:288
Definition: sprim.h:52
virtual HdRprim * CreateRprim(TfToken const &typeId, SdfPath const &rprimId, SdfPath const &instancerId) override
virtual HdSprim * CreateFallbackSprim(TfToken const &typeId) override
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1346
virtual HdBprim * CreateFallbackBprim(TfToken const &typeId) override
virtual void DestroyInstancer(HdInstancer *instancer) override
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:91
Definition: bprim.h:56
virtual void DestroySprim(HdSprim *sprim) override
virtual HdRenderPassSharedPtr CreateRenderPass(HdRenderIndex *index, HdRprimCollection const &collection) override
virtual HdResourceRegistrySharedPtr GetResourceRegistry() const override