wpf - OpenGL Animation Timer Immediate Mode -
i using sharpgl use opengl in wpf. know how draw things in immediate mode, animate each iteration of drawing. drawing line strip problem displays @ once, able show object being drawn. have tried using glflush force draw line line not working. ideas, here code:
gl.begin(opengl.gl_line_strip); (int = 0; < 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();
you try using counter gets incremented each frame. start counter off @ 0 draw nothing , let go parser.dataset.count. change loop have < counter instead of < parser.dataset.count. use timer control how want update counter. don't think you're supposed call gl.flush between gl.begin , gl.end. there limited set of functions can use between 2 function calls.
Comments
Post a Comment