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 /doc/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 'doc/c')
-rw-r--r-- | doc/c/events.rst | 8 | ||||
-rw-r--r-- | doc/c/view.rst | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/doc/c/events.rst b/doc/c/events.rst index 86f7c63..804c724 100644 --- a/doc/c/events.rst +++ b/doc/c/events.rst @@ -24,9 +24,9 @@ For example, a basic event handler might look something like this: MyApp* app = (MyApp*)puglGetHandle(view); switch (event->type) { - case PUGL_CREATE: + case PUGL_REALIZE: return setupGraphics(app); - case PUGL_DESTROY: + case PUGL_UNREALIZE: return teardownGraphics(app); case PUGL_CONFIGURE: return resize(app, event->configure.width, event->configure.height); @@ -69,8 +69,8 @@ OpenGL Context The OpenGL context is only active during the handling of these events: -- :struct:`PuglCreateEvent` -- :struct:`PuglDestroyEvent` +- :struct:`PuglRealizeEvent` +- :struct:`PuglUnrealizeEvent` - :struct:`PuglConfigureEvent` - :struct:`PuglExposeEvent` diff --git a/doc/c/view.rst b/doc/c/view.rst index faf926f..ea261ff 100644 --- a/doc/c/view.rst +++ b/doc/c/view.rst @@ -167,8 +167,8 @@ If you need to perform some setup using the OpenGL API, there are two ways to do so. The OpenGL context is active when -:enumerator:`PUGL_CREATE <PuglEventType.PUGL_CREATE>` and -:enumerator:`PUGL_DESTROY <PuglEventType.PUGL_DESTROY>` +:enumerator:`PUGL_REALIZE <PuglEventType.PUGL_REALIZE>` and +:enumerator:`PUGL_UNREALIZE <PuglEventType.PUGL_UNREALIZE>` events are dispatched, so things like creating and destroying shaders and textures can be done then. |