MaterialProvider

actual interface MaterialProvider : AutoCloseable

MaterialProvider supplies materials to glTF assets during loading.

Implementations determine how glTF materials are rendered:

  • UbershaderProvider: Uses pre-compiled ubershader materials (recommended)

  • Custom providers: Can implement custom material mapping strategies

See also

Inheritors

expect interface MaterialProvider : AutoCloseable

MaterialProvider supplies materials to glTF assets during loading.

Implementations determine how glTF materials are rendered:

  • UbershaderProvider: Uses pre-compiled ubershader materials (recommended)

  • Custom providers: Can implement custom material mapping strategies

See also

Inheritors

actual interface MaterialProvider : AutoCloseable

MaterialProvider supplies materials to glTF assets during loading.

Implementations determine how glTF materials are rendered:

  • UbershaderProvider: Uses pre-compiled ubershader materials (recommended)

  • Custom providers: Can implement custom material mapping strategies

See also

Inheritors

actual interface MaterialProvider : AutoCloseable

MaterialProvider supplies materials to glTF assets during loading.

Implementations determine how glTF materials are rendered:

  • UbershaderProvider: Uses pre-compiled ubershader materials (recommended)

  • Custom providers: Can implement custom material mapping strategies

See also

Inheritors

actual interface MaterialProvider : AutoCloseable

MaterialProvider supplies materials to glTF assets during loading.

Implementations determine how glTF materials are rendered:

  • UbershaderProvider: Uses pre-compiled ubershader materials (recommended)

  • Custom providers: Can implement custom material mapping strategies

See also

Inheritors

Properties

Link copied to clipboard
actual abstract val materials: List<Material>

Gets the provider's cache of compiled materials (weak references).

expect abstract val materials: List<Material>

Gets the provider's cache of compiled materials (weak references).

actual abstract val materials: List<Material>

Gets the provider's cache of compiled materials (weak references).

actual abstract val materials: List<Material>

Gets the provider's cache of compiled materials (weak references).

actual abstract val materials: List<Material>

Gets the provider's cache of compiled materials (weak references).

Functions

Link copied to clipboard
abstract fun close()
expect abstract override fun close()

Same as destroy; lets this be used with use { } and try-with-resources.

abstract fun close()
abstract fun close()
expect abstract fun close()
Link copied to clipboard
actual abstract fun createMaterialInstance(config: MaterialKey, uvmap: IntArray, label: String?, extras: String?): MaterialInstance?

Creates or fetches a compiled Filament material, then creates an instance from it.

expect abstract fun createMaterialInstance(config: MaterialKey, uvmap: IntArray, label: String? = null, extras: String? = null): MaterialInstance?

Creates or fetches a compiled Filament material, then creates an instance from it.

actual abstract fun createMaterialInstance(config: MaterialKey, uvmap: IntArray, label: String?, extras: String?): MaterialInstance?

Creates or fetches a compiled Filament material, then creates an instance from it.

actual abstract fun createMaterialInstance(config: MaterialKey, uvmap: IntArray, label: String?, extras: String?): MaterialInstance?

Creates or fetches a compiled Filament material, then creates an instance from it.

actual abstract fun createMaterialInstance(config: MaterialKey, uvmap: IntArray, label: String?, extras: String?): MaterialInstance?

Creates or fetches a compiled Filament material, then creates an instance from it.

Link copied to clipboard
actual abstract fun destroy()

Frees the provider itself (cached materials survive unless destroyMaterials was called).

expect abstract fun destroy()

Frees the provider itself (cached materials survive unless destroyMaterials was called).

actual abstract fun destroy()

Frees the provider itself (cached materials survive unless destroyMaterials was called).

actual abstract fun destroy()

Frees the provider itself (cached materials survive unless destroyMaterials was called).

actual abstract fun destroy()

Frees the provider itself (cached materials survive unless destroyMaterials was called).

Link copied to clipboard
actual abstract fun destroyMaterials()

Destroys all cached materials. NOT called automatically on destroy, which lets clients take ownership of the cache if desired.

expect abstract fun destroyMaterials()

Destroys all cached materials. NOT called automatically on destroy, which lets clients take ownership of the cache if desired.

actual abstract fun destroyMaterials()

Destroys all cached materials. NOT called automatically on destroy, which lets clients take ownership of the cache if desired.

actual abstract fun destroyMaterials()

Destroys all cached materials. NOT called automatically on destroy, which lets clients take ownership of the cache if desired.

actual abstract fun destroyMaterials()

Destroys all cached materials. NOT called automatically on destroy, which lets clients take ownership of the cache if desired.

Link copied to clipboard
actual abstract fun getMaterial(config: MaterialKey, uvmap: IntArray, label: String?): Material?

Creates or fetches the compiled Filament material corresponding to config, without instancing it.

expect abstract fun getMaterial(config: MaterialKey, uvmap: IntArray, label: String? = null): Material?

Creates or fetches the compiled Filament material corresponding to config, without instancing it.

actual abstract fun getMaterial(config: MaterialKey, uvmap: IntArray, label: String?): Material?

Creates or fetches the compiled Filament material corresponding to config, without instancing it.

actual abstract fun getMaterial(config: MaterialKey, uvmap: IntArray, label: String?): Material?

Creates or fetches the compiled Filament material corresponding to config, without instancing it.

actual abstract fun getMaterial(config: MaterialKey, uvmap: IntArray, label: String?): Material?

Creates or fetches the compiled Filament material corresponding to config, without instancing it.

Link copied to clipboard
abstract fun getNativeProvider(): MaterialProvider
Link copied to clipboard
abstract fun nativeObject(): MemorySegment?

The underlying FilaMaterialProvider* — used by AssetLoader.

abstract fun nativeObject(): CPointer<FilaMaterialProvider>?
Link copied to clipboard

Returns true if the given vertex attribute must be present. Some providers (e.g. ubershader) require dummy attribute values when the glTF model does not provide them.

Returns true if the given vertex attribute must be present. Some providers (e.g. ubershader) require dummy attribute values when the glTF model does not provide them.

Returns true if the given vertex attribute must be present. Some providers (e.g. ubershader) require dummy attribute values when the glTF model does not provide them.

Returns true if the given vertex attribute must be present. Some providers (e.g. ubershader) require dummy attribute values when the glTF model does not provide them.

Returns true if the given vertex attribute must be present. Some providers (e.g. ubershader) require dummy attribute values when the glTF model does not provide them.