Files Class List
GLTextureRect Class Reference

Detailed Description

OpenGL Rectangle Texture.

+ Inheritance diagram for GLTextureRect:

Public Member Functions

void SetImage (GLenum textureFormat, GLenum dataFormat, GLenum dataType, const void *data, GLsizei width, GLsizei height, int level=0)
 
void SetImage (GLenum textureFormat, GLenum dataFormat, const T *data, GLsizei width, GLsizei height, int level=0)
 
void SetImage (GL::Type textureType, const T *data, int numChannels, GLsizei width, GLsizei height, int level=0)
 
void SetImage (const T *data, int numChannels, GLsizei width, GLsizei height, int level=0)
 
void SetImageRGBA (GL::Type textureType, const T *data, GLsizei width, GLsizei height, int level=0)
 
void SetImageRGBA (const T *data, GLsizei width, GLsizei height, int level=0)
 
void SetImageRGB (GL::Type textureType, const T *data, GLsizei width, GLsizei height, int level=0)
 
void SetImageRGB (const T *data, GLsizei width, GLsizei height, int level=0)
 
void SetImageRG (GL::Type textureType, const T *data, GLsizei width, GLsizei height, int level=0)
 
void SetImageRG (const T *data, GLsizei width, GLsizei height, int level=0)
 
void SetImageR (GL::Type textureType, const T *data, GLsizei width, GLsizei height, int level=0)
 
void SetImageR (const T *data, GLsizei width, GLsizei height, int level=0)
 
void SetWrappingMode (GLenum wrapS, GLenum wrapT)
 
General Methods
void Delete ()
 
GLuint GetID () const
 
bool IsNull () const
 
void Bind () const
 
void Bind (int textureUnit) const
 
GLenum Type () const
 
Texture Creation and Initialization
void Initialize ()
 
void BuildMipmaps ()
 
void SetFilteringMode (GLenum magnificationFilter, GLenum minificationFilter)
 
void SetAnisotropy (float anisotropy)
 
void SetMaxAnisotropy ()
 
void SetNoAnisotropy ()
 

Member Function Documentation

§ SetImage() [1/4]

void SetImage ( GLenum  textureFormat,
GLenum  dataFormat,
GLenum  dataType,
const void *  data,
GLsizei  width,
GLsizei  height,
int  level = 0 
)
inherited

Sets the texture image using the given texture format, data format, and data type.

§ SetImage() [2/4]

void SetImage ( GLenum  textureFormat,
GLenum  dataFormat,
const T *  data,
GLsizei  width,
GLsizei  height,
int  level = 0 
)
inherited

Sets the texture image using the given texture format and data format. The data type is determined by the data pointer type.

§ SetImage() [3/4]

void SetImage ( GL::Type  textureType,
const T *  data,
int  numChannels,
GLsizei  width,
GLsizei  height,
int  level = 0 
)
inherited

Sets the texture image using the given texture type. The data format and type are determined by the data pointer type and the number of channels. The texture format is determined by the texture type and the number of channels.

§ SetImage() [4/4]

void SetImage ( const T *  data,
int  numChannels,
GLsizei  width,
GLsizei  height,
int  level = 0 
)
inherited

Sets the texture image. The texture format uses the matching data pointer type. If GLubyte (unsigned char) is used, the texture uses 8-bit normalized values. If GLushort (unsigned short) is used, the texture uses 16-bit normalized values. If GLfloat (float) is used, the texture uses non-normalized 32-bit float values. If GLbyte, GLshort, GLint, or GLuint is used, the texture uses non-normalized 8-bit, 16-bit, or 32-bit integer values.

§ SetImageRGBA() [1/2]

void SetImageRGBA ( GL::Type  textureType,
const T *  data,
GLsizei  width,
GLsizei  height,
int  level = 0 
)
inherited

Sets the texture image with 4 channels.

§ SetImageRGBA() [2/2]

void SetImageRGBA ( const T *  data,
GLsizei  width,
GLsizei  height,
int  level = 0 
)
inherited

Sets the texture image with 4 channels.

§ SetImageRGB() [1/2]

void SetImageRGB ( GL::Type  textureType,
const T *  data,
GLsizei  width,
GLsizei  height,
int  level = 0 
)
inherited

Sets the texture image with 3 channels.

§ SetImageRGB() [2/2]

void SetImageRGB ( const T *  data,
GLsizei  width,
GLsizei  height,
int  level = 0 
)
inherited

Sets the texture image with 3 channels.

§ SetImageRG() [1/2]

void SetImageRG ( GL::Type  textureType,
const T *  data,
GLsizei  width,
GLsizei  height,
int  level = 0 
)
inherited

Sets the texture image with 2 channels.

§ SetImageRG() [2/2]

void SetImageRG ( const T *  data,
GLsizei  width,
GLsizei  height,
int  level = 0 
)
inherited

Sets the texture image with 2 channels.

§ SetImageR() [1/2]

void SetImageR ( GL::Type  textureType,
const T *  data,
GLsizei  width,
GLsizei  height,
int  level = 0 
)
inherited

Sets the texture image with 1 channel.

§ SetImageR() [2/2]

void SetImageR ( const T *  data,
GLsizei  width,
GLsizei  height,
int  level = 0 
)
inherited

Sets the texture image with 1 channel.

§ SetWrappingMode()

void SetWrappingMode ( GLenum  wrapS,
GLenum  wrapT 
)
inherited

Sets the texture wrapping parameter. The acceptable values are GL_REPEAT, GL_MIRRORED_REPEAT, GL_CLAMP, and GL_CLAMP_TO_BORDER. If the wrap argument is zero, the corresponding wrapping parameter is not changed.

§ Delete()

void Delete ( )
inherited

Deletes the texture.

§ GetID()

GLuint GetID ( ) const
inherited

Returns the texture ID.

§ IsNull()

bool IsNull ( ) const
inherited

Returns true if the OpenGL texture object is not generated, i.e. the texture id is invalid.

§ Bind() [1/2]

void Bind ( ) const
inherited

Binds the texture to the current texture unit.

§ Bind() [2/2]

void Bind ( int  textureUnit) const
inherited

Binds the texture to the given texture unit.

§ Type()

GLenum Type ( ) const
inherited

Deletes the texture.

§ Initialize()

void Initialize ( )
inherited

Generates the texture, only if the texture has not been previously generated. Initializes the texture sampling parameters.

§ BuildMipmaps()

void BuildMipmaps ( )
inherited

Builds mipmap levels for the texture. The texture image must be set first.

§ SetFilteringMode()

void SetFilteringMode ( GLenum  magnificationFilter,
GLenum  minificationFilter 
)
inherited

Sets the texture filtering mode. The acceptable values are GL_NEAREST and GL_LINEAR. The minification filter values can also be GL_NEAREST_MIPMAP_NEAREST, GL_LINEAR_MIPMAP_NEAREST, GL_NEAREST_MIPMAP_LINEAR, or GL_LINEAR_MIPMAP_LINEAR. If the filter argument is zero, the corresponding filter parameter is not changed.

§ SetAnisotropy()

void SetAnisotropy ( float  anisotropy)
inherited

Sets the anisotropy level of the texture. The anisotropy value of 1 disables anisotropic filtering. Larger values provide provide better anisotropic filtering.

§ SetMaxAnisotropy()

void SetMaxAnisotropy ( )
inherited

Sets anisotropic filtering to the maximum permissible value.

§ SetNoAnisotropy()

void SetNoAnisotropy ( )
inherited

Turns off anisotropic filtering.