HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
graphicsCmdsDesc.h
Go to the documentation of this file.
1 //
2 // Copyright 2019 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_HGI_GRAPHICS_CMDS_DESC_H
8 #define PXR_IMAGING_HGI_GRAPHICS_CMDS_DESC_H
9 
10 #include "pxr/pxr.h"
11 #include "pxr/imaging/hgi/api.h"
14 #include <vector>
15 
17 
18 
19 /// \struct HgiGraphicsCmdsDesc
20 ///
21 /// Describes the properties to begin a HgiGraphicsCmds.
22 ///
23 /// <ul>
24 /// <li>colorAttachmentDescs:
25 /// Describes each of the color attachments.</li>
26 /// <li>depthAttachmentDesc:
27 /// Describes the depth attachment (optional)</li>
28 /// <li>colorTextures:
29 /// The color attachment render targets.</li>
30 /// <li>colorResolveTextures:
31 /// The (optional) textures that the color textures will be resolved into
32 /// at the end of the render pass.</li>
33 /// <li>depthTexture:
34 /// The depth attachment render target (optional)</li>
35 /// <li>depthResolveTexture:
36 /// The (optional) texture that the depth texture will be resolved into
37 /// at the end of the render pass.</li>
38 /// <li>width:
39 /// Render target width (in pixels)</li>
40 /// <li>height:
41 /// Render target height (in pixels)</li>
42 /// </ul>
43 ///
45 {
49  , colorTextures()
51  , depthTexture()
53  {}
54 
55  inline bool HasAttachments() const {
56  return !colorAttachmentDescs.empty() || depthTexture;
57  }
58 
61 
64 
67 };
68 
69 HGI_API
70 bool operator==(
71  const HgiGraphicsCmdsDesc& lhs,
72  const HgiGraphicsCmdsDesc& rhs);
73 
74 HGI_API
75 bool operator!=(
76  const HgiGraphicsCmdsDesc& lhs,
77  const HgiGraphicsCmdsDesc& rhs);
78 
79 HGI_API
80 std::ostream& operator<<(
81  std::ostream& out,
82  const HgiGraphicsCmdsDesc& desc);
83 
84 
86 
87 #endif
HgiAttachmentDescVector colorAttachmentDescs
std::vector< HgiAttachmentDesc > HgiAttachmentDescVector
int HgiHandle< class HgiTexture > HgiTextureHandle
HgiAttachmentDesc depthAttachmentDesc
std::vector< HgiTextureHandle > HgiTextureHandleVector
Definition: texture.h:196
HgiTextureHandle depthTexture
HgiTextureHandleVector colorResolveTextures
bool operator!=(const Mat3< T0 > &m0, const Mat3< T1 > &m1)
Inequality operator, does exact floating point comparisons.
Definition: Mat3.h:556
bool HasAttachments() const
#define HGI_API
Definition: api.h:23
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1425
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
HgiTextureHandleVector colorTextures
HgiTextureHandle depthResolveTexture
bool operator==(const Mat3< T0 > &m0, const Mat3< T1 > &m1)
Equality operator, does exact floating point comparisons.
Definition: Mat3.h:542
HGI_API std::ostream & operator<<(std::ostream &out, const HgiGraphicsCmdsDesc &desc)