ZSurfaceViewEventHandler

Handler for surface view lifecycle and rendering events.

Implementations are typically created when a surface view is attached and receive callbacks for readiness, per-frame rendering, and resize. The platform ZSurfaceView should call dispose before clearing its reference to the handler so that the scene graph and renderer are properly torn down.

Functions

Link copied to clipboard
abstract fun dispose()

Disposes the handler and releases resources (scene graph, renderer). Should be called by the platform SurfaceView before clearing the handler reference.

Link copied to clipboard
abstract fun onReady()

Called when the surface is ready for rendering (e.g. context created, first frame).

Link copied to clipboard
abstract fun onRender()

Called each frame to perform rendering.

Link copied to clipboard
abstract fun onResize(width: Int, height: Int)

Called when the surface size changes.