WAP to use KeyBoard Key
#include<GL/glu.h> #include<GL/glut.h> #include<GL/gl.h> float left=0.0; float right=0.0; float up=0.0; float down=0.0; int x1=-1; int x2=1; float x=0; void display() { glClear(GL_COLOR_BUFFER_BIT); glClearColor(0.0,1.0,0.0,0); glColor3f(1.0,0.0,0.0); glPointSize(5); glRectf(-0.1,-0.1,0.1,0.1); glLineWidth(5); if(x<10) { glBegin(GL_POINTS); glTranslatef(left+right,0,0); for(float i=-100;i<=100;i+=0.1) { glVertex2f(i+left+right,0.3); glVertex2f(i+lef...