iLab Neuromorphic Robotics Toolkit  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nrt::graphics::TextureManager Class Reference

#include <nrt/Graphics/TextureManager.H>

Simple manager to create/delete OpenGL textures and give them a name.

Definition at line 50 of file TextureManager.H.

Public Member Functions

 TextureManager ()=default
 Constructor.
 
 ~TextureManager ()=default
 Destructor.
 
std::vector< unsigned int > const & create (std::string const &name, size_t const num=1)
 Create a number of textures by providing a unique name. More...
 
void remove (std::string const &name)
 Delete an existing block of lists, by name. More...
 
bool has (std::string const &name) const
 Return true if we have created some lists for the given name.
 
std::vector< unsigned int > const & get (std::string const &name) const
 Get the first OpenGL list index and the number of allocated lists, by name. More...
 
void clear ()
 Clear the entire list.
 

Member Function Documentation

std::vector<unsigned int> const& nrt::graphics::TextureManager::create ( std::string const &  name,
size_t const  num = 1 
)

Create a number of textures by providing a unique name.

Will throw if name already exists. The returned texture indices are not guaranteed to be contiguous.

void nrt::graphics::TextureManager::remove ( std::string const &  name)

Delete an existing block of lists, by name.

Will throw if name does not exist

std::vector<unsigned int> const& nrt::graphics::TextureManager::get ( std::string const &  name) const

Get the first OpenGL list index and the number of allocated lists, by name.

Will throw if name does not exist


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