| 
           Visualisation en perspective | 
           Visualisation en projection parallèle orthographique | 
Fichier source : ParametragesGLUt5-1.cpp
/* Fonction executee lors d'un changement       */
    /* de la taille de la fenetre OpenGL            */
    
    static void reshape(int x,int y) {
      glViewport(0,0,x,y); 
      glMatrixMode(GL_PROJECTION);
      glLoadIdentity();
      if ( x >= y )
        gluPerspective(25.0F,(float) x/y,1.0,40.0);
        else
        gluPerspective(25.0F*(float) y/x,(float) x/y,1.0,40.0);
      glMatrixMode(GL_MODELVIEW);
      glLoadIdentity();
      gluLookAt(0.0,0.0,20.0,
                0.0,0.0, 0.0,
                0.0,1.0, 0.0);
    }
Fichier source : ParametragesGLUt5-2.cpp
/* Fonction executee lors d'un changement       */
    /* de la taille de la fenetre OpenGL            */
    
    static void reshape(int x,int y) {
      glViewport(0,0,x,y); 
      glMatrixMode(GL_PROJECTION);
      glLoadIdentity();
      if ( x >= y )
        glOrtho(-4.5F*(float) x/y,4.5F*(float) x/y,-4.5,4.5,-4.5,4.5);
        else
        glOrtho(-4.5,4.5,-4.5F*(float) y/x,4.5F*(float) y/x,-4.5,4.5);
      glMatrixMode(GL_MODELVIEW);
      glLoadIdentity();
    }