TextureDescriptor class base

Everything a texture is made from — TextureAllocator.createTexture.

The general form of the four creators the contract had before 0.9, which each made one shape: a 2D target, a 2D upload, a cube upload and a cube target. dimension picks the shape; depthOrArrayLayers is the layer count of an array (six per cube of a cube array, and six for a cube) or the depth of a 3D texture.

Extended by RenderTargetDescriptor, the 2D target the render target pool keys on, which is why this is a base class: createTexture takes either, and a pool's target is one shape of this.

Annotations

Constructors

TextureDescriptor({required int width, required int height, required TextureFormat format, TextureDimension dimension = TextureDimension.d2, int depthOrArrayLayers = 1, int mipLevelCount = 1, int sampleCount = 1, TextureUsage usage = TextureUsage.standard, StorageMode storageMode = StorageMode.devicePrivate, String? label})
Creates a description of a width by height texture of format.
const

Properties

depthOrArrayLayers → int
Layers of an array or cube (a multiple of six for cubes), or depth of a 3D texture. One otherwise.
final
dimension → TextureDimension
The texture's shape; 2D by default. Any other needs its feature; see checkFeatures.
final
format → TextureFormat
The layout of each texel.
final
hashCode → int
The hash code for this object.
no setteroverride
height → int
Height of the base level in texels, at least one; one for a 1D texture.
final
label → String?
What a GPU debugger calls it.
final
mipLevelCount → int
Levels counting the base.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sampleCount → int
Above one makes a multisampled texture, which is 2D with one level.
final
storageMode → StorageMode
Where the allocation lives; device-private by default. StorageMode.deviceTransient makes a texture no later pass or readback can read.
final
usage → TextureUsage
What the texture may be used for; TextureUsage.standard by default.
final
width → int
Width of the base level in texels, at least one.
final

Methods

checkFeatures(DeviceFeatures features, {required String backend}) → void
Throws UnsupportedCapabilityException when this texture needs a feature features lacks: a shape other than 2D (texture1D, textureArrays, texture3D, cubeTextures, cubeArrayTextures), a storage usage (storageTextures) or more than one sample (offscreenMultisample).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override