Document side effect of GLArea:has-depth-buffer
authorEmmanuele Bassi <ebassi@gnome.org>
Fri, 7 Jan 2022 18:30:54 +0000 (18:30 +0000)
committerEmmanuele Bassi <ebassi@gnome.org>
Fri, 7 Jan 2022 18:30:54 +0000 (18:30 +0000)
We enable depth testing when creating a depth buffer.

Fixes: #838
gtk/gtkglarea.c

index de7cc7fa0fd55f690fff8e535de942f9869c2e9c..af4d46ec91a22173882b384c2cbc02ecfea3328a 100644 (file)
@@ -833,6 +833,10 @@ gtk_gl_area_class_init (GtkGLAreaClass *klass)
    *
    * If set to %TRUE the widget will allocate and enable a depth buffer for the
    * target framebuffer.
+   *
+   * Setting this property will enable GL's depth testing as a side effect. If
+   * you don't need depth testing, you should call `glDisable(GL_DEPTH_TEST)`
+   * in your `GtkGLArea::render` handler.
    */
   obj_props[PROP_HAS_DEPTH_BUFFER] =
     g_param_spec_boolean ("has-depth-buffer",