menu.c
// The sub-menu callback function.

The sub-menu callback function.
The sub - menu callback function .
void color_menu(int id)
{
  if (id==2) 
     {
      square_color[0] = 1.0; square_color[1] = 0.0; square_color[2] = 0.0; 
     }
  if (id==3) 
     {
      square_color[0] = 0.0; square_color[1] = 0.0; square_color[2] = 1.0; 
     }
   glutPostRedisplay();
}
void color_menu ( int id ) { if ( id == 2 ) { square_color [ 0 ] = 1.0 ; square_color [ 1 ] = 0.0 ; square_color [ 2 ] = 0.0 ; } if ( id == 3 ) { square_color [ 0 ] = 0.0 ; square_color [ 1 ] = 0.0 ; square_color [ 2 ] = 1.0 ; } glutPostRedisplay ( ) ; }
The sub-menu callback function.
The sub - menu callback function .