projects
/
neverball
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Some OpenGL optimization and state-change reduction.
[neverball]
/
ball
/
hud.c
diff --git
a/ball/hud.c
b/ball/hud.c
index
4f998ff
..
4ee9e29
100644
(file)
--- a/
ball/hud.c
+++ b/
ball/hud.c
@@
-51,6
+51,9
@@
static void hud_fps(void)
if (now - then > 250)
{
+ if (count)
+ fprintf(stdout, "%f\n", (float) (now - then) / count);
+
fps = count * 1000 / (now - then);
then = now;
count = 0;