View Full Version : Drawing Progressive line in OpenGL

09-16-2009, 10:26 PM
This is my first post in this forum. I have started learning OpenGL recently. Till now I can just draw basic shapes in OpenGL.
I want to draw a line between two points (point A to point B). But it should look like a progressive line means user can see the drawing of line from point A to B. I have a track bar on my form. So according to the position of track bar the drawing of line should be faster or slower. How I can achieve this?

09-16-2009, 11:29 PM
instead of drawing from A to B, draw from A to C :

c = A*(1-trackPos) + B*trackPos

trackPos goes from 0.0 at start to 1.0 at end.