1 #ifndef __CONTEXT_GLUT_HH__
2 #define __CONTEXT_GLUT_HH__
4 #include <bias_config.h>
6 # error You need glut. Please recompile BIAS with USE_GLUT.
7 #endif //BIAS_HAVE_GLUT
9 #include "RenderContextBase.hh"
25 void Reshape_(
int width,
int height);
44 virtual void Redisplay();
47 int width = 400,
int height = 600,
48 const std::string& name =
"ContextGLUT Window",
49 const char* initDisplayString = NULL,
50 int* commandLineArgc = NULL,
51 char** commandLineArgv = NULL);
54 const std::string& name =
"ContextGLUT Window",
55 const char* initDisplayString = NULL,
56 int* commandLineArgc = NULL,
57 char** commandLineArgv = NULL);
61 virtual void MakeGLContextCurrent();
63 virtual void SetTimer(
unsigned int interval);
64 virtual void DeactivateTimer();
68 #ifdef GLUT_TIME_MEASURE
69 static std::vector<double> fpsMeasures;
70 static unsigned int measurementsCount_;
82 virtual void InitContext_(
const char* initDisplayString = NULL,
83 int* commandLineArgc = NULL,
84 char** commandLineArgv = NULL);
92 virtual void CreateWindow_(
int x0,
int y0,
int width,
int height,
93 const std::string& name);
95 virtual void DestroyWindow_();
104 friend void Reshape_(
int width,
int height);
108 void RegisterCallbacks_()
const;
116 void EnterGameMode_(
const std::string gamemodestring);
unsigned int doubleClickInterval_
void Reshape_(int width, int height)
void SpecialKeyFunc_(int key, int x, int y)
void StandardKeyFunc_(unsigned char key, int x, int y)
void SetDoubleClickInterval(unsigned int ms)
void SpecialKeyUpFunc_(int key, int x, int y)
void MouseButtonFunc_(int button, int state, int x, int y)
void StandardKeyUpFunc_(unsigned char key, int x, int y)
std::vector< ContextGLUT * >::iterator registrationIterator_
void MouseMotionFunc_(int x, int y)
void MousePassiveMotionFunc_(int x, int y)
Base for all classes creating interface between GL and "window manager".