Gorgon
Show / Hide Table of Contents

Enum TextureBinding

Defines the flags that describe how the texture should be used.

Namespace: Gorgon.Graphics.Core
Assembly: Gorgon.Graphics.Core.dll
Syntax
[Flags]
public enum TextureBinding
Remarks

This values can be OR'd together for use in different stages of the pipeline. For example, ShaderResource | RenderTarget allows the texture to be used as a render target and a shader input (although, not at the same time) through either a render target view, or shader resource view.

Fields

Name Description
DepthStencil

The texture is meant to be used as a depth stencil buffer.

To use a depth/stencil buffer as a shader input, the Format must be set to an typeless appropriate format. Failure to do so when specifying this flag will result in an exception.

The following table lists the acceptable typeless formats to use with a depth/stencil format:

Depth/Stencil FormatTypeless Format
D16_UNormR16_Typeless
D32_FloatR32_Typeless
D24_UNorm_S8_UIntR24G8_Typeless
D32_Float_S8X24_UIntR32G8X24_Typeless

important

GorgonTexture1D and GorgonTexture3D types cannot have this as a binding.

None

No binding will be done with this texture.

This flag is mutually exclusive, and supercedes any other flags.

If this flag is set, then this texture cannot be bound with the pipeline. And this is the only binding flag allowed when the texture has a Usage of Staging.

ReadWriteView

The texture is meant to be used with a read/write (unordered access) view.

Textures that are multisampled cannot use this flag.

RenderTarget

The texture is meant to be used as a render target.

important

GorgonTexture1D types cannot have this as a binding. This restriction is imposed by Gorgon and may be lifted in the future.

ShaderResource

The texture is meant to be bound as an input to a shader.

Extension Methods

GorgonNullExtensions.AsNullable<T>(object)
GorgonNullExtensions.IfNull<T>(object, T)
GorgonNullExtensions.IsNull(object)
  • Edit this page
  • View Source
In this article
Back to top Copyright 2023 - Licensed under the MIT license by Michael Winsor (Tape_Worm).
Send comments on this topic to the author