aboutsummaryrefslogtreecommitdiffstats
path: root/examples/pugl_shader_demo.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-05-16 21:18:02 +0200
committerDavid Robillard <d@drobilla.net>2020-05-16 21:18:02 +0200
commitfe96ed3c451548278197e2da74d3d53b1d6a8dd9 (patch)
tree6c4e3e751ddd13cd4898fac0fae4f4aed7079f36 /examples/pugl_shader_demo.c
parent3200cda25e06887e809fc5b47780aaf950253172 (diff)
downloadpugl-fe96ed3c451548278197e2da74d3d53b1d6a8dd9.tar.gz
pugl-fe96ed3c451548278197e2da74d3d53b1d6a8dd9.tar.bz2
pugl-fe96ed3c451548278197e2da74d3d53b1d6a8dd9.zip
Add default and maximum size
Diffstat (limited to 'examples/pugl_shader_demo.c')
-rw-r--r--examples/pugl_shader_demo.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/examples/pugl_shader_demo.c b/examples/pugl_shader_demo.c
index 86d01a9..7c0df6a 100644
--- a/examples/pugl_shader_demo.c
+++ b/examples/pugl_shader_demo.c
@@ -243,7 +243,7 @@ parseOptions(PuglTestApp* app, int argc, char** argv)
}
static void
-setupPugl(PuglTestApp* app, const PuglRect frame)
+setupPugl(PuglTestApp* app)
{
// Create world, view, and rect data
app->world = puglNewWorld(PUGL_PROGRAM, 0);
@@ -253,7 +253,7 @@ setupPugl(PuglTestApp* app, const PuglRect frame)
// Set up world and view
puglSetClassName(app->world, "PuglGL3Demo");
puglSetWindowTitle(app->view, "Pugl OpenGL 3");
- puglSetFrame(app->view, frame);
+ puglSetDefaultSize(app->view, defaultWidth, defaultHeight);
puglSetMinSize(app->view, defaultWidth / 4, defaultHeight / 4);
puglSetAspectRatio(app->view, 1, 1, 16, 9);
puglSetBackend(app->view, puglGlBackend());
@@ -389,8 +389,6 @@ main(int argc, char** argv)
app.glMajorVersion = 3;
app.glMinorVersion = 3;
- const PuglRect frame = {0, 0, defaultWidth, defaultHeight};
-
// Parse command line options
if (parseOptions(&app, argc, argv)) {
puglPrintTestUsage("pugl_shader_demo", "[NUM_RECTS] [GL_MAJOR]");
@@ -398,7 +396,7 @@ main(int argc, char** argv)
}
// Create and configure world and view
- setupPugl(&app, frame);
+ setupPugl(&app);
// Create window (which will send a PUGL_CREATE event)
const PuglStatus st = puglRealize(app.view);