Available since: Gideros 2021.8.1
Class: Texture


Asynchronously loads a texture from a file.



callback: (function) the function will be called with the Texture object as argument or an error as second argument.
filename: (string) the name of the texture file to be loaded.
filtering: (boolean, default = false) whether or not the texture is filtered.
options: (table, optional) a table that specifies optional parameters. The following options are supported:

  • transparentColor: specifies which color stands for transparent, for formats that don't supply an alpha channel such as JPEG
  • wrap: how to treat texels outside the texture. Possible values are Texture.CLAMP and Texture.REPEAT.
  • format: the GPU pixel format for the texture
  • extend: wether the texture should be extended to a power of two size. Defaults to true.
  • scale: the scale at which this texture was made, if it cannot be determined by a suffix. Defaults to 1.


Texture.loadAsync(function (texture, error)
end,"image.png", true, {wrap = Texture.REPEAT})