diff options
author | David Robillard <d@drobilla.net> | 2023-01-07 19:27:05 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-01-07 19:27:05 -0500 |
commit | ba11bb80c96fc9c9124ba2fa929425f558f86824 (patch) | |
tree | 00ecd9857e672a101d722d86ef22a9cb48f8f827 /examples/pugl_shader_demo.c | |
parent | 28631e2b202e661084039464f45228b9ce323a8f (diff) | |
download | pugl-ba11bb80c96fc9c9124ba2fa929425f558f86824.tar.gz pugl-ba11bb80c96fc9c9124ba2fa929425f558f86824.tar.bz2 pugl-ba11bb80c96fc9c9124ba2fa929425f558f86824.zip |
Rename create/destroy events to realize/unrealize
As evidence that this was confusing, the documentation for these was an
outright lie, and I've burned quite a bit of time in the past few days trying
to rework things based around that flawed understanding.
These names make it clear what these events actually are. If we need actual
create/destroy events with a broader scope, they'll have to be added, but I
suspect those aren't actually useful anyway.
Diffstat (limited to 'examples/pugl_shader_demo.c')
-rw-r--r-- | examples/pugl_shader_demo.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/pugl_shader_demo.c b/examples/pugl_shader_demo.c index e3a1900..cea6d0a 100644 --- a/examples/pugl_shader_demo.c +++ b/examples/pugl_shader_demo.c @@ -131,10 +131,10 @@ onEvent(PuglView* view, const PuglEvent* event) printEvent(event, "Event: ", app->opts.verbose); switch (event->type) { - case PUGL_CREATE: + case PUGL_REALIZE: setupGl(app); break; - case PUGL_DESTROY: + case PUGL_UNREALIZE: teardownGl(app); break; case PUGL_CONFIGURE: @@ -445,7 +445,7 @@ main(int argc, char** argv) // Create and configure world and view setupPugl(&app); - // Create window (which will send a PUGL_CREATE event) + // Realize window (which will send a PUGL_REALIZE event) const PuglStatus st = puglRealize(app.view); if (st) { return logError("Failed to create window (%s)\n", puglStrerror(st)); @@ -463,7 +463,7 @@ main(int argc, char** argv) puglPrintFps(app.world, &fpsPrinter, &app.framesDrawn); } - // Destroy window (which will send a PUGL_DESTROY event) + // Destroy window (which will send a PUGL_UNREALIZE event) puglFreeView(app.view); // Free everything else |