diff options
author | Jerome Glisse <jglisse@redhat.com> | 2012-10-19 19:22:30 -0400 |
---|---|---|
committer | Jerome Glisse <jglisse@redhat.com> | 2012-10-19 19:22:30 -0400 |
commit | b28137545da13fb8e0fe336e4896d50f3c5f1e23 (patch) | |
tree | 181b09c6fe952e8621a0916dd4363b69596bf7f4 /glgears.c | |
parent | 939e5b32c610ab4ce385b6156947726d7ec97bec (diff) |
force all gl test to run for 5 frame and glFinish btw operations
This is for reverse engineering, force to print to stderr what is
the current gl activities (clearing buffer, drawing, special op, ...)
and use glFinish to try to force fglrx to send command buffer btw
this marker.
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Diffstat (limited to 'glgears.c')
-rw-r--r-- | glgears.c | 19 |
1 files changed, 18 insertions, 1 deletions
@@ -27,7 +27,9 @@ * Program runs for 5 seconds then exits, outputing framerate to console */ #define MAXFRAME 5 +#define PFINISH 1 +#include <stdio.h> #include <math.h> #include <GL/gl.h> #include <GL/glut.h> @@ -177,8 +179,18 @@ static void gear(GLfloat inner_radius, GLfloat outer_radius, GLfloat width, static void draw(void) { +#if PFINISH + fprintf(stderr, "EE CLEAR -----------------------------------------------------\n"); +#endif glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - +#if PFINISH + glFinish(); + fprintf(stderr, "EE CLEAR _____________________________________________________\n"); +#endif + +#if PFINISH + fprintf(stderr, "EE DRAW ------------------------------------------------------\n"); +#endif glPushMatrix(); glRotatef(view_rotx, 1.0, 0.0, 0.0); glRotatef(view_roty, 0.0, 1.0, 0.0); @@ -203,6 +215,11 @@ static void draw(void) glPopMatrix(); glPopMatrix(); +#if PFINISH + glFinish(); + fprintf(stderr, "EE DRAW ______________________________________________________\n"); +#endif + glutSwapBuffers(); frames++; |