Bresenham's line algorithm in OpenGL/C++