Constructor

new()

Methods

load(path:String, ?options:Null<LoadTextureOptions>, _done:Texture ‑> Void):Void

loadFromBytes(bytes:Bytes, type:ImageType, ?options:Null<LoadTextureOptions>, _done:Texture ‑> Void):Void

createTexture(width:Int, height:Int, pixels:UInt8Array):Texture

inlinecreateRenderTarget(width:Int, height:Int, depth:Bool, stencil:Bool, antialiasing:Int):Texture

inlinegetTextureWidth(texture:Texture):Int

inlinegetTextureIndex(texture:Texture):Int

maxTextureWidth():Int

Available on clay

maxTextureHeight():Int

Available on clay

maxTexturesByBatch():Int

If this returns a value above 1, that means this backend supports multi-texture batching.

@:value({ reversePremultiplyAlpha : true })textureToPng(texture:Texture, reversePremultiplyAlpha:Bool = true, ?path:String, done:(data:Bytes) ‑> Void):Void

pixelsToPng(width:Int, height:Int, pixels:UInt8Array, ?path:String, done:(data:Bytes) ‑> Void):Void

destroy(texture:Texture):Void

Available on headless