Advertisement

FPS (Again)

Started by April 08, 2001 07:43 PM
1 comment, last by CGMon 23 years, 7 months ago
I know, I know! Arghhh! I have my nice new OpenGL scene setup and running :0) Now I decide to try and place text in the center of my window that show the FPS(my window size is 800x600). So I came onto here looking for some good code that would tell me how to work out the FPS and how to print the FPS to my window in a font of my choice. Hmm well I found the FPS code and how to work it out but I am stuck when it comes down to placing it in my original code :/ Take for instance, if I was coding it into the base code from NeHe; where would I add the calculations for working out the FPS; where would I add the code to display the FPS to the screen and where would I specify my text size, font and colour etc... As you have already guessed I am newbie when it comes to this BUT you have to start somewhere! and this seemed the right place to start; seen as though you all appear to be nice people Thanks in advance
C G M O N
There are a couple of tutorials covering the subject of printing text in your openGL program, and all of them can be found on this site!

They strech from printing simple text to extruded textured 3d text, so I think your answer can be found among those.



return 1;
Advertisement
time.h with clock_t ... use the F1 key

This topic is closed to new replies.

Advertisement