This is an interface to the texture-map manager. More...
#include "TextureMap.hpp"
Public Member Functions | |
virtual void | SetMaxTextureSize (unsigned long MaxSize)=0 |
Sets the maximum side length to which textures should be scaled down before they are employed for rendering. More... | |
virtual unsigned long | GetMaxTextureSize () const =0 |
Returns the currently set maximum texture size. More... | |
virtual TextureMapI * | GetTextureMap2D (const MapCompositionT &MapComp)=0 |
Creates a 2D texture-map by a texture-map composition. More... | |
virtual TextureMapI * | GetTextureMap2D (char *Data, unsigned long SizeX, unsigned long SizeY, char BytesPerPixel, bool MakePrivateCopy, const MapCompositionT &McForFiltersAndWrapping)=0 |
Creates a 2D texture-map from a pointer. More... | |
virtual TextureMapI * | GetTextureMap2D (BitmapT *Bitmap, bool MakePrivateCopy, const MapCompositionT &McForFiltersAndWrapping)=0 |
Creates a 2D texture-map from a BitmapT. More... | |
virtual void | FreeTextureMap (TextureMapI *TM)=0 |
Releases the texture map from the texture manager, and releases all of its resources. More... | |
virtual | ~TextureMapManagerI () |
Virtual destructor, so that nothing can go wrong and even g++ is happy. More... | |
This is an interface to the texture-map manager.
The interface is specified as ABC in order to share the texture-map manager across exe/dll boundaries.
|
inlinevirtual |
Virtual destructor, so that nothing can go wrong and even g++ is happy.
|
pure virtual |
Releases the texture map from the texture manager, and releases all of its resources.
Implemented in TextureMapManagerImplT.
|
pure virtual |
Returns the currently set maximum texture size.
Implemented in TextureMapManagerImplT.
|
pure virtual |
Creates a 2D texture-map by a texture-map composition.
The function never fails. Calling this multiple times with the same MapComp will return identical pointers. The maximum texture size value is respected, unless the "NoScaleDown" property is set in the MapComp.
Implemented in TextureMapManagerImplT.
|
pure virtual |
Creates a 2D texture-map from a pointer.
The function never fails. Calling this multiple times with identical paramaters will each time return a different pointer! If MakePrivateCopy=true, the function makes a private copy of the data pointed to by Data. The caller can then free the original data. If MakePrivateCopy=false, the function relies on the Data being valid and available during the entire lifetime of the returned texture map. SizeX and SizeY MUST be powers of 2, and BytesPerPixel MUST be 3 or 4! Moreover, all rows must be aligned on 4-byte boundaries! (See e.g. OpenGL Programming Guide (Red Book), p. 311.) The maximum texture size value is NOT respected - no scaling is performed even if SizeX or SizeY exceed this value!
Implemented in TextureMapManagerImplT.
|
pure virtual |
Creates a 2D texture-map from a BitmapT.
The function never fails. Calling this multiple times with identical paramaters will each time return a different pointer! If MakePrivateCopy=true, the function makes a private copy of the data pointed to by Data. The caller can then free the original data. If MakePrivateCopy=false, the function relies on the Bitmap being valid and available during the entire lifetime of the returned texture map. The maximum texture size value is respected, unless the "NoScaleDown" property is set in the McForFiltersAndWrapping.
Implemented in TextureMapManagerImplT.
|
pure virtual |
Sets the maximum side length to which textures should be scaled down before they are employed for rendering.
The unscaled data is kept in memory, though, even if the TextureMapManager is the owner of the texture data. The value that is set here is only effective when a texture must be re-initialized for rendering (e.g. after an OpenGL rendering-context change) and normally has no effect at other times.
Implemented in TextureMapManagerImplT.