docs/android/dokka/filament-android/com.google.android.filament/-engine/create.md
//filament-android/com.google.android.filament/Engine/create
[main]
open fun create(): Engine
Creates an instance of Engine using the default Backend
This method is one of the few thread-safe methods.
A newly created Engine, or null if the GPU driver couldn't be initialized, for instance if it doesn't support the right version of OpenGL or OpenGL ES.
| IllegalStateException | can be thrown if there isn't enough memory to allocate the command buffer. |
[main]
open fun create(backend: Engine.Backend): Engine
Creates an instance of Engine using the specified Backend
This method is one of the few thread-safe methods.
A newly created Engine, or null if the GPU driver couldn't be initialized, for instance if it doesn't support the right version of OpenGL or OpenGL ES.
main
| backend | driver backend to use |
| IllegalStateException | can be thrown if there isn't enough memory to allocate the command buffer. |
[main]
open fun create(sharedContext: Any): Engine
Creates an instance of Engine using the OPENGL and a shared OpenGL context.
This method is one of the few thread-safe methods.
A newly created Engine, or null if the GPU driver couldn't be initialized, for instance if it doesn't support the right version of OpenGL or OpenGL ES.
main
| sharedContext | A platform-dependant OpenGL context used as a shared context when creating filament's internal context. On Android this parameter must be an instance of android.opengl.EGLContext. |
| IllegalStateException | can be thrown if there isn't enough memory to allocate the command buffer. |