API reference
API reference
Select your platform
No SDKs available
No versions available

SceneSwapchain

SceneSwapchain

class SceneSwapchain
Represents a swapchain for rendering Layers. Multiple SceneLayers can sample from a single SceneSwapchain
A swapchain is a collection of buffers used for rendering in graphics APIs. It manages the presentation of rendered content to the display and provides surfaces that can be used for drawing.

Constructors

NameSummary
SceneSwapchain
constructor(handle: Long)

Types

NameSummary
Companion
object Companion

Properties

NameSummary
handle
var handle: Long

Functions

NameSummary
destroy
fun destroy()
getSurface
fun getSurface(): <Error class: unknown class>?

Gets the Android Surface associated with this swapchain.
nativeHandle
fun nativeHandle(): Long
platformHandle
fun platformHandle(): Long
updateSampler
fun updateSampler(sampler: SamplerConfig)

Updates the sampler configuration for this swapchain.

Companion

object Companion

Functions

NameSummary
create
fun create(width: Int, height: Int, numberOfMips: Int): SceneSwapchain

Creates a standard swapchain for rendering.
createAsAndroid
fun createAsAndroid(width: Int, height: Int, isProtected: Boolean = false): SceneSwapchain

Creates a swapchain that is automatically updated when the associated Android Surface is updated. This is what is used in "direct-to-compositor" layer Panels and will be used when you do not require a SceneTexture. It is generally a more performant option and optionally allows for secure/DRM content to be played.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon