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

PanelSurface

PanelSurface

class PanelSurface(scene: Scene, val widthInPx: Int, val heightInPx: Int, mips: Int, samplerConfig: SamplerConfig = PanelConfigOptions.DEFAULT_PANEL_SAMPLER, useSwapchain: Boolean, useTexture: Boolean, fragmentShader: String = "", val isProtected: Boolean = false)
Manages the rendering surface for panels in 3D space.
PanelSurface creates and manages the underlying Android Surface, texture, and swapchain resources needed to render panel content. It serves as the bridge between Android’s 2D rendering system and the 3D scene.

Constructors

NameSummary
PanelSurface
constructor(scene: Scene, widthInPx: Int, heightInPx: Int, mips: Int, samplerConfig: SamplerConfig = PanelConfigOptions.DEFAULT_PANEL_SAMPLER, useSwapchain: Boolean, useTexture: Boolean, fragmentShader: String = "", isProtected: Boolean = false)

Properties

NameSummary
heightInPx
val heightInPx: Int

Height of the surface in pixels
isProtected
val isProtected: Boolean = false

Whether the surface is protected (for DRM content)
surface
var surface: <Error class: unknown class>?

The Android Surface object for rendering
swapchain
var swapchain: SceneSwapchain?

The SceneSwapchain for efficient rendering (if enabled)
texture
var texture: SceneTexture?

The SceneTexture for texture-based rendering (if enabled)
widthInPx
val widthInPx: Int

Width of the surface in pixels

Functions

NameSummary
destroy
fun destroy()
Did you find this page helpful?
Thumbs up icon
Thumbs down icon