void GL_render() { glClear(GL_COLOR_BUFFER_BIT); renderPixel(400,400); ddaLine(200,300,235,400); ddaLine(400,500,500,600); ddaLine(300,100,600,110); ddaCircle(400,400,300); glutSwapBuffers(); }
int main() { int gd=DETECT, gm; int x0, y0, x1, y1; printf("Enter (x0, y0): "); scanf("%d %d", &x0, &y0); printf("Enter (x1, y1): "); scanf("%d %d", &x1, &y1); initgraph(&gd, &gm, NULL); ddaLine(x0, y0, x1, y1); getch(); closegraph(); return 0; }