Loading...
Searching...
No Matches
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
31PXR_NAMESPACE_OPEN_SCOPE
32
33class Hd_UnitTestNullRenderDelegate final : public HdRenderDelegate
34{
35public:
36 Hd_UnitTestNullRenderDelegate() = default;
37 ~Hd_UnitTestNullRenderDelegate() override = default;
38
39 HD_API
40 const TfTokenVector &GetSupportedRprimTypes() const override;
41 HD_API
42 const TfTokenVector &GetSupportedSprimTypes() const override;
43 HD_API
44 const TfTokenVector &GetSupportedBprimTypes() const override;
45 HD_API
46 HdRenderParam *GetRenderParam() const override;
47 HD_API
48 HdResourceRegistrySharedPtr GetResourceRegistry() const override;
49
55
56 HD_API
57 HdRenderPassSharedPtr CreateRenderPass(HdRenderIndex *index,
58 HdRprimCollection const& collection) override;
59
65
66 HD_API
67 HdInstancer *CreateInstancer(HdSceneDelegate *delegate,
68 SdfPath const& id) override;
69
70 HD_API
71 void DestroyInstancer(HdInstancer *instancer) override;
72
78
79 HD_API
80 HdRprim *CreateRprim(TfToken const& typeId,
81 SdfPath const& rprimId) override;
82
83 HD_API
84 void DestroyRprim(HdRprim *rPrim) override;
85
86 HD_API
87 HdSprim *CreateSprim(TfToken const& typeId,
88 SdfPath const& sprimId) override;
89
90 HD_API
91 HdSprim *CreateFallbackSprim(TfToken const& typeId) override;
92 HD_API
93 void DestroySprim(HdSprim *sprim) override;
94
95 HD_API
96 HdBprim *CreateBprim(TfToken const& typeId,
97 SdfPath const& bprimId) override;
98
99 HD_API
100 HdBprim *CreateFallbackBprim(TfToken const& typeId) override;
101
102 HD_API
103 void DestroyBprim(HdBprim *bprim) override;
104
110
111 HD_API
112 void CommitResources(HdChangeTracker *tracker) override;
113
114
120
121 HD_API
122 HdCommandDescriptors GetCommandDescriptors() const override;
123
124 HD_API
125 bool InvokeCommand(
126 const TfToken &command,
127 const HdCommandArgs &args = HdCommandArgs()) override;
128
129private:
130 static const TfTokenVector SUPPORTED_RPRIM_TYPES;
131 static const TfTokenVector SUPPORTED_SPRIM_TYPES;
132 static const TfTokenVector SUPPORTED_BPRIM_TYPES;
133
134 Hd_UnitTestNullRenderDelegate(
135 const Hd_UnitTestNullRenderDelegate &) = delete;
136 Hd_UnitTestNullRenderDelegate &operator =(
137 const Hd_UnitTestNullRenderDelegate &) = delete;
138
139};
140
141PXR_NAMESPACE_CLOSE_SCOPE
142
143#endif // PXR_IMAGING_HD_UNIT_TEST_NULL_RENDER_DELEGATE_H
Bprim (buffer prim) is a base class of managing a blob of data that is used to communicate between th...
Definition: bprim.h:57
Tracks changes from the HdSceneDelegate, providing invalidation cues to the render engine.
Definition: changeTracker.h:52
This class exists to facilitate point cloud style instancing.
Definition: instancer.h:125
The Hydra render index is a flattened representation of the client scene graph, which may be composed...
Definition: renderIndex.h:121
The HdRenderParam is an opaque (to core Hydra) handle, to an object that is obtained from the render ...
A named, semantic collection of objects.
The render engine state for a given rprim from the scene graph.
Definition: rprim.h:55
Adapter class providing data exchange with the client scene graph.
Sprim (state prim) is a base class of managing state for non-drawable scene entity (e....
Definition: sprim.h:52
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:290
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:88
A map with string keys and VtValue values.
Definition: dictionary.h:60
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:457