#include #include #include int x1, x2, y1, y2, dx, dy; float ix, iy,step; void display(void) { glClear (GL_COLOR_BUFFER_BIT); glColor3f (1.0, 1.0, 1.0); dx = abs(x2-x1); dy = abs(y2-y1); if(abs(dx) > abs(dy) ){ step = abs(dx); } else { step = abs(dy); } ix = dx/step; iy = dy/step; float x=x1, y=y1; glBegin(GL_POINTS); glVertex2i (abs(x), abs(y)); //glEnd(); Can't use glEnd Here otherwise it will not display the next looping poinr int i; for (i = 0; i