Drawing context
The redraw function in your model is called from the animator framework. The caller is CGLView::draw. CGLView is a class derived from the FLTK class Fl_Gl_Window. The draw function is:void CGLView::draw(){if(!valid()){m_nWindowWidth=w();m_nWindowHeight=h();m_bSizeChange=true;glMatrixMode( GL_PROJECTION );glLoadIdentity();gluPerspective( 30.0, (double)m_nWindowWidth/m_nWindowHeight, 1.0, 100.0 );glViewport( 0, 0, m_nWindowWidth, m_nWindowHeight );glEnable(GL_DEPTH_TEST);glClearColor(0.0f, 0.0f, 0.0f, 0.0);}glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );// get drawMode and drawQuality from UIint drawMode=m_pUI->getDrawMode();if (m_pScene) m_pScene->redraw(drawMode);}