Round FPS display.

This commit is contained in:
Andrzej Kapolka 2013-06-19 11:06:51 -07:00
parent 68371f8c3f
commit 46b3d829d5

View file

@ -67,7 +67,7 @@ void Webcam::renderPreview(int screenWidth, int screenHeight) {
glDisable(GL_TEXTURE_2D);
char fps[20];
sprintf(fps, "FPS: %.4g", _frameCount * 1000000.0f / (usecTimestampNow() - _startTimestamp));
sprintf(fps, "FPS: %d", (int)(roundf(_frameCount * 1000000.0f / (usecTimestampNow() - _startTimestamp))));
drawtext(left, top + PREVIEW_HEIGHT + 20, 0.10, 0, 1, 0, fps);
}
}