21 #ifndef Tulip_GLDISPLAYLISTMANAGER_H
22 #define Tulip_GLDISPLAYLISTMANAGER_H
28 #if defined(__APPLE__)
29 #include <OpenGL/gl.h>
30 #include <OpenGL/glu.h>
39 #include <tulip/tulipconf.h>
48 class TLP_GL_SCOPE GlDisplayListManager {
50 typedef std::map<std::string,GLuint> DisplayListMap;
51 typedef std::map<unsigned long, DisplayListMap> ContextAndDisplayListMap;
58 static GlDisplayListManager &getInst() {
60 inst=
new GlDisplayListManager();
68 void changeContext(
unsigned long context);
73 void removeContext(
unsigned long context);
78 bool beginNewDisplayList(
const std::string& name);
82 void endNewDisplayList();
87 bool callDisplayList(
const std::string& name);
94 GlDisplayListManager() {}
96 unsigned long currentContext;
98 static GlDisplayListManager* inst;
100 ContextAndDisplayListMap displayListMap;
106 #endif // Tulip_GLDISPLAYLISTMANAGER_H