SimpleGL  1.1.0
A framework for platform independent rendering
Public Member Functions | List of all members
sgl::TextureManager Class Reference

This class provides an class for managing textures. More...

#include <manager_gl.hpp>

Inheritance diagram for sgl::TextureManager:
sgl::Manager< Texture >

Public Member Functions

void remove (std::string name) override
 Removes and disposes a texture from the storage. More...
 
void clear () override
 Removes all textures and disposes them. More...
 
Textureload (std::string path, std::string name)
 Loads a texture from file and stores it. More...
 
- Public Member Functions inherited from sgl::Manager< Texture >
 ~Manager (void)
 Deletes a manager and disposes all managed objects. More...
 
void put (std::string name, Texture *value)
 Stores a object with specified name. More...
 
Textureget (std::string name)
 Gets a managed object from the storage. More...
 

Additional Inherited Members

- Protected Member Functions inherited from sgl::Manager< Texture >
 Manager (void)
 Initializes a new manager. More...
 
- Protected Attributes inherited from sgl::Manager< Texture >
std::map< std::string, Texture * > objects
 Contains the objects to manage. More...
 

Detailed Description

This class provides an class for managing textures.

Definition at line 27 of file manager_gl.hpp.

Member Function Documentation

void sgl::TextureManager::clear ( )
overridevirtual

Removes all textures and disposes them.

Reimplemented from sgl::Manager< Texture >.

Definition at line 31 of file manager_gl.cpp.

Texture * sgl::TextureManager::load ( std::string  path,
std::string  name 
)

Loads a texture from file and stores it.

Parameters
pathFile path to the image.
nameThe name of the texture.
Returns
The loaded texture.

Definition at line 42 of file manager_gl.cpp.

void sgl::TextureManager::remove ( std::string  name)
overridevirtual

Removes and disposes a texture from the storage.

Parameters
nameThe name of the texture.

Reimplemented from sgl::Manager< Texture >.

Definition at line 22 of file manager_gl.cpp.


The documentation for this class was generated from the following files: