summaryrefslogtreecommitdiff
path: root/gtk/gtkglarea.h
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2014-10-30 18:22:44 +0100
committerAlexander Larsson <alexl@redhat.com>2014-10-30 21:04:29 +0100
commit5ea3a1028d7ce19b0411aeb9d72e4aab07fe8c31 (patch)
treebc4a00781abc3f884b26abbc27208719e20d4e61 /gtk/gtkglarea.h
parent869f300f0aefcff3b0302a9e4b7297e54f08c1dd (diff)
downloadgtk+-5ea3a1028d7ce19b0411aeb9d72e4aab07fe8c31.tar.gz
GtkGLArea: Major reworking
This restructures the way buffers are allocated and bound in a way that is more flexible. Buffer operation happens in three phases: create_buffer() - Creates the gl objects allocate_buffers() - Allocates space for the buffers at a given size attach_buffers() - Attaches the buffers to the framebuffer and makes the framebuffer the default drawing target And destroy via delete_buffers() We call all these the first draw, and after that we allocate buffers each time the widget changes size until the buffers are deleted. We delete the buffers at unrealize. However, anyone that wants to manually control buffer allocation strategies can manually call allocate/delete_buffers(). There are also some other changes: * Support for stencil buffers. * A manual render mode where ::draw doesn't render unless you manually invalidated the previous rendering.
Diffstat (limited to 'gtk/gtkglarea.h')
-rw-r--r--gtk/gtkglarea.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/gtk/gtkglarea.h b/gtk/gtkglarea.h
index 559389a029..511cede12e 100644
--- a/gtk/gtkglarea.h
+++ b/gtk/gtkglarea.h
@@ -95,10 +95,29 @@ void gtk_gl_area_set_has_depth_buffer (GtkGLArea *area,
gboolean has_depth_buffer);
GDK_AVAILABLE_IN_3_16
+gboolean gtk_gl_area_get_has_stencil_buffer (GtkGLArea *area);
+
+GDK_AVAILABLE_IN_3_16
+void gtk_gl_area_set_has_stencil_buffer (GtkGLArea *area,
+ gboolean has_stencil_buffer);
+
+GDK_AVAILABLE_IN_3_16
+gboolean gtk_gl_area_get_auto_render (GtkGLArea *area);
+GDK_AVAILABLE_IN_3_16
+void gtk_gl_area_set_auto_render (GtkGLArea *area,
+ gboolean auto_render);
+GDK_AVAILABLE_IN_3_16
+void gtk_gl_area_queue_render (GtkGLArea *area);
+
+
+GDK_AVAILABLE_IN_3_16
GdkGLContext * gtk_gl_area_get_context (GtkGLArea *area);
GDK_AVAILABLE_IN_3_16
void gtk_gl_area_make_current (GtkGLArea *area);
+GDK_AVAILABLE_IN_3_16
+void gtk_gl_area_attach_buffers (GtkGLArea *area);
+
G_END_DECLS