


#include <GL/glut.h>
#include <stdlib.h>
#include <stdio.h>
static int leftFirst = GL_TRUE;

/*  Initialize alpha blending function.
 */

static void init(void)
{
   glClearColor(0.93f, 0.93f, 0.93f, 0.0f);
	glColor3f(0.0f, 0.0f, 0.0f);

    
}




void display(void)
{
     
   glClear(GL_COLOR_BUFFER_BIT);
   float x1=-1.0 , y1=-1.0 ;
   float x2=1.0 , y2=-1.0;
   glColor3f(0.0,1.0,0.0);
   for(int i = 1;i<=20;i++){
          glBegin(GL_LINES);
          glVertex3f(x1,y1,0.0);
          glVertex3f(x2,y2,0.0);
          glEnd();
          printf("x1 : %f y1: %f , x2 : %f y2: %f\n",x1,y1,x2,y2);
          x2-=0.1;
          y1+=0.1;
   }
   glFlush();
}

void reshape(int w, int h)
{
   
}

/*  Main Loop
 *  Open window with initial window size, title bar, 
 *  RGBA display mode, and handle input events.
 */
int main(int argc, char** argv)
{
   glutInit(&argc, argv);
   glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB);
   glutInitWindowSize (200, 200);
   glutCreateWindow (argv[0]);
   init();
   glutReshapeFunc (reshape);
   glutDisplayFunc (display);
   glutMainLoop();
   return 0;
}

