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