28 namespace visualization {
30 Window::Window(std::string name_,
unsigned int position_x_,
unsigned int position_y_,
unsigned int width_,
unsigned int height_) :
31 name(name_), position_x(position_x_), position_y(position_y_), width(width_), height(height_)
34 glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_DEPTH);
39 id = glutCreateWindow(
name.c_str());
51 glEnable(GL_LINE_SMOOTH);
52 glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
53 glEnable(GL_POINT_SMOOTH);
54 glHint(GL_POINT_SMOOTH_HINT, GL_NICEST);
56 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
57 #ifndef _WIN32 // glBlendColor NOT SUPPORTED on windows GLUT
58 glBlendColor(1.0f, 1.0f, 1.0f, 0.6f);
59 glDisable(GL_MULTISAMPLE);
94 glMatrixMode(GL_PROJECTION);
99 glMatrixMode(GL_MODELVIEW);
105 APP_DATA_SYNCHRONIZATION_SCOPED_LOCK();
Window(std::string name_="OpenGlWindow", unsigned int position_x_=0, unsigned int position_y_=0, unsigned int width_=512, unsigned int height_=512)
unsigned int getId() const
unsigned int previous_width
#define VGL_MANAGER
Macro returning OpenGL window manager instance.
Contains declaration of parent class of all OpenGL-based windows.
void keyhandlerFullscreen(void)
std::string getName() const
virtual void reshapeHandler(int width_, int height_)
unsigned int previous_height
Declaration of WindowManager class along with a bunch of helpful types and macros.