GpuTextureDesc class final

A texture's size, format and uses.

Constructors

GpuTextureDesc({required int width, required int height, GpuFormat format = GpuFormat.rgba8, GpuStorage storage = GpuStorage.device, int mipLevels = 1, int samples = 1, bool cube = false, bool renderTarget = false, bool shaderRead = true})
Describes a texture.
const

Properties

cube → bool
Whether it is a cube map (6 slices).
final
format → GpuFormat
Pixel format.
final
hashCode → int
The hash code for this object.
no setteroverride
height → int
Height in pixels.
final
mipLevels → int
Mip levels allocated (1 = none).
final
renderTarget → bool
Whether it can be rendered into.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
samples → int
Samples per pixel (1, or 4 for MSAA).
final
shaderRead → bool
Whether shaders can sample it.
final
storage → GpuStorage
Where it lives.
final
width → int
Width in pixels.
final

Methods

copyWith({int? width, int? height, GpuFormat? format}) → GpuTextureDesc
A copy with some fields changed.
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

Static Methods

fullMipCount(int width, int height) → int
Mip levels for a full chain of a width × height texture.