Ktx2Texture class final

A KTX2 file, read down to what a texture upload needs: dimensions, an engine TextureFormat, and each mip level's bytes.

See ktx2_format.dart for the layout and for exactly which files this stage refuses rather than misreads.

levels are views over the bytes passed to parseByteData.view has no alignment requirement, unlike Uint32List.view/Float32List.view, so unlike .f3d's loader this needs no copying fallback for an odd offset.

Constructors

Ktx2Texture.parse(Uint8List bytes)
Reads bytes as a KTX2 file.
factory

Properties

format TextureFormat
final
hashCode int
The hash code for this object.
no setterinherited
levels List<ByteData>
Level 0 (the base, largest image) first.
final
pixelHeight int
final
pixelWidth int
final
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