aboutsummaryrefslogtreecommitdiff
path: root/samples/OpenGL/x11argb_opengl
diff options
context:
space:
mode:
authorWolfgang Draxinger <Wolfgang.Draxinger@draxit.de>2016-08-02 16:39:18 +0200
committerWolfgang Draxinger <Wolfgang.Draxinger@draxit.de>2016-08-02 16:39:18 +0200
commit5f280e26b131fd5f2b569ce0ff48a2b9cfa9b128 (patch)
tree4fe74ee7bd34eb21f40ef803310cbe08470a85d3 /samples/OpenGL/x11argb_opengl
parentff5c0c58953aa679b2b794906428f8a7cd2b2696 (diff)
downloadcodesamples-5f280e26b131fd5f2b569ce0ff48a2b9cfa9b128.tar.gz
codesamples-5f280e26b131fd5f2b569ce0ff48a2b9cfa9b128.tar.bz2
xcb
Diffstat (limited to 'samples/OpenGL/x11argb_opengl')
-rw-r--r--samples/OpenGL/x11argb_opengl/Makefile2
-rw-r--r--samples/OpenGL/x11argb_opengl/x11argb_opengl.c3
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 092c202..bf470b6 100644
--- a/samples/OpenGL/x11argb_opengl/x11argb_opengl.c
+++ b/samples/OpenGL/x11argb_opengl/x11argb_opengl.c
@@ -210,6 +210,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[])