compile

actual fun compile(priority: Engine.CompilerPriorityQueue, material: Material, view: View, shadowReceiver: Engine.FeatureState, skinning: Engine.FeatureState, callback: () -> Unit?)

Asynchronously compile a material variant for specific rendering features.

After issuing multiple compile() calls, call flush() to let the backend begin work. The callback is invoked on the main thread when compilation is complete.

Parameters

priority

Compilation priority (CRITICAL, HIGH, or LOW).

material

Material to compile variants for.

view

View providing rendering context.

shadowReceiver

Whether the material receives shadows.

skinning

Whether the material uses skeletal animation.

callback

Optional callback invoked when compilation completes.

expect fun compile(priority: Engine.CompilerPriorityQueue, material: Material, view: View, shadowReceiver: Engine.FeatureState, skinning: Engine.FeatureState, callback: () -> Unit? = null)

Asynchronously compile a material variant for specific rendering features.

After issuing multiple compile() calls, call flush() to let the backend begin work. The callback is invoked on the main thread when compilation is complete.

Parameters

priority

Compilation priority (CRITICAL, HIGH, or LOW).

material

Material to compile variants for.

view

View providing rendering context.

shadowReceiver

Whether the material receives shadows.

skinning

Whether the material uses skeletal animation.

callback

Optional callback invoked when compilation completes.

actual fun compile(priority: Engine.CompilerPriorityQueue, material: Material, view: View, shadowReceiver: Engine.FeatureState, skinning: Engine.FeatureState, callback: () -> Unit?)

Asynchronously compile a material variant for specific rendering features.

After issuing multiple compile() calls, call flush() to let the backend begin work. The callback is invoked on the main thread when compilation is complete.

Parameters

priority

Compilation priority (CRITICAL, HIGH, or LOW).

material

Material to compile variants for.

view

View providing rendering context.

shadowReceiver

Whether the material receives shadows.

skinning

Whether the material uses skeletal animation.

callback

Optional callback invoked when compilation completes.

actual fun compile(priority: Engine.CompilerPriorityQueue, material: Material, view: View, shadowReceiver: Engine.FeatureState, skinning: Engine.FeatureState, callback: () -> Unit?)

Asynchronously compile a material variant for specific rendering features.

After issuing multiple compile() calls, call flush() to let the backend begin work. The callback is invoked on the main thread when compilation is complete.

Parameters

priority

Compilation priority (CRITICAL, HIGH, or LOW).

material

Material to compile variants for.

view

View providing rendering context.

shadowReceiver

Whether the material receives shadows.

skinning

Whether the material uses skeletal animation.

callback

Optional callback invoked when compilation completes.

actual fun compile(priority: Engine.CompilerPriorityQueue, material: Material, view: View, shadowReceiver: Engine.FeatureState, skinning: Engine.FeatureState, callback: () -> Unit?)

Asynchronously compile a material variant for specific rendering features.

After issuing multiple compile() calls, call flush() to let the backend begin work. The callback is invoked on the main thread when compilation is complete.

Parameters

priority

Compilation priority (CRITICAL, HIGH, or LOW).

material

Material to compile variants for.

view

View providing rendering context.

shadowReceiver

Whether the material receives shadows.

skinning

Whether the material uses skeletal animation.

callback

Optional callback invoked when compilation completes.