Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void displayFunc()
- {
- static double previousTickCount = (double)cvGetTickCount();
- static int frameCount = 0;
- ///………
- glutSwapBuffers();
- frameCount++;
- if (frameCount == FPS_STATS_NB_FRAMES)
- {
- frameCount = 0;
- double newTickCount = (double)cvGetTickCount();
- double fps = (cvGetTickFrequency()*1000000.0*FPS_STATS_NB_FRAMES)/(newTickCount-previousTickCount);
- previousTickCount = newTickCount;
- char title[100];
- sprintf(title, "VisualWall - %d fps", (int)(0.5+fps));
- glutSetWindowTitle(title);
- }
- }
Add Comment
Please, Sign In to add comment