I am trying to display my frames per second in my cube rendering program. I would like to see his work. So how can I do this? I already did research on this, but the examples I saw use either several classes and still do not work, or they use libraries that I donβt have. Is there a way to get FPS using pre-installed libraries like ctime? I am using OpenGL with C ++.
Here is my (empty) function:
void GetFPS()
{
}
and then I show my FPS in my render function with:
std::cout << xRot << " " << yRot << " " << zRot << " " << FPS << "\n";
My program is installed at 60FPS, but I would like to see the actual FPS, not what it installed.
source
share