ModelUploader class
final
Properties
-
defaults
→ DefaultTextures
-
Stand-ins for missing maps.
final
-
device
→ GpuDevice
-
Where buffers and textures are created.
final
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
keepEdges
↔ bool
-
Whether each primitive keeps its edges (GpuPrimitive.edges) for
lines drawn over the scene: on in an editor, off in a game, which
never draws them.
getter/setter pair
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
material(MaterialData data, {(GpuTexture, GpuSampler)? baseColor, List<(GpuTexture, GpuSampler)?>? maps})
→ GpuMaterial
-
A material of
data drawing baseColor (its texture and sampler)
where it has one, and the default maps everywhere else: a material
made in code (a shape's), sharing textures it was given.
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
toString()
→ String
-
A string representation of this object.
inherited
-
upload(ModelData data)
→ Future<GpuModel>
-
Uploads
data: buffers now, then each texture it uses, decoded once
per image and colour space, with a full mip chain when its sampler
mipmaps.
-
uploadImage(Uint8List bytes, {bool srgb = true})
→ Future<GpuTexture?>
-
Decodes the encoded image
bytes (PNG, JPEG, …) and uploads it with
a full chain of mips, as a colour (srgb) or a data map; null when
it cannot be decoded.
-
uploadPrimitive(PrimitiveData primitive)
→ GpuPrimitive
-
Uploads one primitive's buffers: a mesh made in code (a shape).