VertexFormat enum

The format of a single vertex attribute.

Each value names a component count, scalar type, and bit width. The enum currently covers the 32-bit-per-component scalar types (float, signed integer, unsigned integer) in 1, 2, 3, and 4 component widths. Normalized integer, packed, half-float, BGRA-swizzled, and 64-bit attribute formats will be added in a future release; new values are purely additive and won't affect callers using existing values.

Inheritance
Available extensions

Values

float32 → const VertexFormat

One 32-bit float (4 bytes).

const VertexFormat(bytesPerElement: 4, componentCount: 1)
float32x2 → const VertexFormat

Two 32-bit floats (8 bytes).

const VertexFormat(bytesPerElement: 8, componentCount: 2)
float32x3 → const VertexFormat

Three 32-bit floats (12 bytes).

const VertexFormat(bytesPerElement: 12, componentCount: 3)
float32x4 → const VertexFormat

Four 32-bit floats (16 bytes).

const VertexFormat(bytesPerElement: 16, componentCount: 4)
uint32 → const VertexFormat

One 32-bit unsigned integer (4 bytes).

const VertexFormat(bytesPerElement: 4, componentCount: 1)
uint32x2 → const VertexFormat

Two 32-bit unsigned integers (8 bytes).

const VertexFormat(bytesPerElement: 8, componentCount: 2)
uint32x3 → const VertexFormat

Three 32-bit unsigned integers (12 bytes).

const VertexFormat(bytesPerElement: 12, componentCount: 3)
uint32x4 → const VertexFormat

Four 32-bit unsigned integers (16 bytes).

const VertexFormat(bytesPerElement: 16, componentCount: 4)
sint32 → const VertexFormat

One 32-bit signed integer (4 bytes).

const VertexFormat(bytesPerElement: 4, componentCount: 1)
sint32x2 → const VertexFormat

Two 32-bit signed integers (8 bytes).

const VertexFormat(bytesPerElement: 8, componentCount: 2)
sint32x3 → const VertexFormat

Three 32-bit signed integers (12 bytes).

const VertexFormat(bytesPerElement: 12, componentCount: 3)
sint32x4 → const VertexFormat

Four 32-bit signed integers (16 bytes).

const VertexFormat(bytesPerElement: 16, componentCount: 4)

Properties

bytesPerElement int
Total size in bytes of a single attribute element of this format.
final
componentCount int
Number of scalar components in a single attribute element.
final
hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

values → const List<VertexFormat>
A constant List of the values in this enum, in order of their declaration.