aboutsummaryrefslogtreecommitdiffstats
path: root/examples/pugl_gl3_demo.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/pugl_gl3_demo.c')
-rw-r--r--examples/pugl_gl3_demo.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/examples/pugl_gl3_demo.c b/examples/pugl_gl3_demo.c
index e0c63ca..26db852 100644
--- a/examples/pugl_gl3_demo.c
+++ b/examples/pugl_gl3_demo.c
@@ -1,5 +1,5 @@
/*
- Copyright 2012-2019 David Robillard <http://drobilla.net>
+ Copyright 2012-2020 David Robillard <http://drobilla.net>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
@@ -177,6 +177,9 @@ onEvent(PuglView* view, const PuglEvent* event)
case PUGL_CONFIGURE:
onConfigure(view, event->configure.width, event->configure.height);
break;
+ case PUGL_UPDATE:
+ puglPostRedisplay(view);
+ break;
case PUGL_EXPOSE: onExpose(view); break;
case PUGL_CLOSE: app->quit = 1; break;
case PUGL_KEY_PRESS:
@@ -411,8 +414,7 @@ main(int argc, char** argv)
// Grind away, drawing continuously
PuglFpsPrinter fpsPrinter = {puglGetTime(app.world)};
while (!app.quit) {
- puglPostRedisplay(app.view);
- puglDispatchEvents(app.world);
+ puglUpdate(app.world, 0.0);
puglPrintFps(app.world, &fpsPrinter, &app.framesDrawn);
}