Public Member Functions | |
void | SetMaxTextureSize (unsigned long MaxSize) |
Sets the maximum side length to which textures should be scaled down before they are employed for rendering. More... | |
unsigned long | GetMaxTextureSize () const |
Returns the currently set maximum texture size. More... | |
MatSys::TextureMapI * | GetTextureMap2D (const MapCompositionT &MapComp) |
Creates a 2D texture-map by a texture-map composition. More... | |
MatSys::TextureMapI * | GetTextureMap2D (char *Data, unsigned long SizeX, unsigned long SizeY, char BytesPerPixel, bool MakePrivateCopy, const MapCompositionT &McForFiltersAndWrapping) |
Creates a 2D texture-map from a pointer. More... | |
MatSys::TextureMapI * | GetTextureMap2D (BitmapT *Bitmap, bool MakePrivateCopy, const MapCompositionT &McForFiltersAndWrapping) |
Creates a 2D texture-map from a BitmapT. More... | |
void | FreeTextureMap (MatSys::TextureMapI *TM) |
Releases the texture map from the texture manager, and releases all of its resources. More... | |
TextureMap2DT * | GetTextureMap2DInternal (const MapCompositionT &MapComp) |
Creates a 2D texture-map by a texture-map composition. More... | |
TextureMap2DT * | GetTextureMap2DInternal (char *Data, unsigned long SizeX, unsigned long SizeY, char BytesPerPixel, bool MakePrivateCopy, const MapCompositionT &McForFiltersAndWrapping) |
Creates a 2D texture-map from a pointer. More... | |
TextureMap2DT * | GetTextureMap2DInternal (BitmapT *Bitmap, bool MakePrivateCopy, const MapCompositionT &McForFiltersAndWrapping) |
Creates a 2D texture-map from a BitmapT. More... | |
TextureMapCubeT * | GetTextureMapCubeInternal (const MapCompositionT &MapComp) |
Creates a cube texture-map by a texture-map composition. More... | |
TextureMapCubeT * | GetTextureMapCubeInternal (char *Data[6], unsigned long SizeX, unsigned long SizeY, char BytesPerPixel, bool MakePrivateCopy, const MapCompositionT &McForFiltersAndWrapping) |
Creates a cube texture-map from a pointer. More... | |
TextureMapCubeT * | GetTextureMapCubeInternal (BitmapT *Bitmap[6], bool MakePrivateCopy, const MapCompositionT &McForFiltersAndWrapping) |
Creates a cube texture-map from a BitmapT. More... | |
void | FreeTextureMap (TextureMapImplT *TM) |
Releases the texture map from the texture manager, and all its resources. More... | |
const ArrayT< TextureMapImplT * > & | GetTexMapRepository () const |
Returns a reference to the texture-map repository. More... | |
Public Member Functions inherited from MatSys::TextureMapManagerI | |
virtual | ~TextureMapManagerI () |
Virtual destructor, so that nothing can go wrong and even g++ is happy. More... | |
Static Public Member Functions | |
static TextureMapManagerImplT & | Get () |
Get a pointer/reference to the texture-map manager singleton. More... | |
|
virtual |
Releases the texture map from the texture manager, and releases all of its resources.
Implements MatSys::TextureMapManagerI.
void TextureMapManagerImplT::FreeTextureMap | ( | TextureMapImplT * | TM | ) |
Releases the texture map from the texture manager, and all its resources.
|
static |
Get a pointer/reference to the texture-map manager singleton.
|
virtual |
Returns the currently set maximum texture size.
Implements MatSys::TextureMapManagerI.
|
inline |
Returns a reference to the texture-map repository.
|
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.
Implements MatSys::TextureMapManagerI.
|
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!
Implements MatSys::TextureMapManagerI.
|
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.
Implements MatSys::TextureMapManagerI.
TextureMap2DT * TextureMapManagerImplT::GetTextureMap2DInternal | ( | const MapCompositionT & | MapComp | ) |
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.
TextureMap2DT * TextureMapManagerImplT::GetTextureMap2DInternal | ( | char * | Data, |
unsigned long | SizeX, | ||
unsigned long | SizeY, | ||
char | BytesPerPixel, | ||
bool | MakePrivateCopy, | ||
const MapCompositionT & | McForFiltersAndWrapping | ||
) |
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!
TextureMap2DT * TextureMapManagerImplT::GetTextureMap2DInternal | ( | BitmapT * | Bitmap, |
bool | MakePrivateCopy, | ||
const MapCompositionT & | McForFiltersAndWrapping | ||
) |
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.
TextureMapCubeT * TextureMapManagerImplT::GetTextureMapCubeInternal | ( | const MapCompositionT & | MapComp | ) |
Creates a cube texture-map by a texture-map composition.
The function never fails. Calling this multiple times with the same MapComp will return identical pointers.
TextureMapCubeT * TextureMapManagerImplT::GetTextureMapCubeInternal | ( | char * | Data[6], |
unsigned long | SizeX, | ||
unsigned long | SizeY, | ||
char | BytesPerPixel, | ||
bool | MakePrivateCopy, | ||
const MapCompositionT & | McForFiltersAndWrapping | ||
) |
Creates a cube 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!
TextureMapCubeT * TextureMapManagerImplT::GetTextureMapCubeInternal | ( | BitmapT * | Bitmap[6], |
bool | MakePrivateCopy, | ||
const MapCompositionT & | McForFiltersAndWrapping | ||
) |
Creates a cube 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.
|
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.
Implements MatSys::TextureMapManagerI.