diff options
author | David Robillard <d@drobilla.net> | 2020-03-08 17:47:13 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-03-08 17:47:13 +0100 |
commit | 5f2e299a2f0d86e450340079930b98651103722f (patch) | |
tree | ac2b5aeb4d3ddd67b726f22c885224a825474b3e | |
parent | f1f50a738e10873c483b7425ae7da963114b7719 (diff) | |
download | pugl-5f2e299a2f0d86e450340079930b98651103722f.tar.gz pugl-5f2e299a2f0d86e450340079930b98651103722f.tar.bz2 pugl-5f2e299a2f0d86e450340079930b98651103722f.zip |
Move demo programs to examples directory
These are not really tests, but examples or demos, which has caused some
confusion in the past. So, move them, and make room for actual tests.
-rw-r--r-- | examples/demo_utils.h (renamed from test/demo_utils.h) | 0 | ||||
-rw-r--r-- | examples/glad/glad.c (renamed from test/glad/glad.c) | 0 | ||||
-rw-r--r-- | examples/glad/glad.h (renamed from test/glad/glad.h) | 0 | ||||
-rw-r--r-- | examples/glad/khrplatform.h (renamed from test/glad/khrplatform.h) | 0 | ||||
-rw-r--r-- | examples/pugl_cairo_demo.c (renamed from test/pugl_cairo_test.c) | 4 | ||||
-rw-r--r-- | examples/pugl_embed_demo.c (renamed from test/pugl_test.c) | 4 | ||||
-rw-r--r-- | examples/pugl_gl3_demo.c (renamed from test/pugl_gl3_test.c) | 4 | ||||
-rw-r--r-- | examples/pugl_print_events.c (renamed from test/pugl_print_events.c) | 4 | ||||
-rw-r--r-- | examples/shader_utils.h (renamed from test/shader_utils.h) | 0 | ||||
-rw-r--r-- | wscript | 27 |
10 files changed, 22 insertions, 21 deletions
diff --git a/test/demo_utils.h b/examples/demo_utils.h index 94be68e..94be68e 100644 --- a/test/demo_utils.h +++ b/examples/demo_utils.h diff --git a/test/glad/glad.c b/examples/glad/glad.c index 38f442c..38f442c 100644 --- a/test/glad/glad.c +++ b/examples/glad/glad.c diff --git a/test/glad/glad.h b/examples/glad/glad.h index d8068c6..d8068c6 100644 --- a/test/glad/glad.h +++ b/examples/glad/glad.h diff --git a/test/glad/khrplatform.h b/examples/glad/khrplatform.h index 5b55ea2..5b55ea2 100644 --- a/test/glad/khrplatform.h +++ b/examples/glad/khrplatform.h diff --git a/test/pugl_cairo_test.c b/examples/pugl_cairo_demo.c index e9fa27c..94ac26e 100644 --- a/test/pugl_cairo_test.c +++ b/examples/pugl_cairo_demo.c @@ -15,11 +15,11 @@ */ /** - @file pugl_cairo_test.c A simple Pugl test that creates a top-level window. + @file pugl_cairo_demo.c An example of drawing with Cairo. */ #include "demo_utils.h" -#include "test_utils.h" +#include "test/test_utils.h" #include "pugl/pugl.h" #include "pugl/pugl_cairo.h" diff --git a/test/pugl_test.c b/examples/pugl_embed_demo.c index f5a696e..43d3d4e 100644 --- a/test/pugl_test.c +++ b/examples/pugl_embed_demo.c @@ -15,13 +15,13 @@ */ /** - @file pugl_test.c A simple Pugl test that creates a top-level window. + @file pugl_embed_demo.c An example of embedding a view in another. */ #define GL_SILENCE_DEPRECATION 1 #include "demo_utils.h" -#include "test_utils.h" +#include "test/test_utils.h" #include "pugl/gl.h" #include "pugl/pugl.h" diff --git a/test/pugl_gl3_test.c b/examples/pugl_gl3_demo.c index 86fb11c..52c5dd3 100644 --- a/test/pugl_gl3_test.c +++ b/examples/pugl_gl3_demo.c @@ -15,7 +15,7 @@ */ /** - @file pugl_gl3_test.c A simple test of OpenGL 3 with Pugl. + @file pugl_gl3_demo.c An example of drawing with OpenGL 3. This is an example of using OpenGL for pixel-perfect 2D drawing. It uses pixel coordinates for positions and sizes so that things work roughly like a @@ -38,7 +38,7 @@ #include "demo_utils.h" #include "shader_utils.h" -#include "test_utils.h" +#include "test/test_utils.h" #include "glad/glad.h" diff --git a/test/pugl_print_events.c b/examples/pugl_print_events.c index da486aa..5d2785e 100644 --- a/test/pugl_print_events.c +++ b/examples/pugl_print_events.c @@ -15,10 +15,10 @@ */ /** - @file pugl_print_events.c A simple Pugl test that prints events. + @file pugl_print_events.c A utility program that prints view events. */ -#include "test_utils.h" +#include "test/test_utils.h" #include "pugl/pugl.h" #include "pugl/pugl_stub.h" diff --git a/test/shader_utils.h b/examples/shader_utils.h index 834d8fc..834d8fc 100644 --- a/test/shader_utils.h +++ b/examples/shader_utils.h @@ -184,7 +184,7 @@ def build(bld): bld.install_files(detaildir, bld.path.ant_glob('pugl/detail/*.h')) bld.install_files(detaildir, bld.path.ant_glob('pugl/detail/*.c')) - # Library dependencies of pugl libraries (for buiding tests) + # Library dependencies of pugl libraries (for building examples) deps = {} def build_pugl_lib(name, **kwargs): @@ -282,7 +282,7 @@ def build(bld): uselib=['CAIRO', 'X11'], source=['pugl/detail/x11_cairo.c']) - def build_test(prog, source, platform, backend, **kwargs): + def build_example(prog, source, platform, backend, **kwargs): use = ['pugl_%s_static' % platform, 'pugl_%s_%s_static' % (platform, backend)] @@ -311,25 +311,26 @@ def build(bld): if bld.env.BUILD_TESTS: for s in ('rect.vert', 'rect.frag'): - # Copy shaders to build directory for test programs + # Copy shaders to build directory for example programs bld(features = 'subst', is_copy = True, source = 'shaders/%s' % s, target = 'shaders/%s' % s) if bld.env.HAVE_GL: - build_test('pugl_test', ['test/pugl_test.c'], - platform, 'gl', uselib=['GL', 'M']) - build_test('pugl_print_events', ['test/pugl_print_events.c'], - platform, 'stub') - build_test('pugl_gl3_test', - ['test/pugl_gl3_test.c', 'test/glad/glad.c'], - platform, 'gl', uselib=['DL', 'GL', 'M']) + build_example('pugl_embed_demo', ['examples/pugl_embed_demo.c'], + platform, 'gl', uselib=['GL', 'M']) + build_example('pugl_print_events', + ['examples/pugl_print_events.c'], + platform, 'stub') + build_example('pugl_gl3_demo', + ['examples/pugl_gl3_demo.c', 'examples/glad/glad.c'], + platform, 'gl', uselib=['DL', 'GL', 'M']) if bld.env.HAVE_CAIRO: - build_test('pugl_cairo_test', ['test/pugl_cairo_test.c'], - platform, 'cairo', - uselib=['M', 'CAIRO']) + build_example('pugl_cairo_demo', ['examples/pugl_cairo_demo.c'], + platform, 'cairo', + uselib=['M', 'CAIRO']) if bld.env.DOCS: bld(features = 'subst', |