PDA

View Full Version : Timing drawing of points.



ooIsNotMyThing
04-19-2009, 04:26 AM
Hi, Im stuck on drawing points at different times.
I want to draw one set of points for 10 seconds, then another set of points for 10 seconds.
Do I have to implement this in C or is there a way to do it in opengl?

Thanks

dletozeun
04-19-2009, 05:47 AM
OpenGL is a graphic API there is nothing for timers management.
These opengl based APIs may interest you:

GLFW (http://glfw.sourceforge.net/)
SDL (http://www.libsdl.org/)
AllegroGL (http://allegrogl.sourceforge.net/)

ooIsNotMyThing
04-19-2009, 08:21 AM
hi, thanks.
GLFW has a way of doing it:


t = glfwGetTime();
printf("\n %f", t);
// after 10 seconds pause.
if (t > 10.0 &amp;&amp; t < 10.8)
system("pause");