Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages   Examples  

GltTexture Class Reference
[GLT]

OpenGL Texture Class. More...

#include <texture.h>

List of all members.

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.


Detailed Description

OpenGL Texture Class.

Definition at line 55 of file texture.h.


Member Function Documentation

void GltTexture::setWrap const GLenum    s,
const GLenum    t
 

Set wrapping of OpenGL texture coordinates.

Parameters:
s  Horizontal mapping mode
t  Vertical mapping mode
Wrapping mode can be either of
GL_CLAMP Clamp coordinate to [0,1].
GL_REPEAT Ignore integer part of coordinate.

Definition at line 81 of file texture.cpp.

Referenced by GltSkyBox::GltSkyBox().

void GltTexture::setFilter const GLenum    min,
const GLenum    mag
 

Set filtering of OpenGL texture.

Parameters:
min  Texture minification function
mag  Texture magnification function
Wrapping mode is one of
GL_NEAREST Nearest texel.
GL_LINEAR Linearly interpolate.
GL_NEAREST_MIPMAP_NEARESTNearest texel in nearest mipmap.
GL_NEAREST_MIPMAP_LINEAR Linearly interpolate nearest texel from closest two mipmaps.
GL_LINEAR_MIPMAP_NEAREST Linearly interpolate from nearest mipmap.
GL_LINEAR_MIPMAP_LINEAR Linearly interpolate interpolated texel from closest two mipmaps.

Definition at line 97 of file texture.cpp.


The documentation for this class was generated from the following files:
Generated on Tue Nov 5 11:11:46 2002 for GLT by doxygen1.2.18