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

PanelSurface Class

Modifiers: final
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.

Signature

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)

Constructors

PanelSurface ( scene , widthInPx , heightInPx , mips , samplerConfig , useSwapchain , useTexture , fragmentShader , isProtected )
Signature
constructor(scene: Scene, widthInPx: Int, heightInPx: Int, mips: Int, samplerConfig: SamplerConfig = PanelConfigOptions.DEFAULT_PANEL_SAMPLER, useSwapchain: Boolean, useTexture: Boolean, fragmentShader: String = "", isProtected: Boolean = false)
Parameters
scene: Scene
widthInPx: Int
Width of the surface in pixels
heightInPx: Int
Height of the surface in pixels
mips: Int
samplerConfig: SamplerConfig
useSwapchain: Boolean
useTexture: Boolean
fragmentShader: String
isProtected: Boolean
Whether the surface is protected (for DRM content)

Properties

heightInPx : Int
[Get]
Height of the surface in pixels
Signature
val heightInPx: Int
isProtected : Boolean
[Get]
Whether the surface is protected (for DRM content)
Signature
val isProtected: Boolean = false
surface : Surface?
[Get][Set]
The Android Surface object for rendering
Signature
var surface: Surface?
swapchain : SceneSwapchain?
[Get][Set]
The SceneSwapchain for efficient rendering (if enabled)
Signature
var swapchain: SceneSwapchain?
texture : SceneTexture?
[Get][Set]
The SceneTexture for texture-based rendering (if enabled)
Signature
var texture: SceneTexture?
widthInPx : Int
[Get]
Width of the surface in pixels
Signature
val widthInPx: Int

Functions

destroy ()
Signature
fun destroy()
Did you find this page helpful?