24 ::GlWidget() : Fl_Gl_Window(0, 0, 0, 0), m_Identifier(), m_UseGlAcceleration(false),
27 m_Identifier =
"Default";
31 m_UseGlAcceleration =
true;
35 m_BackgroundColor.Fill(0);
49 os << indent <<
"Widget " <<
m_Identifier <<
": " << std::endl;
52 #ifndef OTB_GL_USE_ACCEL
53 os << indent << indent <<
"OpenGl acceleration is not allowed." << std::endl;
57 os << indent << indent <<
"OpenGl acceleration is allowed and enabled." << std::endl;
61 os << indent << indent <<
"OpenGl acceleration is allowed but disabled." << std::endl;
71 #ifndef OTB_GL_USE_ACCEL
76 "Gl acceleration enabled but not allowed. Consider rebuilding with OTB_USE_GL_ACCEL to ON. For now, disabling Gl acceleration.");
87 glViewport(0, 0, w(), h());
89 glShadeModel(GL_FLAT);
90 glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
92 glClear(GL_COLOR_BUFFER_BIT);
93 glMatrixMode(GL_MODELVIEW);
95 glMatrixMode(GL_PROJECTION);
105 bool reportMove =
false;
106 bool reportResize =
false;
107 if (this->x() != x || this->y() != y)
112 if (this->w() != w || this->h() != h)
152 index[0] = Fl::event_x();
153 index[1] = Fl::event_y();
155 index[1] = this->h() - index[1];