hxn

Texture

A 2D texture.

Static methods

function hxnAdopt(hxnRaw:Handle):Texture

An object for a value the library returned.

Properties

var hxnRaw:Handle

Methods

function width():Int
function height():Int
function format():Null<PixelFormat>

Its format, or null for one this API does not name.

function write(bytes:Bytes, bytesPerRow:Int):Void

Replaces the whole texture with bytes, rows bytes_per_row apart. The texture's storage must be shared or managed.

function read(bytesPerRow:Int):Bytes

The whole texture's bytes, rows bytes_per_row apart. A managed texture must be synchronized first (CommandBuffer.synchronize) after the GPU wrote it.

function close():Void

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