#include <texture.h>
Public Types | |
enum | GltTextureType { TEXTURE_TYPE_RGB = 0, TEXTURE_TYPE_RGBA, TEXTURE_TYPE_GREY, TEXTURE_TYPE_GREYA, TEXTURE_TYPE_ALPHA, TEXTURE_TYPE_BITMAP, TEXTURE_TYPE_INDEXED_RGB, TEXTURE_TYPE_INDEXED_RGBA } |
GLT texture types. More... | |
Public Methods | |
GltTexture (const GLenum target=GL_TEXTURE_2D) | |
Constructor. | |
~GltTexture () | |
Destructor. | |
void | clear () |
Reset texture and release OpenGL resources. | |
bool | init (const void *, const bool mipmap=true) |
Initialise from compressed GLT format. | |
bool | init (const GLsizei width, const GLsizei height, const std::string &image, const bool mipmap=true) |
Initialise from raw string buffer. | |
bool | init (const GLsizei width, const GLsizei height, const byte *image, const GLsizei channels, const bool mipmap=true) |
Initialise from raw memory buffer. | |
void | set () const |
Set the current OpenGL texture. | |
void | setWrap (const GLenum s, const GLenum t) |
Set wrapping of OpenGL texture coordinates. | |
void | setFilter (const GLenum min, const GLenum mag) |
Set filtering of OpenGL texture. | |
void | setGamma (const real gamma) |
Gamma adjustment of OpenGL texture. | |
void | setHSVAdjust (const real hue, const real saturation, const real value) |
Hue-saturation-value adjustment of OpenGL texture. | |
const GLsizei & | width () const |
Texture width. | |
const GLsizei & | height () const |
Texture height. | |
const GLuint | id () const |
OpenGL texture identifier. | |
Static Public Methods | |
bool | makeHeader (std::string &header, const int type, const int width, const int height, const int alignment, const int compressed) |
Encode GLT Texture header. | |
void * | getHeader (const void *const h, int &type, int &width, int &height, int &alignment, int &compressed) |
Extract GLT Texture header. |
Definition at line 55 of file texture.h.
|
Set wrapping of OpenGL texture coordinates.
Definition at line 81 of file texture.cpp. Referenced by GltSkyBox::GltSkyBox(). |
|
Set filtering of OpenGL texture.
Definition at line 97 of file texture.cpp. |