All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
renderDelegate.h
1 //
2 // Copyright 2019 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 HDXPRMAN_RENDER_DELEGATE_H
25 #define HDXPRMAN_RENDER_DELEGATE_H
26 
27 #include "pxr/pxr.h"
28 #include "hdPrman/renderDelegate.h"
29 
30 PXR_NAMESPACE_OPEN_SCOPE
31 
32 class HdPrman_RenderParam;
33 struct HdPrman_Context;
34 class HdxPrman_RenderPass;
35 struct HdxPrman_InteractiveContext;
36 
37 class HdxPrmanRenderDelegate final : public HdPrmanRenderDelegate {
38 public:
39  HdxPrmanRenderDelegate(std::shared_ptr<HdPrman_Context> context);
40  HdxPrmanRenderDelegate(std::shared_ptr<HdPrman_Context> context,
41  HdRenderSettingsMap const& settingsMap);
42  virtual ~HdxPrmanRenderDelegate();
43 
44  // HdRenderDelegate API implementation.
45  virtual HdRenderPassSharedPtr CreateRenderPass(HdRenderIndex *index,
46  HdRprimCollection const& collection) override;
47  virtual HdSprim *CreateSprim(TfToken const& typeId,
48  SdfPath const& sprimId) override;
49  virtual void DestroySprim(HdSprim *sPrim) override;
50 
51  virtual const TfTokenVector &GetSupportedBprimTypes() const override;
52  virtual HdBprim *CreateBprim(TfToken const& typeId,
53  SdfPath const& bprimId) override;
54  virtual HdBprim *CreateFallbackBprim(TfToken const& typeId) override;
55 
56  virtual HdAovDescriptor GetDefaultAovDescriptor(
57  TfToken const& name) const override;
58 
60  virtual bool IsPauseSupported() const override;
61 
63  virtual bool Pause() override;
64 
66  virtual bool Resume() override;
67 
68 private:
69  // This class does not support copying.
70  HdxPrmanRenderDelegate(const HdxPrmanRenderDelegate &) = delete;
71  HdxPrmanRenderDelegate &operator =(const HdxPrmanRenderDelegate &) = delete;
72 
73  void _Initialize(std::shared_ptr<HdPrman_Context> context);
74 
75 private: // data
76  HdRenderPassSharedPtr _renderPass;
77  std::shared_ptr<HdxPrman_InteractiveContext> _interactiveContext;
78 };
79 
80 PXR_NAMESPACE_CLOSE_SCOPE
81 
82 #endif // HDXPRMAN_RENDER_DELEGATE_H
The Hydra render index is a flattened representation of the client scene graph, which may be composed...
Definition: renderIndex.h:119
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:89
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
A bundle of state describing an AOV (&quot;Alternate Output Value&quot;) display channel.
Definition: aov.h:46