// main.h // ////////////////////////////////////////////////////////////////////// #ifndef _MAIN_H__ #define _MAIN_H__ #define FROG_VERSION 1.106 #define FROG_AUTHORLIST "Loic.Quertenmont@cern.ch\nVincent.Roberfroid@cern.ch" #include "Includes/GL/glew.h" #ifdef linux #include "Includes/GL/glxew.h" #include #include #include "Includes/GLUT/glut.h" #elif macos #include "Includes/GL/glxew.h" #include #include #include #else #include #include #include "Includes/GL/wglew.h" #include #include #include #pragma comment (lib,"glaux.lib") #pragma comment (lib,"glu32.lib") #pragma comment (lib,"opengl32.lib") #pragma comment (lib,"glut.lib") #pragma comment (lib,"glut32.lib") #pragma comment (lib,"Includes/CURL/Lib/libcurl.lib") #pragma comment (lib,"Includes/ZLIB/Lib/zdll.lib") #endif bool SCREENSAVER = false; bool SHOOTER = false; #include time_t start; time_t end; #include #include #include "Includes/FROG/FROG_Objects.h" #include "Includes/FROG/FROG_Events.h" #include "Includes/FROG/FROG_Geometry.h" #include "Includes/FROG/FROG_Fonts.h" #include "Includes/FROG/FROG_Element_Tools.h" #include "Includes/FROG/FROG_Texture.h" #include "Includes/FROG/FROG_ReadCards.h" #include "Includes/FROG/FROG_Net_Tools.h" #include "Includes/FROG/FROG_View_Tools.h" FROG_Fonts* Fonts; FROG_ReadCards* Card; FROG_Objects_Extended* frogObjects_; std::vector ActiveViews; FROG_View_Screen* ViewScreen; FROG_View* ViewMain; FROG_View_Menu* ViewMenu; int SAVE_WINDOW_W = 800; int SAVE_WINDOW_H = 600; int SAVE_WINDOW_X = 10; int SAVE_WINDOW_Y = 10; bool FULLSCREEN = false; int WINDOW_WIDTH = 800; int WINDOW_HEIGHT = 600; int SCREENSHOT = 0; char SCREENSHOT_FORMAT[255] = {"png"}; int TEMP_I = 0; bool MouseStates[3]; GLuint LogoTexture; GLuint LogoTxtTexture; char ScreenShotName[1024] = {"screenshot"}; std::string AbsolutePath; std::string inputConfig = "config.txt"; std::string inputVisFile; std::string inputVisFileFromCard; std::vector inputVisFileFromCommand; std::vector inputGeom; // MultiThreading Variables #ifdef linux pthread_t Thread_H; #elif macos pthread_t Thread_H; #else HANDLE Thread_H = NULL; DWORD Thread_Id = 0; #endif bool Thread_Run = false; float SelectedObject_color[4] = {1,1,1,1}; int SelectedObject_Counter = 0; //bool SelectedObject_DrawFlag = true; bool Geometry_WireFrame = false; int updateVisFileTime = -1; FROG_Events* events; FROG_Element_Event* event; FROG_Geometry* geom; char gSim = 0; char gReco = 15; //unsigned int mCLicked_DetId = (unsigned int) -1; bool mDisplayMother = false; bool mLoading = true; int mLoading_I = 0; bool mEventChanging = true; unsigned int mAutomaticShooter_LastEvent = 0; bool mAutomaticShooter = false; int eventNumber = 0; int eventTime = 5; bool mHelpScreen= false; bool stateChanged = false; bool print_FrameWork = false; float BackGround_Color[4] = {0.0 , 0.0 , 0.0 , 1.0}; float Txt_Color[4] = {0.0 , 1.0 , 1.0 , 1.0}; float Framework_Color[4] = {1.0 , 0.5 , 1.0 , 0.3}; float Framework_Thickness = 1.0; float ZAxis_Color[4] = {1.0 , 0.5 , 1.0 , 0.3}; float ZAxis_Thickness = 3; void reshape (int w, int h); void display(); void display2(); void displayForScreenShot(); void displaytext(); void processNormalKeys(unsigned char key, int x, int y); void processSpecialKeys(int key, int x, int y) ; void processMouse(int button, int state, int x, int y); void processMotion(int x, int y); void processPassiveMotion(int x, int y); void LoadCard(const char* inputCard ); void gl_select(int x, int y); void list_hits(GLint hits, GLuint *names); void AutomaticEventChanging (int Extra); void updateEventsFile(); #endif