PDA

View Full Version : Create lines using Bresenham



zada
08-30-2004, 04:32 AM
hi..
anybody here can show me an example create one line using Bresenham method with GL_POINTS...

mikael_aronsson
08-30-2004, 05:20 AM
www.google.com (http://www.google.com)

Just some of the hits with example code:
http://www.cs.helsinki.fi/group/goa/mallinnus/lines/bresenh.html

http://www.cs.unc.edu/~hoff/projects/comp235/bresline/perform0.html

http://www.funducode.com/freec/graphics/graphics2.htm#Q1

Points are rendered in OpenGL with:


glBegin( GL_POINTS);
glVertex2d( x, y);
... and so on...
glEnd();Mikael