Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tag: v4.1.1
Fetching contributors…

Cannot retrieve contributors at this time

46 lines (37 sloc) 0.909 kb
* texture_manager.hh
* Stage
* Singleton class for loading textures
#include "stage.hh"
#include <FL/Fl_Shared_Image.H>
#include <iostream>
namespace Stg
///Singleton for loading textures (not threadsafe)
class TextureManager {
TextureManager( void ) { }
//TODO figure out where to store standard textures
GLuint _stall_texture_id;
GLuint _mains_texture_id;
//TODO make this threadsafe
static TextureManager& getInstance( void )
static TextureManager* the_instance = NULL;
//TODO add a lock here
if( the_instance == NULL ) {
the_instance = new TextureManager;
return *the_instance;
///load a texture on the GPU, returned value is the texture ID, or 0 for failure
GLuint loadTexture( const char *filename );
Jump to Line
Something went wrong with that request. Please try again.