diff options
Diffstat (limited to 'samples/OpenGL/x11argb_opengl')
-rw-r--r-- | samples/OpenGL/x11argb_opengl/Makefile | 2 | ||||
-rw-r--r-- | samples/OpenGL/x11argb_opengl/x11argb_opengl.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/samples/OpenGL/x11argb_opengl/Makefile b/samples/OpenGL/x11argb_opengl/Makefile index abafd5c..5b35c1b 100644 --- a/samples/OpenGL/x11argb_opengl/Makefile +++ b/samples/OpenGL/x11argb_opengl/Makefile @@ -1,3 +1,3 @@ x11argb_opengl: x11argb_opengl.c Makefile - $(CC) -std=c99 -g3 -o x11argb_opengl -DUSE_GLX_CREATE_CONTEXT_ATTRIB=1 x11argb_opengl.c -lX11 -lXrender -lGL -lm + $(CC) -std=c99 -g3 -o x11argb_opengl -DUSE_GLX_CREATE_CONTEXT_ATTRIB=1 -DUSE_GLX_CREATE_WINDOW=1 x11argb_opengl.c -lX11 -lXrender -lGL -lm diff --git a/samples/OpenGL/x11argb_opengl/x11argb_opengl.c b/samples/OpenGL/x11argb_opengl/x11argb_opengl.c index 41a7ad0..fb1b54c 100644 --- a/samples/OpenGL/x11argb_opengl/x11argb_opengl.c +++ b/samples/OpenGL/x11argb_opengl/x11argb_opengl.c @@ -211,6 +211,7 @@ static void createTheWindow() } #if USE_GLX_CREATE_WINDOW + fputs("glXCreateWindow ", stderr); int glXattr[] = { None }; glX_window_handle = glXCreateWindow(Xdisplay, fbconfig, window_handle, glXattr); if( !glX_window_handle ) { @@ -471,7 +472,7 @@ static void redrawTheWindow() glXSwapBuffers(Xdisplay, glX_window_handle); clock_gettime(CLOCK_MONOTONIC_RAW, &Tb); - fprintf(stderr, "glXSwapBuffers returned after %f ms\n", 1e3*((double)Tb.tv_sec + 1e-6*(double)Tb.tv_nsec) - 1e3*((double)Ta.tv_sec + 1e-6*(double)Ta.tv_nsec)); + // fprintf(stderr, "glXSwapBuffers returned after %f ms\n", 1e3*((double)Tb.tv_sec + 1e-6*(double)Tb.tv_nsec) - 1e3*((double)Ta.tv_sec + 1e-6*(double)Ta.tv_nsec)); } int main(int argc, char *argv[]) |