Skip to main content
1 of 2
luser droog
  • 1.4k
  • 2
  • 12
  • 27

IIRC in another question, your said your Point class actually uses float x,y; for the coordinates. So one thing that can help is to shift the centers (the "zeros") over to the edge of the pixel, like:

int xi = pt.x + 0.5;
int yi = pt.y + 0.5;

And use those integers in calls the GLUT line drawing api.

I think this change would go inside your drawLine() function.

luser droog
  • 1.4k
  • 2
  • 12
  • 27