compile
fun compile(priority: Material.CompilerPriorityQueue, material: Material, view: View, shadowReceiver: Engine.FeatureState, skinning: Engine.FeatureState, callback: (Material) -> Unit? = null)
Asynchronously compiles the variants of material needed to render it in view, taking into account the view's features (lighting, fog, stereo, shadowing) and shadowReceiver and skinning.
Call flush after several calls so the backend starts right away. callback is always called, on the main thread, once the variants are compiled (or discarded, if the Engine is destroyed first).