MinecraftCanvasTextureLease

Borrows one ordinary OpenGL 2D RGBA8 straight-alpha color texture until capture completion.

Implementations must keep the texture and its contents stable until close, which occurs on the render thread after a capture fence. The texture is externally owned; Strata never deletes or changes its pixels or sampling parameters. Multisample, depth, layered, HDR, and integer images are unsupported and rejected before sampling.

Properties

Link copied to clipboard

The logical image edge represented by native texel row zero, fixed throughout this lease.

Link copied to clipboard
abstract val size: IntSize

The immutable positive extent of source mip level zero, read on the render thread.

Link copied to clipboard
abstract val snapshot: DrawImage?

Optional immutable pixels from exactly this lease, with size and source rows ordered according to origin.

Link copied to clipboard
abstract val textureId: Int

The externally owned OpenGL 2D texture name in the current render context, borrowed on the render thread.

Functions

Link copied to clipboard
abstract override fun close()

Releases the source reservation on the render thread after GPU capture completes, independently of later GUI target use.