hxn

CommandBuffer

Commands recorded through its encoders, then committed to the GPU.

Static methods

function hxnAdopt(hxnRaw:Handle):CommandBuffer

An object for a value the library returned.

Properties

var hxnRaw:Handle

Methods

function computeEncoder():ComputeEncoder
function renderEncoder(target:Texture, load:LoadAction, red:Float, green:Float, blue:Float, alpha:Float):RenderEncoder

A render pass to target, its one color attachment, which load starts from: the target as it is, cleared to red, green, blue, alpha, or undefined.

function synchronize(texture:Texture):Void

Makes a managed texture's GPU writes visible to Texture.read once this buffer completes.

function completed():Future<Unit>

Settles when the GPU has finished the buffer, or fails with Metal's error. Ask for it before commit; Metal takes no completion handler after.

function present(drawable:Drawable):Void

Presents drawable when the buffer's commands complete.

function commit():Void
function waitUntilCompleted():Void

Waits for the GPU to finish the buffer, and fails with Metal's error if it did not.

function close():Void

Releases the native value now. The collector does it otherwise. Using this object afterwards throws.