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  ~Hd_UnitTestNullRenderDelegate() override = default;
38 
39  const TfTokenVector &GetSupportedRprimTypes() const override;
40  const TfTokenVector &GetSupportedSprimTypes() const override;
41  const TfTokenVector &GetSupportedBprimTypes() const override;
42  HdRenderParam *GetRenderParam() 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 
61  SdfPath const& id) override;
62 
63  void DestroyInstancer(HdInstancer *instancer) override;
64 
65  ////////////////////////////////////////////////////////////////////////////
66  ///
67  /// Prim Factories
68  ///
69  ////////////////////////////////////////////////////////////////////////////
70 
71  HdRprim *CreateRprim(TfToken const& typeId,
72  SdfPath const& rprimId) override;
73 
74  void DestroyRprim(HdRprim *rPrim) override;
75 
76  HdSprim *CreateSprim(TfToken const& typeId,
77  SdfPath const& sprimId) override;
78 
79  HdSprim *CreateFallbackSprim(TfToken const& typeId) override;
80  void DestroySprim(HdSprim *sprim) override;
81 
82  HdBprim *CreateBprim(TfToken const& typeId,
83  SdfPath const& bprimId) override;
84 
85  HdBprim *CreateFallbackBprim(TfToken const& typeId) override;
86 
87  void DestroyBprim(HdBprim *bprim) override;
88 
89  ////////////////////////////////////////////////////////////////////////////
90  ///
91  /// Sync, Execute & Dispatch Hooks
92  ///
93  ////////////////////////////////////////////////////////////////////////////
94 
95  void CommitResources(HdChangeTracker *tracker) override;
96 
97 
98  ////////////////////////////////////////////////////////////////////////////
99  ///
100  /// Commands API
101  ///
102  ////////////////////////////////////////////////////////////////////////////
103 
105 
106  bool InvokeCommand(
107  const TfToken &command,
108  const HdCommandArgs &args = HdCommandArgs()) override;
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 
118  const Hd_UnitTestNullRenderDelegate &) = delete;
119  Hd_UnitTestNullRenderDelegate &operator =(
120  const Hd_UnitTestNullRenderDelegate &) = delete;
121 
122 };
123 
125 
126 #endif // PXR_IMAGING_HD_UNIT_TEST_NULL_RENDER_DELEGATE_H
std::shared_ptr< class HdRenderPass > HdRenderPassSharedPtr
Definition: engine.h:41
~Hd_UnitTestNullRenderDelegate() override=default
std::shared_ptr< class HdResourceRegistry > HdResourceRegistrySharedPtr
HdInstancer * CreateInstancer(HdSceneDelegate *delegate, SdfPath const &id) override
HdCommandDescriptors GetCommandDescriptors() const override
HdRenderPassSharedPtr CreateRenderPass(HdRenderIndex *index, HdRprimCollection const &collection) override
const TfTokenVector & GetSupportedSprimTypes() const override
void DestroyInstancer(HdInstancer *instancer) override
HdSprim * CreateSprim(TfToken const &typeId, SdfPath const &sprimId) override
Definition: token.h:87
Definition: rprim.h:54
std::vector< HdCommandDescriptor > HdCommandDescriptors
Definition: command.h:108
HdBprim * CreateBprim(TfToken const &typeId, SdfPath const &bprimId) override
HdSprim * CreateFallbackSprim(TfToken const &typeId) override
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:442
Definition: path.h:291
HdRenderParam * GetRenderParam() const override
HdResourceRegistrySharedPtr GetResourceRegistry() const override
Definition: sprim.h:51
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1441
void CommitResources(HdChangeTracker *tracker) override
const TfTokenVector & GetSupportedBprimTypes() const override
VtDictionary HdCommandArgs
Definition: command.h:71
HdBprim * CreateFallbackBprim(TfToken const &typeId) override
GLuint index
Definition: glcorearb.h:786
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:91
Definition: bprim.h:56
**If you just want to fire and args
Definition: thread.h:609
HdRprim * CreateRprim(TfToken const &typeId, SdfPath const &rprimId) override
void DestroySprim(HdSprim *sprim) override
const TfTokenVector & GetSupportedRprimTypes() const override
bool InvokeCommand(const TfToken &command, const HdCommandArgs &args=HdCommandArgs()) override
void DestroyRprim(HdRprim *rPrim) override
void DestroyBprim(HdBprim *bprim) override