Static variables

@:value(true)staticASYNC_LOADING:Bool = true

Set to false to load synchronously the textures having the AsyncLoading flag.

@:value(Linear)staticDEFAULT_FILTER:Filter = Linear

Specify if we will automatically convert non-power-of-two textures to power-of-two.

@:value(0)staticMIPMAP_MAX_SIZE:Int = 0

Reduce textures quality with mipmaps by only loading up to the desired size.

Static methods

staticdynamicgetMipMapMaxSize(img:Image):Int

staticdynamicsetupTextureFlags(tex:Texture):Void

Constructor

new(entry:FileEntry)

Variables

@:value(false)disableStreaming:Bool = false

Disable the mip levels streaming : the texture is loaded at full resolution. If set after the texture is loaded, it is reloaded at full resolution on the next streaming update.

read onlystream:TextureStream

Handles the asynchronous loading and mip levels streaming of the texture (see TextureStream)

Methods

getPixels(?fmt:PixelFormat, ?index:Int):Pixels

@:value({ maxSize : 0 })loadSync(maxSize:Int = 0):Texture

Load synchronously the texture (up to the given size for a streamed texture, 0 for full resolution) and returns it. Use this when the texture data is required immediately (bakes, caches, etc.)

toTile():Tile

Returns a tile of the whole texture : the texture is loaded at full resolution and is not streamed.

Inherited Variables

Defined by Resource

read onlyentry:FileEntry

read onlyname:String

Inherited Methods

Defined by Resource

to<T>(c:Class<T>):T

watch(onChanged:Null<() ‑> Void>):Void