Table of Contents

Struct TextureViewDescription

Namespace
NeoVeldrid
Assembly
NeoVeldrid.dll

Describes a TextureView, for creation using a ResourceFactory.

public struct TextureViewDescription : IEquatable<TextureViewDescription>
Implements
Inherited Members

Constructors

TextureViewDescription(Texture)

Constructs a new TextureViewDescription.

public TextureViewDescription(Texture target)

Parameters

target Texture

The desired target Texture. This Texture must have been created with the Sampled usage flag.

TextureViewDescription(Texture, PixelFormat)

Constructs a new TextureViewDescription.

public TextureViewDescription(Texture target, PixelFormat format)

Parameters

target Texture

The desired target Texture. This Texture must have been created with the Sampled usage flag.

format PixelFormat

Specifies how the data within the target Texture will be viewed. This format must be "compatible" with the target Texture's. For uncompressed formats, the overall size and number of components in this format must be equal to the underlying format. For compressed formats, it is only possible to use the same PixelFormat or its sRGB/non-sRGB counterpart.

TextureViewDescription(Texture, PixelFormat, uint, uint, uint, uint)

Constructs a new TextureViewDescription.

public TextureViewDescription(Texture target, PixelFormat format, uint baseMipLevel, uint mipLevels, uint baseArrayLayer, uint arrayLayers)

Parameters

target Texture

The desired target Texture.

format PixelFormat

Specifies how the data within the target Texture will be viewed. This format must be "compatible" with the target Texture's. For uncompressed formats, the overall size and number of components in this format must be equal to the underlying format. For compressed formats, it is only possible to use the same PixelFormat or its sRGB/non-sRGB counterpart.

baseMipLevel uint

The base mip level visible in the view. Must be less than MipLevels.

mipLevels uint

The number of mip levels visible in the view.

baseArrayLayer uint

The base array layer visible in the view.

arrayLayers uint

The number of array layers visible in the view.

TextureViewDescription(Texture, uint, uint, uint, uint)

Constructs a new TextureViewDescription.

public TextureViewDescription(Texture target, uint baseMipLevel, uint mipLevels, uint baseArrayLayer, uint arrayLayers)

Parameters

target Texture

The desired target Texture.

baseMipLevel uint

The base mip level visible in the view. Must be less than MipLevels.

mipLevels uint

The number of mip levels visible in the view.

baseArrayLayer uint

The base array layer visible in the view.

arrayLayers uint

The number of array layers visible in the view.

Fields

ArrayLayers

The number of array layers visible in the view.

public uint ArrayLayers

Field Value

uint

BaseArrayLayer

The base array layer visible in the view.

public uint BaseArrayLayer

Field Value

uint

BaseMipLevel

The base mip level visible in the view. Must be less than MipLevels.

public uint BaseMipLevel

Field Value

uint

Format

An optional PixelFormat which specifies how the data within Target will be viewed. If this value is null, then the created TextureView will use the same PixelFormat as the target Texture. If not null, this format must be "compatible" with the target Texture's. For uncompressed formats, the overall size and number of components in this format must be equal to the underlying format. For compressed formats, it is only possible to use the same PixelFormat or its sRGB/non-sRGB counterpart.

public PixelFormat? Format

Field Value

PixelFormat?

MipLevels

The number of mip levels visible in the view.

public uint MipLevels

Field Value

uint

Target

The desired target Texture.

public Texture Target

Field Value

Texture

Methods

Equals(TextureViewDescription)

Element-wise equality.

public bool Equals(TextureViewDescription other)

Parameters

other TextureViewDescription

The instance to compare to.

Returns

bool

True if all elements are equal; false otherswise.

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.