Texture

A texture, only format supported is unsigned 8 bit RGBA

Constructors

this
this(string file)

Loads texture from image file Supported file types: * PNG 8-bit * BMP 8-bit * TGA 8-bit non-palleted * JPEG baseline

this
this(ShallowTexture shallow)

Creates a texture from a ShallowTexture

this
this(int width, int height, GLuint mode, int alignment)

Creates a new empty texture

this
this(ubyte[] data, int width, int height, GLuint mode, int alignment)

Creates a new texture from specified data

Members

Functions

bind
void bind(uint unit)

Bind this texture

height
int height()

Height of texture

setData
void setData(ubyte[] data)

Sets the data of the texture

setDataRegion
void setDataRegion(ubyte[] data, int x, int y, int width, int height)

Sets a region of a texture to new data

setFiltering
void setFiltering(Filtering filtering)

Set the filtering mode used for the texture

setWrapping
void setWrapping(Wrapping wrapping)

Set the wrapping mode used for the texture

width
int width()

Width of texture

Meta