glarea: Add some details to the docs

Mention that the rendering is integrated into the GTK scene graph
as a texture and that the initial framebuffer contents are
transparent.

Fixes: #6317
This commit is contained in:
Matthias Clasen 2024-01-12 21:58:44 -05:00
parent df2cdb6913
commit 9c228cc634

View File

@ -47,6 +47,8 @@
* `GtkGLArea` sets up its own [class@Gdk.GLContext], and creates a custom
* GL framebuffer that the widget will do GL rendering onto. It also ensures
* that this framebuffer is the default GL rendering target when rendering.
* The completed rendering is integrated into the larger GTK scene graph as
* a texture.
*
* In order to draw, you have to connect to the [signal@Gtk.GLArea::render]
* signal, or subclass `GtkGLArea` and override the GtkGLAreaClass.render
@ -64,6 +66,8 @@
* The `render()` function will be called when the `GtkGLArea` is ready
* for you to draw its content:
*
* The initial contents of the framebuffer are transparent.
*
* ```c
* static gboolean
* render (GtkGLArea *area, GdkGLContext *context)