All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
drawTargetRenderPassState.h
1 //
2 // Copyright 2017 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_ST_DRAW_TARGET_RENDER_PASS_STATE_H
25 #define PXR_IMAGING_HD_ST_DRAW_TARGET_RENDER_PASS_STATE_H
26 
27 #include "pxr/pxr.h"
28 #include "pxr/imaging/hdSt/api.h"
29 #include "pxr/imaging/hd/enums.h"
30 #include "pxr/imaging/hd/rprimCollection.h"
31 #include "pxr/usd/sdf/path.h"
32 
33 PXR_NAMESPACE_OPEN_SCOPE
34 
35 
36 class VtValue;
37 using HdRenderPassAovBindingVector =
38  std::vector<struct HdRenderPassAovBinding>;
39 
50 {
51 public:
52  HDST_API
54  HDST_API
55  ~HdStDrawTargetRenderPassState(); // final no need to be virtual
56 
57  const HdRenderPassAovBindingVector &GetAovBindings() const {
58  return _aovBindings;
59  }
60 
61  HDST_API
62  void SetAovBindings(const HdRenderPassAovBindingVector &aovBindings);
63 
66  HDST_API
67  void SetDepthPriority(HdDepthPriority priority);
68 
70  HDST_API
71  void SetCamera(const SdfPath &cameraId);
72 
73  HDST_API
74  void SetRprimCollection(HdRprimCollection const& col);
75 
76  HdDepthPriority GetDepthPriority() const { return _depthPriority; }
77 
78 
80  const SdfPath &GetCamera() const { return _cameraId; }
81 
86  unsigned int GetRprimCollectionVersion() const
87  {
88  return _rprimCollectionVersion;
89  }
90 
93  {
94  return _rprimCollection;
95  }
96 
97 private:
98  HdRenderPassAovBindingVector _aovBindings;
99  HdDepthPriority _depthPriority;
100 
101  SdfPath _cameraId;
102 
103  HdRprimCollection _rprimCollection;
104  unsigned int _rprimCollectionVersion;
105 
106  HdStDrawTargetRenderPassState(const HdStDrawTargetRenderPassState &) = delete;
107  HdStDrawTargetRenderPassState &operator =(const HdStDrawTargetRenderPassState &) = delete;
108 };
109 
110 
111 PXR_NAMESPACE_CLOSE_SCOPE
112 
113 #endif // PXR_IMAGING_HD_ST_DRAW_TARGET_RENDER_PASS_STATE_H
HDST_API void SetCamera(const SdfPath &cameraId)
Set the path to the camera to use to draw this render path from.
const HdRprimCollection & GetRprimCollection() const
Returns the collection associated with this draw target.
HDST_API void SetDepthPriority(HdDepthPriority priority)
Sets the priority of values in the depth buffer.
unsigned int GetRprimCollectionVersion() const
Returns an increasing version number for when the collection object is changed.
const SdfPath & GetCamera() const
Returns the path to the camera to render from.
A named, semantic collection of objects.
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:288
Provides a container which may hold any type, and provides introspection and iteration over array typ...
Definition: value.h:168
Represents common non-gl context specific render pass state for a draw target.