SwapChain

actual class SwapChain

A SwapChain represents an Operating System's native renderable surface.

Typically, it's a native window or a view. A SwapChain is initialized from a native object, which must be of the proper type for each platform Filament is running on:

PlatformNative Type
AndroidANativeWindow*
macOS - OpenGLNSView*
macOS - MetalCAMetalLayer*
iOS - OpenGLCAEAGLLayer*
iOS - MetalCAMetalLayer*
X11Window
WindowsHWND

See also

expect class SwapChain

A SwapChain represents an Operating System's native renderable surface.

Typically, it's a native window or a view. A SwapChain is initialized from a native object, which must be of the proper type for each platform Filament is running on:

PlatformNative Type
AndroidANativeWindow*
macOS - OpenGLNSView*
macOS - MetalCAMetalLayer*
iOS - OpenGLCAEAGLLayer*
iOS - MetalCAMetalLayer*
X11Window
WindowsHWND

See also

actual class SwapChain

A SwapChain represents an Operating System's native renderable surface.

Typically, it's a native window or a view. A SwapChain is initialized from a native object, which must be of the proper type for each platform Filament is running on:

PlatformNative Type
AndroidANativeWindow*
macOS - OpenGLNSView*
macOS - MetalCAMetalLayer*
iOS - OpenGLCAEAGLLayer*
iOS - MetalCAMetalLayer*
X11Window
WindowsHWND

See also

actual class SwapChain

A SwapChain represents an Operating System's native renderable surface.

Typically, it's a native window or a view. A SwapChain is initialized from a native object, which must be of the proper type for each platform Filament is running on:

PlatformNative Type
AndroidANativeWindow*
macOS - OpenGLNSView*
macOS - MetalCAMetalLayer*
iOS - OpenGLCAEAGLLayer*
iOS - MetalCAMetalLayer*
X11Window
WindowsHWND

See also

actual class SwapChain(jsSwapChain: SwapChain)

A SwapChain represents an Operating System's native renderable surface.

Typically, it's a native window or a view. A SwapChain is initialized from a native object, which must be of the proper type for each platform Filament is running on:

PlatformNative Type
AndroidANativeWindow*
macOS - OpenGLNSView*
macOS - MetalCAMetalLayer*
iOS - OpenGLCAEAGLLayer*
iOS - MetalCAMetalLayer*
X11Window
WindowsHWND

See also

Constructors

Link copied to clipboard
constructor(jsSwapChain: SwapChain)

Types

Link copied to clipboard

Strategy for applying a frame rate change that is not seamless.

Strategy for applying a frame rate change that is not seamless.

Strategy for applying a frame rate change that is not seamless.

Strategy for applying a frame rate change that is not seamless.

Strategy for applying a frame rate change that is not seamless.

Link copied to clipboard
actual object Companion
expect object Companion
actual object Companion
actual object Companion
actual object Companion
Link copied to clipboard

Frame rate compatibility strategy for setFrameRate.

Frame rate compatibility strategy for setFrameRate.

Frame rate compatibility strategy for setFrameRate.

Frame rate compatibility strategy for setFrameRate.

Frame rate compatibility strategy for setFrameRate.

Properties

Link copied to clipboard

Checks if a frame scheduled callback is currently set on this SwapChain.

Checks if a frame scheduled callback is currently set on this SwapChain.

Checks if a frame scheduled callback is currently set on this SwapChain.

Checks if a frame scheduled callback is currently set on this SwapChain.

Checks if a frame scheduled callback is currently set on this SwapChain.

Link copied to clipboard
actual val nativeObject: Long

Gets the native SwapChain object handle.

expect val nativeObject: Long

Gets the native SwapChain object handle.

actual val nativeObject: Long

Gets the native SwapChain object handle.

actual val nativeObject: Long

Gets the native SwapChain object handle.

actual val nativeObject: Long

Gets the native SwapChain object handle.

Link copied to clipboard
val nativeSwapChain: SwapChain
Link copied to clipboard
actual val nativeWindow: Any?

Gets the native window/surface associated with this SwapChain.

expect val nativeWindow: Any?

Gets the native window/surface associated with this SwapChain.

actual val nativeWindow: Any?

Gets the native window/surface associated with this SwapChain.

actual val nativeWindow: Any?

Gets the native window/surface associated with this SwapChain.

actual val nativeWindow: Any?

Gets the native window/surface associated with this SwapChain.

Functions

Link copied to clipboard

Returns whether this SwapChain supports the setFrameRate API.

Returns whether this SwapChain supports the setFrameRate API.

Returns whether this SwapChain supports the setFrameRate API.

Returns whether this SwapChain supports the setFrameRate API.

Returns whether this SwapChain supports the setFrameRate API.

Link copied to clipboard
actual fun setFrameCompletedCallback(callback: () -> Unit)

Sets a callback to be invoked when a frame's rendering has completed on the GPU.

expect fun setFrameCompletedCallback(callback: () -> Unit)

Sets a callback to be invoked when a frame's rendering has completed on the GPU.

actual fun setFrameCompletedCallback(callback: () -> Unit)

Sets a callback to be invoked when a frame's rendering has completed on the GPU.

actual fun setFrameCompletedCallback(callback: () -> Unit)

Sets a callback to be invoked when a frame's rendering has completed on the GPU.

actual fun setFrameCompletedCallback(callback: () -> Unit)

Sets a callback to be invoked when a frame's rendering has completed on the GPU.

Link copied to clipboard
actual fun setFrameRate(frameRate: Float)

Sets the intended frame rate for this SwapChain.

expect fun setFrameRate(frameRate: Float)

Sets the intended frame rate for this SwapChain.

actual fun setFrameRate(frameRate: Float)

Sets the intended frame rate for this SwapChain.

actual fun setFrameRate(frameRate: Float)

Sets the intended frame rate for this SwapChain.

actual fun setFrameRate(frameRate: Float)

Sets the intended frame rate for this SwapChain.

Link copied to clipboard
actual fun setFrameScheduledCallback(callback: () -> Unit)

Sets a callback to be invoked when a frame is scheduled for presentation.

expect fun setFrameScheduledCallback(callback: () -> Unit)

Sets a callback to be invoked when a frame is scheduled for presentation.

actual fun setFrameScheduledCallback(callback: () -> Unit)

Sets a callback to be invoked when a frame is scheduled for presentation.

actual fun setFrameScheduledCallback(callback: () -> Unit)

Sets a callback to be invoked when a frame is scheduled for presentation.

actual fun setFrameScheduledCallback(callback: () -> Unit)

Sets a callback to be invoked when a frame is scheduled for presentation.