Back to Filament

createSwapChain

docs/android/dokka/filament-android/com.google.android.filament/-engine/create-swap-chain.md

1.75.02.8 KB
Original Source

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

createSwapChain

[main]
open fun createSwapChain(surface: Any): SwapChain

Creates an opaque SwapChain from the given OS native window handle.

Return

a newly created SwapChain object

Parameters

main

surfaceon Android, must be an instance of android.view.Surface

Throws

IllegalStateExceptioncan be thrown if the SwapChain couldn't be created

[main]
open fun createSwapChain(surface: Any, flags: Long): SwapChain

Creates a SwapChain from the given OS native window handle.

Return

a newly created SwapChain object

Parameters

main

surfaceon Android, must be an instance of android.view.Surface
flagsconfiguration flags, see SwapChainFlags

See also

SwapChainFlags

Throws

IllegalStateExceptioncan be thrown if the SwapChain couldn't be created

[main]
open fun createSwapChain(width: Int, height: Int, flags: Long): SwapChain

Creates a headless SwapChain

Return

a newly created SwapChain object

Parameters

main

widthwidth of the rendering buffer
heightheight of the rendering buffer
flagsconfiguration flags, see SwapChainFlags

See also

SwapChainFlags

Throws

IllegalStateExceptioncan be thrown if the SwapChain couldn't be created