ITextureState Class Reference

This is responsible for loading and storing textures. More...

#include <texture.h>

Inheritance diagram for ITextureState:

CTextureState

List of all members.

Public Member Functions

virtual ~ITextureState (void)
 Destruction.
virtual int getMaxTextureUnits (void)=0
 Returns the number of texture mapping units available.
virtual void setBilinearFilter (bool enable)=0
 Enables/disables texture filering.
virtual void setTexture (int textureUnit, const QImage &image)=0
 Assigns a texture image to a texture mapping unit.


Detailed Description

This is responsible for loading and storing textures.

It represents an array of the texture mapping units of OpenGL. Every texture mapping unit stores a 2D texture image. There is only support for 2D textures. There is not power-of-two limitiation, because images are scaled if necessary. There is no support for customizing texture parameters like wrap-mode, filter, etc.


Member Function Documentation

virtual int ITextureState::getMaxTextureUnits ( void   )  [pure 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

Implemented in CTextureState.

virtual void ITextureState::setBilinearFilter ( bool  enable  )  [pure virtual]

Enables/disables texture filering.

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

Parameters:
enable Filtering enable state.

Implemented in CTextureState.

virtual void ITextureState::setTexture ( int  textureUnit,
const QImage &  image 
) [pure 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.

Implemented in CTextureState.


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