AssetLoader

actual class AssetLoader

AssetLoader consumes glTF 2.0 content and produces FilamentAsset objects.

AssetLoader parses a blob of glTF 2.0 content (either JSON or GLB format) and produces a FilamentAsset object, which is a bundle of Filament textures, vertex buffers, index buffers, and entities. An asset is composed of one or more FilamentInstance objects containing the loaded scene hierarchy.

Clients must use AssetLoader to:

  • Create and destroy FilamentAsset objects (similar to how Engine creates core objects)

  • Not fetch external buffer data or create textures (use ResourceLoader for this)

Material providers: AssetLoader uses MaterialProvider to determine how materials are created:

  • UbershaderProvider: Uses a pre-compiled set of materials (recommended for performance)

  • JIT-compiled materials: Generated on-the-fly using Filamat (more flexible)

See also

expect class AssetLoader

AssetLoader consumes glTF 2.0 content and produces FilamentAsset objects.

AssetLoader parses a blob of glTF 2.0 content (either JSON or GLB format) and produces a FilamentAsset object, which is a bundle of Filament textures, vertex buffers, index buffers, and entities. An asset is composed of one or more FilamentInstance objects containing the loaded scene hierarchy.

Clients must use AssetLoader to:

  • Create and destroy FilamentAsset objects (similar to how Engine creates core objects)

  • Not fetch external buffer data or create textures (use ResourceLoader for this)

Material providers: AssetLoader uses MaterialProvider to determine how materials are created:

  • UbershaderProvider: Uses a pre-compiled set of materials (recommended for performance)

  • JIT-compiled materials: Generated on-the-fly using Filamat (more flexible)

See also

actual class AssetLoader

AssetLoader consumes glTF 2.0 content and produces FilamentAsset objects.

AssetLoader parses a blob of glTF 2.0 content (either JSON or GLB format) and produces a FilamentAsset object, which is a bundle of Filament textures, vertex buffers, index buffers, and entities. An asset is composed of one or more FilamentInstance objects containing the loaded scene hierarchy.

Clients must use AssetLoader to:

  • Create and destroy FilamentAsset objects (similar to how Engine creates core objects)

  • Not fetch external buffer data or create textures (use ResourceLoader for this)

Material providers: AssetLoader uses MaterialProvider to determine how materials are created:

  • UbershaderProvider: Uses a pre-compiled set of materials (recommended for performance)

  • JIT-compiled materials: Generated on-the-fly using Filamat (more flexible)

See also

actual class AssetLoader

AssetLoader consumes glTF 2.0 content and produces FilamentAsset objects.

AssetLoader parses a blob of glTF 2.0 content (either JSON or GLB format) and produces a FilamentAsset object, which is a bundle of Filament textures, vertex buffers, index buffers, and entities. An asset is composed of one or more FilamentInstance objects containing the loaded scene hierarchy.

Clients must use AssetLoader to:

  • Create and destroy FilamentAsset objects (similar to how Engine creates core objects)

  • Not fetch external buffer data or create textures (use ResourceLoader for this)

Material providers: AssetLoader uses MaterialProvider to determine how materials are created:

  • UbershaderProvider: Uses a pre-compiled set of materials (recommended for performance)

  • JIT-compiled materials: Generated on-the-fly using Filamat (more flexible)

See also

actual class AssetLoader

AssetLoader consumes glTF 2.0 content and produces FilamentAsset objects.

AssetLoader parses a blob of glTF 2.0 content (either JSON or GLB format) and produces a FilamentAsset object, which is a bundle of Filament textures, vertex buffers, index buffers, and entities. An asset is composed of one or more FilamentInstance objects containing the loaded scene hierarchy.

Clients must use AssetLoader to:

  • Create and destroy FilamentAsset objects (similar to how Engine creates core objects)

  • Not fetch external buffer data or create textures (use ResourceLoader for this)

Material providers: AssetLoader uses MaterialProvider to determine how materials are created:

  • UbershaderProvider: Uses a pre-compiled set of materials (recommended for performance)

  • JIT-compiled materials: Generated on-the-fly using Filamat (more flexible)

See also

Constructors

Link copied to clipboard
constructor(jsLoader: gltfio_AssetLoader, engine: Engine)
constructor(nativeHandle: MemorySegment?)
constructor(nativeHandle: CPointer<FilaAssetLoader>?)

Types

Link copied to clipboard
actual object Companion
expect object Companion
actual object Companion
actual object Companion
actual object Companion

Properties

Link copied to clipboard
var nativeHandle: MemorySegment?
var nativeHandle: CPointer<FilaAssetLoader>?

Functions

Link copied to clipboard
actual fun createAsset(buffer: ByteArray): FilamentAsset?

Create a FilamentAsset from glTF 2.0 data.

expect fun createAsset(buffer: ByteArray): FilamentAsset?

Create a FilamentAsset from glTF 2.0 data.

actual fun createAsset(buffer: ByteArray): FilamentAsset?

Create a FilamentAsset from glTF 2.0 data.

actual fun createAsset(buffer: ByteArray): FilamentAsset?

Create a FilamentAsset from glTF 2.0 data.

actual fun createAsset(buffer: ByteArray): FilamentAsset?

Create a FilamentAsset from glTF 2.0 data.

Link copied to clipboard

Create a FilamentInstance from an existing FilamentAsset.

Create a FilamentInstance from an existing FilamentAsset.

Create a FilamentInstance from an existing FilamentAsset.

Create a FilamentInstance from an existing FilamentAsset.

Create a FilamentInstance from an existing FilamentAsset.

Link copied to clipboard

Create a FilamentAsset with pre-allocated instances.

Create a FilamentAsset with pre-allocated instances.

Create a FilamentAsset with pre-allocated instances.

Create a FilamentAsset with pre-allocated instances.

Create a FilamentAsset with pre-allocated instances.

Link copied to clipboard
actual fun destroyAsset(asset: FilamentAsset)

Destroy a FilamentAsset and release all associated resources.

expect fun destroyAsset(asset: FilamentAsset)

Destroy a FilamentAsset and release all associated resources.

actual fun destroyAsset(asset: FilamentAsset)

Destroy a FilamentAsset and release all associated resources.

actual fun destroyAsset(asset: FilamentAsset)

Destroy a FilamentAsset and release all associated resources.

actual fun destroyAsset(asset: FilamentAsset)

Destroy a FilamentAsset and release all associated resources.

Link copied to clipboard
actual fun enableDiagnostics(enable: Boolean)

Enable diagnostic output for asset loading.

expect fun enableDiagnostics(enable: Boolean)

Enable diagnostic output for asset loading.

actual fun enableDiagnostics(enable: Boolean)

Enable diagnostic output for asset loading.

actual fun enableDiagnostics(enable: Boolean)

Enable diagnostic output for asset loading.

actual fun enableDiagnostics(enable: Boolean)

Enable diagnostic output for asset loading.