From 7f0169be0db0f16a91d859a54b22535f26fdcb38 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 8 Mar 2020 18:40:13 +0100 Subject: Add vsync command line options to demos --- examples/pugl_embed_demo.c | 4 ++-- examples/pugl_gl3_demo.c | 2 +- examples/pugl_window_demo.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'examples') diff --git a/examples/pugl_embed_demo.c b/examples/pugl_embed_demo.c index b122253..96df463 100644 --- a/examples/pugl_embed_demo.c +++ b/examples/pugl_embed_demo.c @@ -280,7 +280,7 @@ main(int argc, char** argv) puglSetViewHint(app.parent, PUGL_RESIZABLE, opts.resizable); puglSetViewHint(app.parent, PUGL_SAMPLES, opts.samples); puglSetViewHint(app.parent, PUGL_DOUBLE_BUFFER, opts.doubleBuffer); - puglSetViewHint(app.parent, PUGL_SWAP_INTERVAL, opts.doubleBuffer); + puglSetViewHint(app.parent, PUGL_SWAP_INTERVAL, opts.sync); puglSetViewHint(app.parent, PUGL_IGNORE_KEY_REPEAT, opts.ignoreKeyRepeat); puglSetHandle(app.parent, &app); puglSetEventFunc(app.parent, onParentEvent); @@ -299,7 +299,7 @@ main(int argc, char** argv) puglSetViewHint(app.child, PUGL_USE_DEBUG_CONTEXT, opts.errorChecking); puglSetViewHint(app.child, PUGL_SAMPLES, opts.samples); puglSetViewHint(app.child, PUGL_DOUBLE_BUFFER, opts.doubleBuffer); - puglSetViewHint(app.child, PUGL_SWAP_INTERVAL, 0); + puglSetViewHint(app.child, PUGL_SWAP_INTERVAL, opts.sync); puglSetBackend(app.child, puglGlBackend()); puglSetViewHint(app.child, PUGL_IGNORE_KEY_REPEAT, opts.ignoreKeyRepeat); puglSetHandle(app.child, &app); diff --git a/examples/pugl_gl3_demo.c b/examples/pugl_gl3_demo.c index 52c5dd3..9efe185 100644 --- a/examples/pugl_gl3_demo.c +++ b/examples/pugl_gl3_demo.c @@ -268,7 +268,7 @@ main(int argc, char** argv) puglSetViewHint(app.view, PUGL_RESIZABLE, app.opts.resizable); puglSetViewHint(app.view, PUGL_SAMPLES, app.opts.samples); puglSetViewHint(app.view, PUGL_DOUBLE_BUFFER, app.opts.doubleBuffer); - puglSetViewHint(app.view, PUGL_SWAP_INTERVAL, app.opts.doubleBuffer); + puglSetViewHint(app.view, PUGL_SWAP_INTERVAL, app.opts.sync); puglSetViewHint(app.view, PUGL_IGNORE_KEY_REPEAT, PUGL_TRUE); puglSetHandle(app.view, &app); puglSetEventFunc(app.view, onEvent); diff --git a/examples/pugl_window_demo.c b/examples/pugl_window_demo.c index e9c09a3..fdcd8cb 100644 --- a/examples/pugl_window_demo.c +++ b/examples/pugl_window_demo.c @@ -201,7 +201,7 @@ main(int argc, char** argv) puglSetViewHint(view, PUGL_RESIZABLE, opts.resizable); puglSetViewHint(view, PUGL_SAMPLES, opts.samples); puglSetViewHint(view, PUGL_DOUBLE_BUFFER, opts.doubleBuffer); - puglSetViewHint(view, PUGL_SWAP_INTERVAL, 0);//opts.doubleBuffer && i == 0); + puglSetViewHint(view, PUGL_SWAP_INTERVAL, opts.sync); puglSetViewHint(view, PUGL_IGNORE_KEY_REPEAT, opts.ignoreKeyRepeat); puglSetHandle(view, cube); puglSetEventFunc(view, onEvent); -- cgit v1.2.1