Texture

Represents a 2D opengl texture

Constructors

this
this(string imagePath)

Constructs a Texture from an image file got from imagePath

this
this(uint width, uint height, uint clearColor)

Constructs an empty Texture with the specified width and height, and fills it with color clearColor

Destructor

~this
~this()
Undocumented in source.

Members

Functions

bind
void bind()

Binds the texture to the opengl context

clear
void clear(uint clearColor)

Fills the texture with color clearColor

height
uint height()

Returns the height of the texture

name
GLuint name()

Returns the opengl index of the texture ( aka: it's name )

setParameter
void setParameter(GLenum parameterName, GLType!typename value)

Sets an internal opengl parameter for the texture

updateRegion
void updateRegion(uint offsetx, uint offsety, uint width, uint height, uint[] data)

Sets the pixels of a specified rectangular region

width
uint width()

Returns the width of the texture

Static functions

del
void del(GLuint texture)

Deletes an opengl texture using it's name

gen
GLuint gen()

Generates a new opengl texture and returns it's name

Meta