All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
drawTargetAttachmentDesc.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 HDST_DRAW_TARGET_ATTACHMENT_DESC_H
25 #define HDST_DRAW_TARGET_ATTACHMENT_DESC_H
26 
27 #include "pxr/pxr.h"
28 #include "pxr/imaging/hdSt/api.h"
29 #include "pxr/imaging/hd/version.h"
30 #include "pxr/imaging/hd/enums.h"
31 #include "pxr/imaging/hd/types.h"
32 
33 #include "pxr/base/vt/value.h"
34 
35 #include <string>
36 
37 PXR_NAMESPACE_OPEN_SCOPE
38 
39 
48 {
49 public:
51  HDST_API
53 
55  HDST_API
56  HdStDrawTargetAttachmentDesc(const std::string &name,
57  HdFormat format,
58  const VtValue &clearColor,
59  HdWrap wrapS,
60  HdWrap wrapT,
61  HdMinFilter minFilter,
62  HdMagFilter magFilter);
63  ~HdStDrawTargetAttachmentDesc() = default;
64 
65  // Copy for container support.
66  HDST_API
67  HdStDrawTargetAttachmentDesc(const HdStDrawTargetAttachmentDesc &copy);
68  HDST_API
69  HdStDrawTargetAttachmentDesc &operator =(
70  const HdStDrawTargetAttachmentDesc &copy);
71 
72  const std::string &GetName() const { return _name; }
73  HdFormat GetFormat() const { return _format; }
74  const VtValue &GetClearColor() const { return _clearColor; }
75  HdWrap GetWrapS() const { return _wrapS; }
76  HdWrap GetWrapT() const { return _wrapS; }
77  HdMinFilter GetMinFilter() const { return _minFilter; }
78  HdMagFilter GetMagFilter() const { return _magFilter; }
79 
80  // VtValue requirements
81  HDST_API
82  size_t GetHash() const;
83  HDST_API
84  void Dump(std::ostream &out) const;
85  HDST_API
86  bool operator==(const HdStDrawTargetAttachmentDesc &other) const;
87  HDST_API
88  bool operator!=(const HdStDrawTargetAttachmentDesc &other) const;
89 
90 private:
91  std::string _name;
92  HdFormat _format;
93  VtValue _clearColor;
94  HdWrap _wrapS;
95  HdWrap _wrapT;
96  HdMinFilter _minFilter;
97  HdMagFilter _magFilter;
98 };
99 
100 HDST_API
101 size_t hash_value(HdStDrawTargetAttachmentDesc const &attachment);
102 HDST_API
103 std::ostream &operator <<(std::ostream &out,
104  const HdStDrawTargetAttachmentDesc &pv);
105 
106 
107 PXR_NAMESPACE_CLOSE_SCOPE
108 
109 #endif // HDST_DRAW_TARGET_ATTACHMENT_DESC_H
Represents an render to texture render pass.
GF_API std::ostream & operator<<(std::ostream &, const GfBBox3d &)
Output a GfBBox3d using the format [(range) matrix zeroArea].
HDST_API HdStDrawTargetAttachmentDesc()
default constructor - only for use by containers.
Provides a container which may hold any type, and provides introspection and iteration over array typ...
Definition: value.h:182