progs/redbook/aargb.c
/* Draw 2 diagonal lines to form an X
 */
Draw 2 diagonal lines to form an X
Draw 2 diagonal lines to form an X
void display(void)
{
   glClear(GL_COLOR_BUFFER_BIT);
   glColor3f (0.0, 1.0, 0.0);
   glPushMatrix();
   glRotatef(-rotAngle, 0.0, 0.0, 0.1);
   glBegin (GL_LINES);
      glVertex2f (-0.5, 0.5);
      glVertex2f (0.5, -0.5);
   glEnd ();
   glPopMatrix();
   glColor3f (0.0, 0.0, 1.0);
   glPushMatrix();
   glRotatef(rotAngle, 0.0, 0.0, 0.1);
   glBegin (GL_LINES);
      glVertex2f (0.5, 0.5);
      glVertex2f (-0.5, -0.5);
   glEnd ();
   glPopMatrix();
   glFlush();
}
void display ( void ) { glClear ( GL_COLOR_BUFFER_BIT ) ; glColor3f ( 0.0 , 1.0 , 0.0 ) ; glPushMatrix ( ) ; glRotatef ( - rotAngle , 0.0 , 0.0 , 0.1 ) ; glBegin ( GL_LINES ) ; glVertex2f ( -0.5 , 0.5 ) ; glVertex2f ( 0.5 , -0.5 ) ; glEnd ( ) ; glPopMatrix ( ) ; glColor3f ( 0.0 , 0.0 , 1.0 ) ; glPushMatrix ( ) ; glRotatef ( rotAngle , 0.0 , 0.0 , 0.1 ) ; glBegin ( GL_LINES ) ; glVertex2f ( 0.5 , 0.5 ) ; glVertex2f ( -0.5 , -0.5 ) ; glEnd ( ) ; glPopMatrix ( ) ; glFlush ( ) ; }
Draw 2 diagonal lines to form an X
Draw 2 diagonal lines to form an X