aboutsummaryrefslogtreecommitdiff
path: root/wscript
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-10-03 19:38:53 +0200
committerDavid Robillard <d@drobilla.net>2020-10-04 12:51:32 +0200
commitcc5c38b1aaf93157f5558df95383491a6163cc5a (patch)
treea1b858c00ad84a0479b98247f84e608ac0d62866 /wscript
parent6ca124d3787a901129252a2e26c091da1c1ff455 (diff)
Add puglGetViewHint()
This allows retrieving properties of the view that may be needed, such as the actual bit depth (which may vary from the suggested depth provided as a hint).
Diffstat (limited to 'wscript')
-rw-r--r--wscript24
1 files changed, 20 insertions, 4 deletions
diff --git a/wscript b/wscript
index 0855ef1..10be77c 100644
--- a/wscript
+++ b/wscript
@@ -255,7 +255,9 @@ def _build_pc_file(bld, name, desc, target, libname, deps={}, requires=[]):
LIBS=' '.join(link_flags))
-tests = ['redisplay', 'show_hide', 'update', 'timer']
+gl_tests = ['gl_hints']
+basic_tests = ['stub_hints', 'redisplay', 'show_hide', 'update', 'timer']
+tests = ['gl_hints', 'stub_hints', 'redisplay', 'show_hide', 'update', 'timer']
def build(bld):
@@ -430,18 +432,28 @@ def build(bld):
cflags=glad_cflags,
uselib=['DL', 'GL', 'M'])
+ for test in gl_tests:
+ bld(features = 'c cprogram',
+ source = 'test/test_%s.c' % test,
+ target = 'test/test_%s' % test,
+ install_path = '',
+ use = ['pugl_%s_static' % platform,
+ 'pugl_%s_gl_static' % platform],
+ uselib = deps[platform]['uselib'] + ['GL'])
+
if bld.env.HAVE_CAIRO:
build_example('pugl_cairo_demo', ['examples/pugl_cairo_demo.c'],
platform, 'cairo',
uselib=['M', 'CAIRO'])
- for test in tests:
+ for test in basic_tests:
bld(features = 'c cprogram',
source = 'test/test_%s.c' % test,
target = 'test/test_%s' % test,
install_path = '',
use = ['pugl_%s_static' % platform,
- 'pugl_%s_stub_static' % platform],
+ 'pugl_%s_stub_static' % platform,
+ 'pugl_%s_gl_static' % platform],
uselib = deps[platform]['uselib'] + ['CAIRO'])
# Make a hyper strict warning environment for checking API headers
@@ -488,9 +500,13 @@ def build(bld):
def test(tst):
if tst.options.gui_tests:
with tst.group('gui') as check:
- for test in tests:
+ for test in basic_tests:
check(['test/test_%s' % test])
+ if tst.env.HAVE_GL:
+ for test in gl_tests:
+ check(['test/test_%s' % test])
+
class LintContext(Build.BuildContext):
fun = cmd = 'lint'