|
TGUI 1.x-dev
|
Static Public Member Functions | |
| static std::shared_ptr< TextureData > | getTexture (Texture &texture, const String &filename, bool smooth) |
| Loads a texture. | |
| static void | copyTexture (const std::shared_ptr< TextureData > &textureDataToCopy) |
| Shares the image with another texture. | |
| static void | removeTexture (const std::shared_ptr< TextureData > &textureDataToRemove) |
| Removes the texture. | |
| static std::size_t | getCachedImagesCount () |
Static Protected Attributes | |
| static std::map< String, std::list< TextureDataHolder > > | m_imageMap |
|
static |
Shares the image with another texture.
| textureDataToCopy | The original texture data that will now be reused |
|
staticnodiscard |
Loads a texture.
| texture | The texture object that will store the loaded image |
| filename | Filename of the image to load |
| smooth | Enable smoothing on the texture |
The second time you call this function with the same filename, the previously loaded image will be reused.
|
static |
Removes the texture.
| textureDataToRemove | The texture data that should be removed |
When no other texture is using the same image then the image will be removed from memory.