Table of Contents

Texture.new

Available since version: Gideros 2016.08

Description:

Create a texture from pixel data.

Syntax:

Texture.new(pixels, width, height [, filtering, options])

Parameters:

  • pixels: (string) A string containing actual R,G,B,A compoents of each pixel in the new texture. Each component is stored as a byte.
  • width: (number) width of the texture to create
  • height: (number) Height of the texture to create
  • filtering: (boolean, default to false) indicate that the texture should be filtered
  • options: (table, optional) A table that specifies optional paramaters. Currently, "transparentColor", "wrap" and "format" fields are supported.