🎉 Celebrating 25 Years of GameDev.net! 🎉
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
glutTimerFunc
Hi
I was looking through some sample sourcecode ( can''t remember where) and came across this
void timf (int value)
{
glutPostDedisplay ();
glutTimerFunc(40, timf, 0); //about 25FPS
}
I can use it, ok....but what is the calulation to fps. ( How does (40, timf, 0) turn out to be 25fps?)
I tried changing the 40 for other numbers but can see no difference.
--Ched--
--Ched--
chris@ched45.com
that is a function that just calls itself every 40ms (1000/40)==25fps.
i wouldnt use that to update the screen.
i wouldnt use that to update the screen.
basically
glutDisplayFunc(drawScreen);
glutIdleFunc(drawScreen);
though u might wanna also call it after specific events keypress etc, unfortunatly glut is a bit unclear in this department.
glutDisplayFunc(drawScreen);
glutIdleFunc(drawScreen);
though u might wanna also call it after specific events keypress etc, unfortunatly glut is a bit unclear in this department.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement