HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
drawTargetRenderPassState.h
Go to the documentation of this file.
1 //
2 // Copyright 2017 Pixar
3 //
4 // Licensed under the terms set forth in the LICENSE.txt file available at
5 // https://openusd.org/license.
6 //
7 #ifndef PXR_IMAGING_HD_ST_DRAW_TARGET_RENDER_PASS_STATE_H
8 #define PXR_IMAGING_HD_ST_DRAW_TARGET_RENDER_PASS_STATE_H
9 
10 #include "pxr/pxr.h"
11 #include "pxr/imaging/hdSt/api.h"
12 #include "pxr/imaging/hd/enums.h"
14 #include "pxr/usd/sdf/path.h"
15 
17 
18 
19 class VtValue;
21  std::vector<struct HdRenderPassAovBinding>;
22 
23 /// \class HdStDrawTargetRenderPassState
24 ///
25 /// Represents common non-gl context specific render pass state for a draw
26 /// target.
27 ///
28 /// \note This is a temporary API to aid transition to Storm, and is subject
29 /// to major changes. It is likely this functionality will be absorbed into
30 /// the base class.
31 ///
33 {
34 public:
35  HDST_API
37  HDST_API
38  ~HdStDrawTargetRenderPassState(); // final no need to be virtual
39 
41  return _aovBindings;
42  }
43 
44  HDST_API
45  void SetAovBindings(const HdRenderPassAovBindingVector &aovBindings);
46 
47  /// Sets the priority of values in the depth buffer.
48  /// i.e. should pixels closer or further from the camera win.
49  HDST_API
50  void SetDepthPriority(HdDepthPriority priority);
51 
52  /// Set the path to the camera to use to draw this render path from.
53  HDST_API
54  void SetCamera(const SdfPath &cameraId);
55 
56  HDST_API
57  void SetRprimCollection(HdRprimCollection const& col);
58 
59  HdDepthPriority GetDepthPriority() const { return _depthPriority; }
60 
61 
62  /// Returns the path to the camera to render from.
63  const SdfPath &GetCamera() const { return _cameraId; }
64 
65  /// Returns an increasing version number for when the collection object
66  /// is changed.
67  /// Note: This tracks the actual object and not the contents of the
68  /// collection.
69  unsigned int GetRprimCollectionVersion() const
70  {
71  return _rprimCollectionVersion;
72  }
73 
74  /// Returns the collection associated with this draw target.
76  {
77  return _rprimCollection;
78  }
79 
80 private:
81  HdRenderPassAovBindingVector _aovBindings;
82  HdDepthPriority _depthPriority;
83 
84  SdfPath _cameraId;
85 
86  HdRprimCollection _rprimCollection;
87  unsigned int _rprimCollectionVersion;
88 
89  HdStDrawTargetRenderPassState(const HdStDrawTargetRenderPassState &) = delete;
90  HdStDrawTargetRenderPassState &operator =(const HdStDrawTargetRenderPassState &) = delete;
91 };
92 
93 
95 
96 #endif // PXR_IMAGING_HD_ST_DRAW_TARGET_RENDER_PASS_STATE_H
HdDepthPriority
Definition: enums.h:197
HDST_API void SetCamera(const SdfPath &cameraId)
Set the path to the camera to use to draw this render path from.
HDST_API HdStDrawTargetRenderPassState()
HdDepthPriority GetDepthPriority() const
HDST_API void SetAovBindings(const HdRenderPassAovBindingVector &aovBindings)
Definition: path.h:273
unsigned int GetRprimCollectionVersion() const
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1425
#define HDST_API
Definition: api.h:23
const HdRenderPassAovBindingVector & GetAovBindings() const
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
HDST_API void SetRprimCollection(HdRprimCollection const &col)
const SdfPath & GetCamera() const
Returns the path to the camera to render from.
const HdRprimCollection & GetRprimCollection() const
Returns the collection associated with this draw target.
HDST_API ~HdStDrawTargetRenderPassState()
std::vector< HdRenderPassAovBinding > HdRenderPassAovBindingVector
Definition: aov.h:137
Definition: value.h:146
HDST_API void SetDepthPriority(HdDepthPriority priority)