How do you get the frame rate in opengl/c++ ?
How do you get the frame rate in opengl/c++ ?
Last edited by slx47; 05-10-2002 at 06:43 PM.
ok heres the simplest way
~pseudo code!
Code:// declare these where you need them // FPS stores last seconds fps // fcount is out current fps counter int FPS = 0, int fcount; // our timer for each second long timetest = 0; //later on... drawframe(); fcount++; if(timetest == timer) { timetest = timer + 1 sec; // set timer for next second FPS = fcount; // set the FPS fcount = 0; // clear the counter }
ADVISORY: This users posts are rated CP-MA, for Mature Audiences only.
GameTutorials has a tutorial on getting the FPS (in OGL). Exactly what yer lookin for .
Language: C++
Compiler: Visual C++ 6.0
Currently Working On: Simple OpenGL aspects
Whew i thought you meant "How to make first person shooter in OpenGL"