博客转自:http://www.lighthouse3d.com/tutorials/glut-tutorial/frames-per-second/
How fast is your application really going? Sometimes we make small changes and we can’t be sure of the effect they had on the performance, namely how do they affect the number of displayed frames per second. In this section we’ll see how we can use GLUT to count the number of frames per second. Note that this shouldn’t be considered a true benchmark, just a guide value.
GLUT provides a function that allows us to query many features of the system, one of them being the number of milliseconds from the call to glutInit. The function is glutGet and the syntax is as follows:
int glutGet(GLenum state); Parameters: state – specifies the value we want.
原文:https://www.cnblogs.com/flyinggod/p/12941708.html