GLTexture

OpenGL Texture wrapper.

TODO:

  • Support partial updates.
  • Support glStorage through pseudo-code given in OpenGL specification.

Constructors

this
this(OpenGL gl, GLuint target)

Creates a texture. You should create a child class instead of calling this constructor directly.

Destructor

~this
~this()

Releases the OpenGL texture resource.

Members

Functions

close
deprecated void close()
Undocumented in source. Be warned that the author may not have intended to support it.
generateMipmap
void generateMipmap()

Regenerates the mipmapped levels.

getLevelParam
int getLevelParam(GLenum paramName, int level)
getParam
int getParam(GLenum paramName)
getTexImage
void getTexImage(int level, GLenum format, GLenum type, void* data)

Gets the texture data.

handle
GLuint handle()
setBaseLevel
void setBaseLevel(int level)

Sets the texture base level.

setLODBias
void setLODBias(float lodBias)

Sets the texture LOD bias.

setMagFilter
void setMagFilter(GLenum magFilter)

Sets the texture magnification filter mode.

setMaxAnisotropy
void setMaxAnisotropy(float f)

Sets the texture anisotropic filter level. If texture anisotropy isn't supported, fail silently.

setMaxLOD
void setMaxLOD(float lod)

Sets the texture maximum LOD.

setMaxLevel
void setMaxLevel(int level)

Sets the texture maximum level.

setMinFilter
void setMinFilter(GLenum minFilter)

Sets the texture minification filter mode.

setMinLOD
void setMinLOD(float lod)

Sets the texture minimum LOD.

setWrapR
void setWrapR(GLenum wrapR)

Sets the wrap mode for 3rd texture coordinate.

setWrapS
void setWrapS(GLenum wrapS)

Sets the wrap mode for 1st texture coordinate.

setWrapT
void setWrapT(GLenum wrapT)

Sets the wrap mode for 2nd texture coordinate.

target
GLuint target()
Undocumented in source. Be warned that the author may not have intended to support it.
unuse
void unuse()

Unuse this texture.

use
void use(int textureUnit)

Use this texture, binding it to a texture unit.

Variables

_target
GLuint _target;
Undocumented in source.

Meta