Loading...
Searching...
No Matches
attachmentDesc.h
1//
2// Copyright 2020 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_ATTACHMENT_DESC_H
8#define PXR_IMAGING_HGI_ATTACHMENT_DESC_H
9
10#include "pxr/pxr.h"
11#include "pxr/imaging/hgi/api.h"
12#include "pxr/imaging/hgi/enums.h"
13#include "pxr/imaging/hgi/types.h"
14#include "pxr/base/gf/vec4f.h"
15#include <vector>
16
17PXR_NAMESPACE_OPEN_SCOPE
18
19
49{
51 : format(HgiFormatInvalid)
52 , usage(0)
53 , loadOp(HgiAttachmentLoadOpLoad)
54 , storeOp(HgiAttachmentStoreOpStore)
55 , clearValue(0)
56 , colorMask(HgiColorMaskRed | HgiColorMaskGreen |
57 HgiColorMaskBlue | HgiColorMaskAlpha)
58 , blendEnabled(false)
59 , srcColorBlendFactor(HgiBlendFactorZero)
60 , dstColorBlendFactor(HgiBlendFactorZero)
61 , colorBlendOp(HgiBlendOpAdd)
62 , srcAlphaBlendFactor(HgiBlendFactorZero)
63 , dstAlphaBlendFactor(HgiBlendFactorZero)
64 , alphaBlendOp(HgiBlendOpAdd)
65 , blendConstantColor(0.0f, 0.0f, 0.0f, 0.0f)
66 {}
67
68 HgiFormat format;
69 HgiTextureUsage usage;
70 HgiAttachmentLoadOp loadOp;
71 HgiAttachmentStoreOp storeOp;
72 GfVec4f clearValue;
73 HgiColorMask colorMask;
74 bool blendEnabled;
75 HgiBlendFactor srcColorBlendFactor;
76 HgiBlendFactor dstColorBlendFactor;
77 HgiBlendOp colorBlendOp;
78 HgiBlendFactor srcAlphaBlendFactor;
79 HgiBlendFactor dstAlphaBlendFactor;
80 HgiBlendOp alphaBlendOp;
81 GfVec4f blendConstantColor;
82};
83
84using HgiAttachmentDescVector = std::vector<HgiAttachmentDesc>;
85
86HGI_API
87bool operator==(
88 const HgiAttachmentDesc& lhs,
89 const HgiAttachmentDesc& rhs);
90
91HGI_API
92bool operator!=(
93 const HgiAttachmentDesc& lhs,
94 const HgiAttachmentDesc& rhs);
95
96HGI_API
97std::ostream& operator<<(
98 std::ostream& out,
99 const HgiAttachmentDesc& attachment);
100
101
102PXR_NAMESPACE_CLOSE_SCOPE
103
104#endif
Basic type for a vector of 4 float components.
Definition: vec4f.h:46
GF_API std::ostream & operator<<(std::ostream &, const GfBBox3d &)
Output a GfBBox3d using the format [(range) matrix zeroArea].
Describes the properties of a framebuffer attachment.