From adfa666208bbf720e0dd33602661384b146e5268 Mon Sep 17 00:00:00 2001 From: Wolfgang Draxinger Date: Sun, 19 Feb 2012 17:46:50 +0100 Subject: FBO example added --- samples/OpenGL/x11argb_opengl/x11argb_opengl.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'samples/OpenGL/x11argb_opengl/x11argb_opengl.c') diff --git a/samples/OpenGL/x11argb_opengl/x11argb_opengl.c b/samples/OpenGL/x11argb_opengl/x11argb_opengl.c index 8eaddf8..7a073fb 100644 --- a/samples/OpenGL/x11argb_opengl/x11argb_opengl.c +++ b/samples/OpenGL/x11argb_opengl/x11argb_opengl.c @@ -423,8 +423,10 @@ static void redrawTheWindow() glEnable(GL_DEPTH_TEST); glEnable(GL_CULL_FACE); +#if 0 glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); +#endif glLightfv(GL_LIGHT0, GL_POSITION, light0_dir); glLightfv(GL_LIGHT0, GL_DIFFUSE, light0_color); -- cgit v1.2.3 From 2442c23c78fbe205cbebbe2f26d8a20eecbb1347 Mon Sep 17 00:00:00 2001 From: Wolfgang Draxinger Date: Sun, 12 May 2013 02:05:08 +0200 Subject: commit of new sample 'frustum' --- samples/OpenGL/x11argb_opengl/x11argb_opengl.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'samples/OpenGL/x11argb_opengl/x11argb_opengl.c') diff --git a/samples/OpenGL/x11argb_opengl/x11argb_opengl.c b/samples/OpenGL/x11argb_opengl/x11argb_opengl.c index 7a073fb..1c1e2e0 100644 --- a/samples/OpenGL/x11argb_opengl/x11argb_opengl.c +++ b/samples/OpenGL/x11argb_opengl/x11argb_opengl.c @@ -470,7 +470,9 @@ int main(int argc, char *argv[]) createTheRenderContext(); while (updateTheMessageQueue()) { + #if 0 redrawTheWindow(); + #endif } return 0; -- cgit v1.2.3 From 987f70c8e9b1bab87647d4ed20df79900d6c0c9e Mon Sep 17 00:00:00 2001 From: Wolfgang Draxinger Date: Sat, 14 Sep 2013 15:59:51 +0200 Subject: X11 clobberable window added --- samples/OpenGL/x11argb_opengl/x11argb_opengl.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'samples/OpenGL/x11argb_opengl/x11argb_opengl.c') diff --git a/samples/OpenGL/x11argb_opengl/x11argb_opengl.c b/samples/OpenGL/x11argb_opengl/x11argb_opengl.c index 1c1e2e0..723c6ae 100644 --- a/samples/OpenGL/x11argb_opengl/x11argb_opengl.c +++ b/samples/OpenGL/x11argb_opengl/x11argb_opengl.c @@ -23,12 +23,16 @@ \_____/ FTB. ------------------------------------------------------------------------*/ +#define _GNU_SOURCE #include #include #include #include +#include +#include + #include #include #include @@ -461,7 +465,13 @@ static void redrawTheWindow() b = fmod(b+0.5, 360.); c = fmod(c+0.25, 360.); + struct timespec Ta, Tb; + + clock_gettime(CLOCK_MONOTONIC_RAW, &Ta); 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)); } int main(int argc, char *argv[]) -- cgit v1.2.3 From dbfdab658eea6830a3ca5be205ed766aaa8ac6db Mon Sep 17 00:00:00 2001 From: Wolfgang Draxinger Date: Tue, 17 Sep 2013 12:42:48 +0200 Subject: added minimalvbo example --- samples/OpenGL/x11argb_opengl/x11argb_opengl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'samples/OpenGL/x11argb_opengl/x11argb_opengl.c') diff --git a/samples/OpenGL/x11argb_opengl/x11argb_opengl.c b/samples/OpenGL/x11argb_opengl/x11argb_opengl.c index 723c6ae..092c202 100644 --- a/samples/OpenGL/x11argb_opengl/x11argb_opengl.c +++ b/samples/OpenGL/x11argb_opengl/x11argb_opengl.c @@ -187,7 +187,7 @@ static void createTheWindow() KeyReleaseMask; attr_mask = - CWBackPixmap| + // CWBackPixmap| CWColormap| CWBorderPixel| CWEventMask; @@ -480,9 +480,7 @@ int main(int argc, char *argv[]) createTheRenderContext(); while (updateTheMessageQueue()) { - #if 0 redrawTheWindow(); - #endif } return 0; -- cgit v1.2.3