Scoop API

scoop:scoop.graphics:0.1.0

GpuBuffer

class GpuBuffer

source · line 6
public
public class GpuBuffer internal constructor(
    private val target: RenderTarget,
    public val format: NativeGpuFormat,
    public val layout: GpuPixelLayout,
    public val colorSpace: GpuColorSpace
) : Closeable

A renderable native texture on the device's context; snapshots remain on the GPU.

function readPixels

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

Explicit synchronization and straight RGBA8 export.

function withNativeWrite

source · line 26
public
@Unsafe
    public fun <T> withNativeWrite(block: (NativeGpuDevice, NativeGpuTexture) -> T): T

Preserves previous snapshots before borrowing the current texture. Submit native work on the supplied queue and restore the supplied D3D12 state before returning or throwing. Do not reenter the context, suspend, cross threads, or save these handles for later use.