Show / Hide Table of Contents

Class Texture

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

Inheritance
System.Object
Texture
Implements
DeviceResource
MappableResource
System.IDisposable
BindableResource
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Veldrid
Assembly: cs.temp.dll.dll
Syntax
public abstract class Texture : DeviceResource, MappableResource, IDisposable, BindableResource

Properties

ArrayLayers

The total number of array layers in this instance.

Declaration
public abstract uint ArrayLayers { get; }
Property Value
Type Description
System.UInt32

Depth

The total depth of this instance, in texels.

Declaration
public abstract uint Depth { get; }
Property Value
Type Description
System.UInt32

Format

The format of individual texture elements stored in this instance.

Declaration
public abstract PixelFormat Format { get; }
Property Value
Type Description
PixelFormat

Height

The total height of this instance, in texels.

Declaration
public abstract uint Height { get; }
Property Value
Type Description
System.UInt32

IsDisposed

A bool indicating whether this instance has been disposed.

Declaration
public abstract bool IsDisposed { get; }
Property Value
Type Description
System.Boolean

MipLevels

The total number of mipmap levels in this instance.

Declaration
public abstract uint MipLevels { get; }
Property Value
Type Description
System.UInt32

Name

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

Declaration
public abstract string Name { get; set; }
Property Value
Type Description
System.String

SampleCount

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

Declaration
public abstract TextureSampleCount SampleCount { get; }
Property Value
Type Description
TextureSampleCount

Type

The TextureType of this instance.

Declaration
public abstract TextureType Type { get; }
Property Value
Type Description
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.

Declaration
public abstract TextureUsage Usage { get; }
Property Value
Type Description
TextureUsage

Width

The total width of this instance, in texels.

Declaration
public abstract uint Width { get; }
Property Value
Type Description
System.UInt32

Methods

CalculateSubresource(UInt32, UInt32)

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

Declaration
public uint CalculateSubresource(uint mipLevel, uint arrayLayer)
Parameters
Type Name Description
System.UInt32 mipLevel

The mip level. This should be less than MipLevels.

System.UInt32 arrayLayer

The array layer. This should be less than ArrayLayers.

Returns
Type Description
System.UInt32

The subresource index.

Dispose()

Frees unmanaged device resources controlled by this instance.

Declaration
public virtual void Dispose()

Implements

DeviceResource
MappableResource
System.IDisposable
BindableResource
Back to top