Engine
Engine is Filament's main entry-point.
An Engine instance keeps track of all resources created by the user and manages the rendering thread as well as the hardware renderer.
To use Filament, an Engine instance must be created first using Engine.create(). Engine essentially represents (or is associated with) a hardware context (e.g., an OpenGL ES context or a Vulkan device).
Rendering typically happens in an operating system's window (which can be fullscreen), which is managed by a Renderer.
A typical Filament render loop looks like this:
val engine = Engine.create()
val swapChain = engine.createSwapChain(nativeWindow)
val renderer = engine.createRenderer()
val scene = engine.createScene()
val view = engine.createView()
view.setScene(scene)
while (!quit) {
// Wait for VSYNC and user input events
if (renderer.beginFrame(swapChain)) {
renderer.render(view)
renderer.endFrame()
}
}
engine.destroy(view)
engine.destroy(scene)
engine.destroy(renderer)
engine.destroy(swapChain)
Engine.destroy(engine)Engine is Filament's main entry-point.
An Engine instance keeps track of all resources created by the user and manages the rendering thread as well as the hardware renderer.
To use Filament, an Engine instance must be created first using Engine.create(). Engine essentially represents (or is associated with) a hardware context (e.g., an OpenGL ES context or a Vulkan device).
Rendering typically happens in an operating system's window (which can be fullscreen), which is managed by a Renderer.
A typical Filament render loop looks like this:
val engine = Engine.create()
val swapChain = engine.createSwapChain(nativeWindow)
val renderer = engine.createRenderer()
val scene = engine.createScene()
val view = engine.createView()
view.setScene(scene)
while (!quit) {
// Wait for VSYNC and user input events
if (renderer.beginFrame(swapChain)) {
renderer.render(view)
renderer.endFrame()
}
}
engine.destroy(view)
engine.destroy(scene)
engine.destroy(renderer)
engine.destroy(swapChain)
Engine.destroy(engine)Engine is Filament's main entry-point.
An Engine instance keeps track of all resources created by the user and manages the rendering thread as well as the hardware renderer.
To use Filament, an Engine instance must be created first using Engine.create(). Engine essentially represents (or is associated with) a hardware context (e.g., an OpenGL ES context or a Vulkan device).
Rendering typically happens in an operating system's window (which can be fullscreen), which is managed by a Renderer.
A typical Filament render loop looks like this:
val engine = Engine.create()
val swapChain = engine.createSwapChain(nativeWindow)
val renderer = engine.createRenderer()
val scene = engine.createScene()
val view = engine.createView()
view.setScene(scene)
while (!quit) {
// Wait for VSYNC and user input events
if (renderer.beginFrame(swapChain)) {
renderer.render(view)
renderer.endFrame()
}
}
engine.destroy(view)
engine.destroy(scene)
engine.destroy(renderer)
engine.destroy(swapChain)
Engine.destroy(engine)Engine is Filament's main entry-point.
An Engine instance keeps track of all resources created by the user and manages the rendering thread as well as the hardware renderer.
To use Filament, an Engine instance must be created first using Engine.create(). Engine essentially represents (or is associated with) a hardware context (e.g., an OpenGL ES context or a Vulkan device).
Rendering typically happens in an operating system's window (which can be fullscreen), which is managed by a Renderer.
A typical Filament render loop looks like this:
val engine = Engine.create()
val swapChain = engine.createSwapChain(nativeWindow)
val renderer = engine.createRenderer()
val scene = engine.createScene()
val view = engine.createView()
view.setScene(scene)
while (!quit) {
// Wait for VSYNC and user input events
if (renderer.beginFrame(swapChain)) {
renderer.render(view)
renderer.endFrame()
}
}
engine.destroy(view)
engine.destroy(scene)
engine.destroy(renderer)
engine.destroy(swapChain)
Engine.destroy(engine)Engine is Filament's main entry-point.
An Engine instance keeps track of all resources created by the user and manages the rendering thread as well as the hardware renderer.
To use Filament, an Engine instance must be created first using Engine.create(). Engine essentially represents (or is associated with) a hardware context (e.g., an OpenGL ES context or a Vulkan device).
Rendering typically happens in an operating system's window (which can be fullscreen), which is managed by a Renderer.
A typical Filament render loop looks like this:
val engine = Engine.create()
val swapChain = engine.createSwapChain(nativeWindow)
val renderer = engine.createRenderer()
val scene = engine.createScene()
val view = engine.createView()
view.setScene(scene)
while (!quit) {
// Wait for VSYNC and user input events
if (renderer.beginFrame(swapChain)) {
renderer.render(view)
renderer.endFrame()
}
}
engine.destroy(view)
engine.destroy(scene)
engine.destroy(renderer)
engine.destroy(swapChain)
Engine.destroy(engine)Constructors
Types
Rendering backend selection.
Rendering backend selection.
Rendering backend selection.
Rendering backend selection.
Rendering backend selection.
Builder for creating and configuring an Engine instance.
Builder for creating and configuring an Engine instance.
Builder for creating and configuring an Engine instance.
Builder for creating and configuring an Engine instance.
Builder for creating and configuring an Engine instance.
Material compilation priority queue.
Material compilation priority queue.
Material compilation priority queue.
Material compilation priority queue.
Material compilation priority queue.
Advanced parameters for customizing Engine initialization.
Advanced parameters for customizing Engine initialization.
Advanced parameters for customizing Engine initialization.
Advanced parameters for customizing Engine initialization.
Advanced parameters for customizing Engine initialization.
Backend feature levels control available rendering capabilities and performance characteristics.
Backend feature levels control available rendering capabilities and performance characteristics.
Backend feature levels control available rendering capabilities and performance characteristics.
Backend feature levels control available rendering capabilities and performance characteristics.
Backend feature levels control available rendering capabilities and performance characteristics.
Feature state for conditional material compilation.
Feature state for conditional material compilation.
Feature state for conditional material compilation.
Feature state for conditional material compilation.
Feature state for conditional material compilation.
GPU context priority for work scheduling and preemption.
GPU context priority for work scheduling and preemption.
GPU context priority for work scheduling and preemption.
GPU context priority for work scheduling and preemption.
GPU context priority for work scheduling and preemption.
Stereoscopic rendering technique for VR and 3D displays.
Stereoscopic rendering technique for VR and 3D displays.
Stereoscopic rendering technique for VR and 3D displays.
Stereoscopic rendering technique for VR and 3D displays.
Stereoscopic rendering technique for VR and 3D displays.
Properties
The rendering backend being used by this Engine.
The rendering backend being used by this Engine.
The rendering backend being used by this Engine.
The rendering backend being used by this Engine.
The rendering backend being used by this Engine.
The Engine's advanced configuration — the Config object used when creating this Engine.
The Engine's advanced configuration — the Config object used when creating this Engine.
The Engine's advanced configuration — the Config object used when creating this Engine.
The Engine's advanced configuration — the Config object used when creating this Engine.
The Engine's advanced configuration — the Config object used when creating this Engine.
The highest feature level supported by this backend.
The highest feature level supported by this backend.
The highest feature level supported by this backend.
The highest feature level supported by this backend.
The highest feature level supported by this backend.
Functions
Asynchronously compile a material variant for specific rendering features.
Asynchronously compile a material variant for specific rendering features.
Asynchronously compile a material variant for specific rendering features.
Asynchronously compile a material variant for specific rendering features.
Asynchronously compile a material variant for specific rendering features.
Create a Camera as a standalone component.
Create a Camera attached to an entity.
Create a Camera as a standalone component.
Create a Camera attached to an entity.
Create a Camera as a standalone component.
Create a Camera attached to an entity.
Create a Camera as a standalone component.
Create a Camera attached to an entity.
Create a Camera as a standalone component.
Create a Camera attached to an entity.
Create a Fence for GPU synchronization.
Create a Fence for GPU synchronization.
Create a Fence for GPU synchronization.
Create a Fence for GPU synchronization.
Create a Fence for GPU synchronization.
Create a Renderer associated with this Engine.
Create a Renderer associated with this Engine.
Create a Renderer associated with this Engine.
Create a Renderer associated with this Engine.
Create a Renderer associated with this Engine.
Create a Scene for collecting renderable objects.
Create a Scene for collecting renderable objects.
Create a Scene for collecting renderable objects.
Create a Scene for collecting renderable objects.
Create a Scene for collecting renderable objects.
Create a SwapChain from a native display surface.
Create a SwapChain from a native display surface with flags.
Create an offscreen SwapChain of specified dimensions.
Create a SwapChain from a native display surface.
Create a SwapChain from a native display surface with flags.
Create an offscreen SwapChain of specified dimensions.
Create a SwapChain from a native display surface.
Create a SwapChain from a native display surface with flags.
Create an offscreen SwapChain of specified dimensions.
Create a SwapChain from a native display surface.
Create a SwapChain from a native display surface with flags.
Create an offscreen SwapChain of specified dimensions.
Create a SwapChain from a native display surface.
Create a SwapChain from a native display surface with flags.
Create an offscreen SwapChain of specified dimensions.
Create a View for rendering.
Create a View for rendering.
Create a View for rendering.
Create a View for rendering.
Create a View for rendering.
Destroy the Engine and all its resources.
Destroy the Engine and all its resources.
Destroy the Engine and all its resources.
Destroy the Engine and all its resources.
Destroy the Engine and all its resources.
Destroy a Camera.
Destroy a Camera.
Destroy a Camera.
Destroy a Camera.
Destroy a Camera.
Destroy the Camera component on an entity.
Destroy the Camera component on an entity.
Destroy the Camera component on an entity.
Destroy the Camera component on an entity.
Destroy the Camera component on an entity.
Destroy ColorGrading.
Destroy ColorGrading.
Destroy ColorGrading.
Destroy ColorGrading.
Destroy ColorGrading.
Destroy an Entity.
Destroy an Entity.
Destroy an Entity.
Destroy an Entity.
Destroy an Entity.
Destroy a Fence.
Destroy a Fence.
Destroy a Fence.
Destroy a Fence.
Destroy a Fence.
Destroy an IndexBuffer.
Destroy an IndexBuffer.
Destroy an IndexBuffer.
Destroy an IndexBuffer.
Destroy an IndexBuffer.
Destroy an IndirectLight.
Destroy an IndirectLight.
Destroy an IndirectLight.
Destroy an IndirectLight.
Destroy an IndirectLight.
Destroy a Material.
Destroy a Material.
Destroy a Material.
Destroy a Material.
Destroy a Material.
Destroy a MaterialInstance.
Destroy a MaterialInstance.
Destroy a MaterialInstance.
Destroy a MaterialInstance.
Destroy a MaterialInstance.
Destroy a MorphTargetBuffer.
Destroy a MorphTargetBuffer.
Destroy a MorphTargetBuffer.
Destroy a MorphTargetBuffer.
Destroy a MorphTargetBuffer.
Destroy a Renderer.
Destroy a Renderer.
Destroy a Renderer.
Destroy a Renderer.
Destroy a Renderer.
Destroy a RenderTarget.
Destroy a RenderTarget.
Destroy a RenderTarget.
Destroy a RenderTarget.
Destroy a RenderTarget.
Destroy a Scene.
Destroy a Scene.
Destroy a Scene.
Destroy a Scene.
Destroy a Scene.
Destroy a SkinningBuffer.
Destroy a SkinningBuffer.
Destroy a SkinningBuffer.
Destroy a SkinningBuffer.
Destroy a SkinningBuffer.
Destroy a Skybox.
Destroy a Skybox.
Destroy a Skybox.
Destroy a Skybox.
Destroy a Skybox.
Destroy a Stream.
Destroy a Stream.
Destroy a Stream.
Destroy a Stream.
Destroy a Stream.
Destroy a SwapChain.
Destroy a SwapChain.
Destroy a SwapChain.
Destroy a SwapChain.
Destroy a SwapChain.
Destroy a Texture.
Destroy a Texture.
Destroy a Texture.
Destroy a Texture.
Destroy a Texture.
Destroy a VertexBuffer.
Destroy a VertexBuffer.
Destroy a VertexBuffer.
Destroy a VertexBuffer.
Destroy a VertexBuffer.
Destroy a View.
Destroy a View.
Destroy a View.
Destroy a View.
Destroy a View.
Enable high-precision world-space translations for better numerical stability with large translations.
Enable high-precision world-space translations for better numerical stability with large translations.
Enable high-precision world-space translations for better numerical stability with large translations.
Enable high-precision world-space translations for better numerical stability with large translations.
Enable high-precision world-space translations for better numerical stability with large translations.
Flush pending GPU commands to the driver (non-blocking).
Flush pending GPU commands to the driver (non-blocking).
Flush pending GPU commands to the driver (non-blocking).
Flush pending GPU commands to the driver (non-blocking).
Flush pending GPU commands to the driver (non-blocking).
Block until all pending GPU work completes (potentially long wait).
Block until all pending GPU work completes or timeout expires. @return true if successful.
Block until all pending GPU work completes (potentially long wait).
Block until all pending GPU work completes or timeout expires. @return true if successful.
Block until all pending GPU work completes (potentially long wait).
Block until all pending GPU work completes or timeout expires. @return true if successful.
Block until all pending GPU work completes (potentially long wait).
Block until all pending GPU work completes or timeout expires. @return true if successful.
Block until all pending GPU work completes (potentially long wait).
Block until all pending GPU work completes or timeout expires. @return true if successful.
Get the currently active feature level.
Get the currently active feature level.
Get the currently active feature level.
Get the currently active feature level.
Get the currently active feature level.
Get the Camera component attached to an entity, or null if not present.
Get the Camera component attached to an entity, or null if not present.
Get the Camera component attached to an entity, or null if not present.
Get the Camera component attached to an entity, or null if not present.
Get the Camera component attached to an entity, or null if not present.
Get the EntityManager for creating and managing entities.
Get the EntityManager for creating and managing entities.
Get the EntityManager for creating and managing entities.
Get the EntityManager for creating and managing entities.
Get the EntityManager for creating and managing entities.
Get a feature flag value. @return true if enabled.
Get a feature flag value. @return true if enabled.
Get a feature flag value. @return true if enabled.
Get a feature flag value. @return true if enabled.
Get a feature flag value. @return true if enabled.
Get the LightManager for managing light components.
Get the LightManager for managing light components.
Get the LightManager for managing light components.
Get the LightManager for managing light components.
Get the LightManager for managing light components.
Get the maximum number of stereoscopic eyes configured for this Engine.
Get the maximum number of stereoscopic eyes configured for this Engine.
Get the maximum number of stereoscopic eyes configured for this Engine.
Get the maximum number of stereoscopic eyes configured for this Engine.
Get the maximum number of stereoscopic eyes configured for this Engine.
Get the RenderableManager for managing renderable components.
Get the RenderableManager for managing renderable components.
Get the RenderableManager for managing renderable components.
Get the RenderableManager for managing renderable components.
Get the RenderableManager for managing renderable components.
Get the TransformManager for managing entity transforms.
Get the TransformManager for managing entity transforms.
Get the TransformManager for managing entity transforms.
Get the TransformManager for managing entity transforms.
Get the TransformManager for managing entity transforms.
Check if a feature flag exists.
Check if a feature flag exists.
Check if a feature flag exists.
Check if a feature flag exists.
Check if a feature flag exists.
Check if automatic GPU instancing is enabled.
Check if automatic GPU instancing is enabled.
Check if automatic GPU instancing is enabled.
Check if automatic GPU instancing is enabled.
Check if automatic GPU instancing is enabled.
Validate ColorGrading. @return true if valid.
Validate ColorGrading. @return true if valid.
Validate ColorGrading. @return true if valid.
Validate ColorGrading. @return true if valid.
Validate ColorGrading. @return true if valid.
Validate a MaterialInstance (more expensive check). @return true if valid.
Validate a MaterialInstance (more expensive check). @return true if valid.
Validate a MaterialInstance (more expensive check). @return true if valid.
Validate a MaterialInstance (more expensive check). @return true if valid.
Validate a MaterialInstance (more expensive check). @return true if valid.
Validate a Fence. @return true if valid.
Validate a Fence. @return true if valid.
Validate a Fence. @return true if valid.
Validate a Fence. @return true if valid.
Validate a Fence. @return true if valid.
Validate an IndexBuffer. @return true if valid.
Validate an IndexBuffer. @return true if valid.
Validate an IndexBuffer. @return true if valid.
Validate an IndexBuffer. @return true if valid.
Validate an IndexBuffer. @return true if valid.
Validate an IndirectLight. @return true if valid.
Validate an IndirectLight. @return true if valid.
Validate an IndirectLight. @return true if valid.
Validate an IndirectLight. @return true if valid.
Validate an IndirectLight. @return true if valid.
Validate a Material. @return true if valid.
Validate a Material. @return true if valid.
Validate a Material. @return true if valid.
Validate a Material. @return true if valid.
Validate a Material. @return true if valid.
Validate a MaterialInstance for a given Material. @return true if valid.
Validate a MaterialInstance for a given Material. @return true if valid.
Validate a MaterialInstance for a given Material. @return true if valid.
Validate a MaterialInstance for a given Material. @return true if valid.
Validate a MaterialInstance for a given Material. @return true if valid.
Validate a MorphTargetBuffer. @return true if valid.
Validate a MorphTargetBuffer. @return true if valid.
Validate a MorphTargetBuffer. @return true if valid.
Validate a MorphTargetBuffer. @return true if valid.
Validate a MorphTargetBuffer. @return true if valid.
Validate a Renderer object created by this Engine.
Validate a Renderer object created by this Engine.
Validate a Renderer object created by this Engine.
Validate a Renderer object created by this Engine.
Validate a Renderer object created by this Engine.
Validate a RenderTarget. @return true if valid.
Validate a RenderTarget. @return true if valid.
Validate a RenderTarget. @return true if valid.
Validate a RenderTarget. @return true if valid.
Validate a RenderTarget. @return true if valid.
Validate a Scene. @return true if valid.
Validate a Scene. @return true if valid.
Validate a Scene. @return true if valid.
Validate a Scene. @return true if valid.
Validate a Scene. @return true if valid.
Validate a SkinningBuffer. @return true if valid.
Validate a SkinningBuffer. @return true if valid.
Validate a SkinningBuffer. @return true if valid.
Validate a SkinningBuffer. @return true if valid.
Validate a SkinningBuffer. @return true if valid.
Validate a Skybox. @return true if valid.
Validate a Skybox. @return true if valid.
Validate a Skybox. @return true if valid.
Validate a Skybox. @return true if valid.
Validate a Skybox. @return true if valid.
Validate a Stream. @return true if valid.
Validate a Stream. @return true if valid.
Validate a Stream. @return true if valid.
Validate a Stream. @return true if valid.
Validate a Stream. @return true if valid.
Validate a SwapChain. @return true if valid.
Validate a SwapChain. @return true if valid.
Validate a SwapChain. @return true if valid.
Validate a SwapChain. @return true if valid.
Validate a SwapChain. @return true if valid.
Validate a Texture. @return true if valid.
Validate a Texture. @return true if valid.
Validate a Texture. @return true if valid.
Validate a Texture. @return true if valid.
Validate a Texture. @return true if valid.
Validate a VertexBuffer. @return true if valid.
Validate a VertexBuffer. @return true if valid.
Validate a VertexBuffer. @return true if valid.
Validate a VertexBuffer. @return true if valid.
Validate a VertexBuffer. @return true if valid.
Validate a View. @return true if valid.
Validate a View. @return true if valid.
Validate a View. @return true if valid.
Validate a View. @return true if valid.
Validate a View. @return true if valid.
Set the active feature level.
Set the active feature level.
Set the active feature level.
Set the active feature level.
Set the active feature level.
Enable or disable automatic GPU instancing of identical drawables.
Enable or disable automatic GPU instancing of identical drawables.
Enable or disable automatic GPU instancing of identical drawables.
Enable or disable automatic GPU instancing of identical drawables.
Enable or disable automatic GPU instancing of identical drawables.
Set a feature flag value. @return true if successful.
Set a feature flag value. @return true if successful.
Set a feature flag value. @return true if successful.
Set a feature flag value. @return true if successful.
Set a feature flag value. @return true if successful.
Deprecated no-op method.
Deprecated no-op method.
Deprecated no-op method.
Deprecated no-op method.
Deprecated no-op method.