I am using SharpGL to use OpenGL in WPF. I know how to draw things in immediate mode, but I would like to animate each iteration of the drawing. I am drawing a line strip but my problem is that it displays it all at once, I would like to be able to show to object being drawn. I have tried using glFlush to force it to draw it line by line but it is not working. Any ideas, here is my code:
gl.Begin(OpenGL.GL_LINE_STRIP);
for (int i = 0; i < parser.dataSet.Count; i++)
{
gl.Color((float)i, 3.0f, 0.0f);
gl.Vertex(parser.dataSet[i].X, parser.dataSet[i].Y, parser.dataSet[i].Z);
gl.Flush();
}
gl.End();