Skip to main content
gamedev.net
🔒 Locked

counter timing

Started by skinx 2 replies 650+ views
Original Post
skinx
skinx
erm.. can anyone teach mi how to do on the elasped timing and print it out on the screen?
Boku San
Boku San
Any particular language? In C++, you can create a static high-precision (float, double) variable and increment it in your rendering function if you want to count frames (rendering function is called every frame).

If you otherwise just want a performance timer and a way to output it...the timer is provided by your windowing API (or, if you're using something portable, by your wrapper), and there are many ways to get text onto the screen. Look into freetype, bitmap fonts, texture mapped fonts...there are a lot of ways to do it.
Things change.
skinx
skinx
i always might have this probz... that is : glPrint identifier not found. how come eh?
Boku San
Boku San
glPrint isn't an actual OpenGL function, AFAIK.

Are you talking about NeHe's freetype tutorial? You'll need to implement "glPrint" yourself, in that case, or use his implementation.
Things change.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.