1 #ifndef GLUT_WINDOW_MANAGERS_H
2 #define GLUT_WINDOW_MANAGERS_H
4 #include "envFreeGlutTools.h"
6 #include "GLUTWindow.h"
7 #include "GLUTCallBackTools.h"
15 * pointer to GLImage source
17 typedef void (*FRERE_MASTER_THREAD
)(void**);
20 * On Linux befor using GLUTWindowManagers you have to call :
22 * GLUTWindowManagers::init(&argc,argv);
24 * Otherwise OpenGL cannot open and an error message will remind you that you haven't call glutInit !!
27 class CBI_FREEGLUT_TOOLS GLUTWindowManagers
31 virtual ~GLUTWindowManagers();
33 static void init(int argc
, char** argv
);
34 static GLUTWindowManagers
* getInstance();
36 * Warning Bloquant tand qu'il y a au moins une GLUTWindow d'active!
37 * Utiliser la méthode postDisplay de la class GLUTWindowCustomiser_A pour effectuer un traitement après le 1er rendu.
38 * Cette méthode postDisplay est appelé dans un thread séparé du display !
45 void addWindow(GLUTWindow
* glutWindow
);
50 void removeWindow(GLUTWindow
* glutWindow
);
54 * Prefering creating a Boost::thread
55 * then call runALL(void)
57 void runALL(FRERE_MASTER_THREAD methodeFrereMasterThread
, void** param
);
61 * Used only internally!
63 map
<unsigned int, GLUTWindow
*> getMapIdGlutWindow();
65 GLUTWindow
* getGLUTWindow(unsigned int glutWindowID
);
68 bool isAllDisplaying();
69 static void createDummyOpenGLContext();
72 map
<unsigned int, GLUTWindow
*> mapIdGlutWindow
;
73 static GLUTWindowManagers
* singleton
;