projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b59eb3b
)
xdemo/glxswapcontrol: Move get_framge_usage after the swap.
author
Pauli Nieminen
<suokkos@gmail.com>
Mon, 3 Aug 2009 19:05:33 +0000
(12:05 -0700)
committer
Brian Paul
<brianp@vmware.com>
Mon, 3 Aug 2009 19:42:05 +0000
(13:42 -0600)
This fixes the problem that first frame would report bogus usage values.
Problem was caused because get_frame_usage returned data from previous buffer
swap.
Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
progs/xdemos/glxswapcontrol.c
patch
|
blob
|
history
diff --git
a/progs/xdemos/glxswapcontrol.c
b/progs/xdemos/glxswapcontrol.c
index 5a5d084f90913bcced4ecab280736933a480a516..8cdd560207e54b5abae2ca2f930ada4ce8a986c7 100644
(file)
--- a/
progs/xdemos/glxswapcontrol.c
+++ b/
progs/xdemos/glxswapcontrol.c
@@
-587,6
+587,9
@@
event_loop(Display *dpy, Window win)
angle += 2.0;
draw();
+
+ glXSwapBuffers(dpy, win);
+
if ( get_frame_usage != NULL ) {
GLfloat temp;
@@
-594,8
+597,6
@@
event_loop(Display *dpy, Window win)
frame_usage += temp;
}
- glXSwapBuffers(dpy, win);
-
/* calc framerate */
{
static int t0 = -1;