MaterialProvider

actual interface MaterialProvider

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

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

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

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

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

Functions

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
actual abstract fun getMaterials(): Array<Material>

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

expect abstract fun getMaterials(): Array<Material>

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

actual abstract fun getMaterials(): Array<Material>

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

actual abstract fun getMaterials(): Array<Material>

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

actual abstract fun getMaterials(): Array<Material>

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

Link copied to clipboard
abstract fun getNativeHandle(): MemorySegment?

The underlying FilaMaterialProvider* — used by AssetLoader.

abstract fun getNativeHandle(): CPointer<FilaMaterialProvider>?
Link copied to clipboard
abstract fun getNativeProvider(): MaterialProvider
Link copied to clipboard
actual abstract fun needsDummyData(attrib: Int): Boolean

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.

expect abstract fun needsDummyData(attrib: Int): Boolean

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.

actual abstract fun needsDummyData(attrib: Int): Boolean

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.

actual abstract fun needsDummyData(attrib: Int): Boolean

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.

actual abstract fun needsDummyData(attrib: Int): Boolean

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.