Table of Contents

Texture.new

Available since version: Gideros 2011.6

Description:

Creates a new Texture object.

Syntax:

Texture.new(filename, filtering [, options])

Parameters:

  • 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 paramaters. Currently, "transparentColor", "wrap" and "format" fields are supported.

Examples:

local texture = Texture.new("image.png", false, {transparentColor = 0xff00ff})	-- do not filter and make the color 0xff00ff transparent
local texture = Texture.new("image.png", true, {wrap = Texture.REPEAT})	-- enable filtering and repeat the texture