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

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(nativeSwapChain: SwapChain)
constructor(nativeHandle: MemorySegment?)
constructor(nativeHandle: CPointer<FilaSwapChain>?)
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
@PlatformGap(platforms = [FilamentPlatform.WEB], behavior = "returns false — display frame rate switching is not supported on web; pacing is browser-managed.")
actual val isFrameRateChangeSupported: Boolean

Returns whether this SwapChain supports the setFrameRate API.

@PlatformGap(platforms = [FilamentPlatform.WEB], behavior = "returns false — display frame rate switching is not supported on web; pacing is browser-managed.")
expect val isFrameRateChangeSupported: Boolean

Returns whether this SwapChain supports the setFrameRate API.

@PlatformGap(platforms = [FilamentPlatform.WEB], behavior = "returns false — display frame rate switching is not supported on web; pacing is browser-managed.")
actual val isFrameRateChangeSupported: Boolean

Returns whether this SwapChain supports the setFrameRate API.

@PlatformGap(platforms = [FilamentPlatform.WEB], behavior = "returns false — display frame rate switching is not supported on web; pacing is browser-managed.")
actual val isFrameRateChangeSupported: Boolean

Returns whether this SwapChain supports the setFrameRate API.

@PlatformGap(platforms = [FilamentPlatform.WEB], behavior = "returns false — display frame rate switching is not supported on web; pacing is browser-managed.")
actual val isFrameRateChangeSupported: Boolean

Returns whether this SwapChain supports the setFrameRate API.

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 SwapChain.nativeObject: SwapChain
val SwapChain.nativeObject: MemorySegment?
val SwapChain.nativeObject: CPointer<FilaSwapChain>?
val SwapChain.nativeObject: 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
@PlatformGap(platforms = [FilamentPlatform.WEB], behavior = "silent no-op — `filament.js` does not bind setFrameCompletedCallback, and OpenGLDriver implements it as an empty function, so it could not fire on WebGL either.")
actual fun setFrameCompletedCallback(callback: () -> Unit?)

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

@PlatformGap(platforms = [FilamentPlatform.WEB], behavior = "silent no-op — `filament.js` does not bind setFrameCompletedCallback, and OpenGLDriver implements it as an empty function, so it could not fire on WebGL either.")
expect fun setFrameCompletedCallback(callback: () -> Unit? = null)

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

@PlatformGap(platforms = [FilamentPlatform.WEB], behavior = "silent no-op — `filament.js` does not bind setFrameCompletedCallback, and OpenGLDriver implements it as an empty function, so it could not fire on WebGL either.")
actual fun setFrameCompletedCallback(callback: () -> Unit?)

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

@PlatformGap(platforms = [FilamentPlatform.WEB], behavior = "silent no-op — `filament.js` does not bind setFrameCompletedCallback, and OpenGLDriver implements it as an empty function, so it could not fire on WebGL either.")
actual fun setFrameCompletedCallback(callback: () -> Unit?)

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

@PlatformGap(platforms = [FilamentPlatform.WEB], behavior = "silent no-op — `filament.js` does not bind setFrameCompletedCallback, and OpenGLDriver implements it as an empty function, so it could not fire on WebGL either.")
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.

@PlatformGap(platforms = [FilamentPlatform.WEB], behavior = "state is only tracked locally — filament.js binds no frame-scheduled callback, so it never fires; isFrameScheduledCallbackSet reports what was set here.")
expect fun setFrameScheduledCallback(callback: () -> Unit? = null)

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.

@PlatformGap(platforms = [FilamentPlatform.WEB], behavior = "state is only tracked locally — filament.js binds no frame-scheduled callback, so it never fires; isFrameScheduledCallbackSet reports what was set here.")
actual fun setFrameScheduledCallback(callback: () -> Unit?)

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