User
Frontpage
Release
Authors
Installation
Contents
Player
libstageplugin
Developer
libstage
Online
GitHub
Bugs/Issues
Player Project
Mailing Lists
libstage
texture_manager.hh
Go to the documentation of this file.
1
/*
2
* texture_manager.hh
3
* Stage
4
*
5
* Singleton class for loading textures
6
*
7
*/
8
#ifndef _TEXTURE_MANAGER_H_
9
#define _TEXTURE_MANAGER_H_
10
11
#include "
stage.hh
"
12
13
#include <FL/Fl_Shared_Image.H>
14
#include <iostream>
15
16
namespace
Stg
17
{
19
class
TextureManager
{
20
private
:
21
TextureManager
(
void
) { }
22
23
public
:
24
25
//TODO figure out where to store standard textures
26
GLuint
_stall_texture_id
;
27
GLuint
_mains_texture_id
;
28
29
//TODO make this threadsafe
30
static
TextureManager
&
getInstance
(
void
)
31
{
32
static
TextureManager
* the_instance = NULL;
33
//TODO add a lock here
34
if
( the_instance == NULL ) {
35
the_instance =
new
TextureManager
;
36
}
37
return
*the_instance;
38
}
39
41
GLuint
loadTexture
(
const
char
*filename );
42
43
};
44
}
45
#endif //_TEXTURE_MANAGER_H_
Generated on Mon Feb 11 2013 18:43:00 for Stage by
1.8.3