Builder

class Builder

Builder for creating and configuring an Engine instance.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard

Sets the rendering backend; DEFAULT lets the platform choose.

Link copied to clipboard
fun build(): Engine?

Creates the Engine, or returns null if the backend couldn't be initialized.

@PlatformGap(platforms = [FilamentPlatform.WEB], behavior = "builds synchronously and calls back before returning: the wasm build has no threads.")
fun build(callback: (Engine.Token) -> Unit)

Creates the Engine asynchronously. callback runs, possibly on another thread, once it's safe to call getEngine with its token, which must happen on the thread that called this.

Link copied to clipboard

Sets the default color grading configuration.

Link copied to clipboard

Sets the Engine's advanced configuration; null restores the defaults.

Link copied to clipboard
fun feature(name: String, value: Boolean): Engine.Builder

Sets a feature flag's value.

Link copied to clipboard

Sets the feature level; the effective level is the minimum of this and the backend's maximum.

Link copied to clipboard
@PlatformGap(platforms = [FilamentPlatform.WEB], behavior = "only sets Engine.isPaused, which is tracked locally there: the wasm build has no render thread to pause.")
fun paused(paused: Boolean): Engine.Builder

Starts the Engine paused; set Engine.isPaused to false to resume.

Link copied to clipboard
fun sharedContext(sharedContext: Any?): Engine.Builder

Shares a platform-specific rendering context with the Engine (e.g. an EGLContext on Android), to render to several windows or alongside an existing renderer.