CTextureState Class Reference

Implementation of the ITextureState interface. More...

Inheritance diagram for CTextureState:

ITextureState

List of all members.

Public Member Functions

 CTextureState (void)
 Constructs a CTextureState object.
virtual ~CTextureState (void)
 Destructor.
int getMaxTextureUnits (void)
 Returns the number of texture mapping units available.
void setTexture (int textureUnit, const QImage &image)
 Assigns a texture image to a texture mapping unit.
void setBilinearFilter (bool enable)
 Enables/disables texture filering.
void init (void)
 Initializes the object.
void shutdown (void)
 Frees resources and cleans up state.
void bindState (void)
 Binds the textures to the OpenGL context.


Detailed Description

Implementation of the ITextureState interface.

Constructor & Destructor Documentation

CTextureState::CTextureState ( void   ) 

Constructs a CTextureState object.

The object must be initialized before use.


Member Function Documentation

int CTextureState::getMaxTextureUnits ( void   )  [inline, virtual]

Returns the number of texture mapping units available.

This invokes an OpenGL call and returns the value of GL_MAX_TEXTURE_UNITS.

Returns:
The implementation dependent value GL_MAX_TEXTURE_UNITS

Implements ITextureState.

void CTextureState::setTexture ( int  textureUnit,
const QImage &  image 
) [virtual]

Assigns a texture image to a texture mapping unit.

This call replaces the current image with a new image. It re-creates the complete OpenGL texture object. Depending on the image, this may take some time. Do not call this every frame, it will slow down the application.

Parameters:
textureUnit Zero based index of a texture unit. The maximum index is n-1 where n is the value returned by glMaxTextureUnits().
image The image to use.

Implements ITextureState.

void CTextureState::setBilinearFilter ( bool  enable  )  [inline, virtual]

Enables/disables texture filering.

This controls bilinear filtering on all textures. The initial state is false.

Parameters:
enable Filtering enable state.

Implements ITextureState.

void CTextureState::init ( void   ) 

Initializes the object.

After this call, the object can be used to manage textures.

void CTextureState::shutdown ( void   ) 

Frees resources and cleans up state.

Must be called before destruction.


The documentation for this class was generated from the following file:
Generated on Sun Mar 2 17:12:32 2008 for Shader Maker by  doxygen 1.5.4