WoW Model Viewer
Your premiere tool for viewing, equipping and animating World of Warcraft models.
Loading...
Searching...
No Matches
TextureManager Class Reference

Manages OpenGL texture lifetimes with reference-counted caching. More...

#include <TextureManager.h>

Inheritance diagram for TextureManager:
[legend]
Collaboration diagram for TextureManager:
[legend]

Public Member Functions

virtual GLuint add (GameFile *)
 
void doDelete (GLuint id)
 
- Public Member Functions inherited from Manager< GLuint >
 Manager ()=default
 
 ~Manager ()
 
virtual void del (GLuint id)
 
void delbyname (const std::string &name)
 
bool has (const std::string &name)
 
GLuint get (const std::string &name)
 
std::string get (GLuint id)
 
void clear ()
 
void dump ()
 

Additional Inherited Members

- Public Attributes inherited from Manager< GLuint >
std::map< std::string, GLuint > names
 
std::map< GLuint, ManagedItem * > items
 
- Protected Member Functions inherited from Manager< GLuint >
void do_add (const std::string &name, GLuint id, ManagedItem *item)
 

Detailed Description

Manages OpenGL texture lifetimes with reference-counted caching.

Textures are loaded from GameFile sources and cached by name. Duplicate requests return the existing GL texture ID instead of re-uploading.

Definition at line 14 of file TextureManager.h.

Member Function Documentation

◆ add()

GLuint TextureManager::add ( GameFile file)
virtual

Implements Manager< GLuint >.

Definition at line 9 of file TextureManager.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ doDelete()

void TextureManager::doDelete ( GLuint  id)
virtual

Reimplemented from Manager< GLuint >.

Definition at line 43 of file TextureManager.cpp.


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