DirectContext

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
expect open val isClosed: Boolean

Check if underlying resource is closed.

Link copied to clipboard
expect val refCount: Int

Number of references on underlying native object.

Functions

Link copied to clipboard
fun abandon()

Abandons all GPU resources and assumes the underlying backend 3D API context is no longer usable. Call this if you have lost the associated GPU context, and thus internal texture, buffer, etc. references/IDs are now invalid. Calling this ensures that the destructors of the context and any of its created resource objects will not make backend 3D API calls. Content rendered but not previously flushed may be lost. After this function is called all subsequent calls on the context will fail or be no-ops.

Link copied to clipboard
expect open fun close()

Free underlying native resource, peer is useless afterwards.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun resetGL(vararg states: GLBackendState): DirectContext
Link copied to clipboard
Link copied to clipboard
fun submit(syncCpu: Boolean)

Submit outstanding work to the gpu from all previously un-submitted flushes.

Link copied to clipboard
expect open override fun toString(): String
Link copied to clipboard
fun <R> DirectContext.useContext(block: (ctx: DirectContext) -> R): R