Scoop API

scoop:scoop.graphics:0.1.0

RenderTarget

class RenderTarget

source · line 6
public
public class RenderTarget internal constructor(
    internal val resource: GraphicsResource,
    public val pixelWidth: Int,
    public val pixelHeight: Int,
    public val scale: Double
) : Closeable

A renderer-owned target. Canvas borrows end on every normal and exceptional callback exit.

property pixelHeight

source · line 9
public
public val pixelHeight: Int

get: public read-only

function submit

source · line 30
public
public fun submit(): Unit

Submits recorded GPU work without waiting for completion.

function readPixels

source · line 41
public
public fun readPixels(): Array<Byte>

Explicit readback is a synchronization point and returns straight RGBA8.

function abort

source · line 37
public
public fun abort(): Unit

Ends use of this target; already recorded GPU work is safely submitted without presentation.

function snapshot

source · line 57
public
public fun snapshot(): Image

Returns an independent CPU-readable image; GPU targets perform explicit readback.