Table of Contents

Class Texture

Namespace
NeoVeldrid
Assembly
NeoVeldrid.dll

A device resource used to store arbitrary image data in a specific format. See TextureDescription.

public abstract class Texture : DeviceResource, MappableResource, IDisposable, BindableResource
Inheritance
Texture
Implements
Inherited Members

Properties

ArrayLayers

The total number of array layers in this instance.

public abstract uint ArrayLayers { get; }

Property Value

uint

Depth

The total depth of this instance, in texels.

public abstract uint Depth { get; }

Property Value

uint

Format

The format of individual texture elements stored in this instance.

public abstract PixelFormat Format { get; }

Property Value

PixelFormat

Height

The total height of this instance, in texels.

public abstract uint Height { get; }

Property Value

uint

IsDisposed

A bool indicating whether this instance has been disposed.

public abstract bool IsDisposed { get; }

Property Value

bool

MipLevels

The total number of mipmap levels in this instance.

public abstract uint MipLevels { get; }

Property Value

uint

Name

A string identifying this instance. Can be used to differentiate between objects in graphics debuggers and other tools.

public abstract string Name { get; set; }

Property Value

string

SampleCount

The number of samples in this instance. If this returns any value other than Count1, then this instance is a multipsample texture.

public abstract TextureSampleCount SampleCount { get; }

Property Value

TextureSampleCount

Type

The TextureType of this instance.

public abstract TextureType Type { get; }

Property Value

TextureType

Usage

The usage flags given when this instance was created. This property controls how this instance is permitted to be used, and it is an error to attempt to use the Texture outside of those contexts.

public abstract TextureUsage Usage { get; }

Property Value

TextureUsage

Width

The total width of this instance, in texels.

public abstract uint Width { get; }

Property Value

uint

Methods

CalculateSubresource(uint, uint)

Calculates the subresource index, given a mipmap level and array layer.

public uint CalculateSubresource(uint mipLevel, uint arrayLayer)

Parameters

mipLevel uint

The mip level. This should be less than MipLevels.

arrayLayer uint

The array layer. This should be less than ArrayLayers.

Returns

uint

The subresource index.

Dispose()

Frees unmanaged device resources controlled by this instance.

public virtual void Dispose()