Back to Filament

setAutomaticInstancingEnabled

docs/android/dokka/filament-android/com.google.android.filament/-engine/set-automatic-instancing-enabled.md

1.75.01.0 KB
Original Source

//filament-android/com.google.android.filament/Engine/setAutomaticInstancingEnabled

setAutomaticInstancingEnabled

[main]
open fun setAutomaticInstancingEnabled(enable: Boolean)

Enables or disables automatic instancing of render primitives. Instancing of render primitive can greatly reduce CPU overhead but requires the instanced primitives to be identical (i.e. use the same geometry) and use the same MaterialInstance. If it is known that the scene doesn't contain any identical primitives, automatic instancing can have some overhead and it is then best to disable it. Disabled by default.

Parameters

main

enabletrue to enable, false to disable automatic instancing.

See also

RenderableManager
MaterialInstance