Struct FrameBufferAttachment
Contains properties that describe a framebuffer texture attachment.
Namespace: Evergine.Common.Graphics
Assembly: Evergine.Common.dll
Syntax
public struct FrameBufferAttachment
Constructors
FrameBufferAttachment(Texture, uint, uint, Texture, uint, uint, PixelFormat)
Initializes a new instance of the FrameBufferAttachment struct.
Declaration
public FrameBufferAttachment(Texture attachedTexture = null, uint attachedFirstSlice = 0, uint sliceCount = 1, Texture resolvedTexture = null, uint resolvedFirstSlice = 0, uint mipLevel = 0, PixelFormat format = PixelFormat.Unknown)
Parameters
| Type | Name | Description |
|---|---|---|
| Texture | attachedTexture | The attachment texture. |
| uint | attachedFirstSlice | The first slice. |
| uint | sliceCount | The slice count on the resolved texture. |
| Texture | resolvedTexture | The resolved texture. |
| uint | resolvedFirstSlice | The first slice on the resolved texture. |
| uint | mipLevel | The selected mip level on the resolved texture. |
| PixelFormat | format | The format of the attachment. |
Fields
AttachedFirstSlice
The selected array slice.
Declaration
public uint AttachedFirstSlice
Field Value
| Type | Description |
|---|---|
| uint |
AttachmentTexture
The attachment texture. This is the texture used by the framebuffer as an attachment.
Declaration
public Texture AttachmentTexture
Field Value
| Type | Description |
|---|---|
| Texture |
Remarks
If this texture has MSAA enabled, you can set the ResolvedTexture field with a non-MSAA texture. After the EndRenderPass, this texture will be resolved into that.
MipSlice
The selected mip level.
Declaration
public uint MipSlice
Field Value
| Type | Description |
|---|---|
| uint |
ResolvedFirstSlice
The selected array slice.
Declaration
public uint ResolvedFirstSlice
Field Value
| Type | Description |
|---|---|
| uint |
ResolvedTexture
The resolved texture. If the source texture has MSAA enabled, in the EndRenderPass, this texture is resolved into this texture.
Declaration
public Texture ResolvedTexture
Field Value
| Type | Description |
|---|---|
| Texture |
SliceCount
The number of slices to attach.
Declaration
public uint SliceCount
Field Value
| Type | Description |
|---|---|
| uint |
Properties
FirstSlice
Gets the selected array slice of the texture used as a shader resource.
Declaration
public uint FirstSlice { get; }
Property Value
| Type | Description |
|---|---|
| uint |
PixelFormat
Gets the format of the attachment. It can be different from the format of the texture if the attachment has gamma correction. For example, the texture can be RGB8 while the attachment format is sRGB8.
Declaration
public PixelFormat PixelFormat { get; }
Property Value
| Type | Description |
|---|---|
| PixelFormat |
Texture
Gets the texture used as a shader resource.
Declaration
public Texture Texture { get; }
Property Value
| Type | Description |
|---|---|
| Texture |
Methods
Equals(FrameBufferAttachment)
Determines whether the specified parameter is equal to this instance.
Declaration
public bool Equals(FrameBufferAttachment other)
Parameters
| Type | Name | Description |
|---|---|---|
| FrameBufferAttachment | other | The object to compare. |
Returns
| Type | Description |
|---|---|
| bool |
|
Equals(object)
Determines whether the specified object is equal to this instance.
Declaration
public override bool Equals(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj | The object to compare with this instance. |
Returns
| Type | Description |
|---|---|
| bool |
|
Overrides
GetHashCode()
Returns a hash code for this instance.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int | A hash code for this instance, suitable for use in hashing algorithms and data structures such as a hash table. |
Overrides
Operators
operator ==(FrameBufferAttachment, FrameBufferAttachment)
Implements the == operator.
Declaration
public static bool operator ==(FrameBufferAttachment value1, FrameBufferAttachment value2)
Parameters
| Type | Name | Description |
|---|---|---|
| FrameBufferAttachment | value1 | The first value. |
| FrameBufferAttachment | value2 | The second value. |
Returns
| Type | Description |
|---|---|
| bool | The result of the operator. |
operator !=(FrameBufferAttachment, FrameBufferAttachment)
Implements the operator ==.
Declaration
public static bool operator !=(FrameBufferAttachment value1, FrameBufferAttachment value2)
Parameters
| Type | Name | Description |
|---|---|---|
| FrameBufferAttachment | value1 | Value 1. |
| FrameBufferAttachment | value2 | Value 2. |
Returns
| Type | Description |
|---|---|
| bool | The result of the operator. |