ShallowTexture

A texture which is not bound to an OpenGL context Used for texture atlassing

Constructors

this
this(string file, int channels)

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

this
this(ubyte[] buffer, int channels)

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

this
this(ubyte[] buffer, int w, int h, int channels)

Loads uncompressed texture from memory

this
this(ubyte[] buffer, int w, int h, int channels, int convChannels)

Loads uncompressed texture from memory

Members

Functions

save
void save(string file)

Saves image

Variables

channels
int channels;

Amount of color channels

convChannels
int convChannels;

Amount of channels to conver to when passed to OpenGL

data
ubyte[] data;

8-bit RGBA color data

height
int height;

Height of texture

width
int width;

Width of texture

Meta