#include <texture.h>
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. |
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.
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.
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.
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.
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.