I have read alot of tutorails but they never comment on this, and in some of the tutorials you have to all this crap built into it, could some one show me how to display the FPS on screen with a basic text whit out the mombo jombo crap from other tutorials.
Edit: Even a link to a tutorial that discribes this would be great.
There is no simple portable way of doing this because win32 use wgl and X uses glX functions to get a font converted to triangles/lines, you would need to use a font bitmap (the easiest solution) or use a ttf library like FreeType.
But there are tons of opengl tutorials on rendering text with opengl, have a look at those.
There’s a C lib function which takes a float arg and returns a string of that float. It will come in handy. It’s called ecvt if I am not wrong.
Mind you, I hate its syntax so I did it from scratch.
Any Windows users interested in this topic that don’t want to add additional code, check out Fraps at the fraps.com web site. It automatically overlays the current FPS onto the OpenGL window. It even works with my multi-view application. Pretty cool.
No I’m not affiliated with them in any way, I just thought their product was right on topic.