diff --git a/clutter/cogl/cogl.h.in b/clutter/cogl/cogl.h.in index b3b0584b0..bd3698312 100644 --- a/clutter/cogl/cogl.h.in +++ b/clutter/cogl/cogl.h.in @@ -325,9 +325,9 @@ void cogl_enable_depth_test (gboolean setting); * * Sets whether textures positioned so that their backface is showing * should be hidden. This can be used to efficiently draw two-sided - * textures or fully closed cubes without enabling depth testing. Only - * calls to cogl_texture_rectangle() and cogl_texture_polygon() are - * affected. Backface culling is disabled by default. + * textures or fully closed cubes without enabling depth testing. This + * only affects calls to the cogl_rectangle* family of functions and + * cogl_vertex_buffer_draw*. Backface culling is disabled by default. */ void cogl_enable_backface_culling (gboolean setting); diff --git a/clutter/cogl/common/cogl-vertex-buffer.c b/clutter/cogl/common/cogl-vertex-buffer.c index b7e004a49..28c9df46b 100644 --- a/clutter/cogl/common/cogl-vertex-buffer.c +++ b/clutter/cogl/common/cogl-vertex-buffer.c @@ -1647,6 +1647,9 @@ enable_state_for_drawing_buffer (CoglVertexBuffer *buffer) enable_flags |= cogl_material_get_cogl_enable_flags (ctx->source_material); + if (ctx->enable_backface_culling) + enable_flags |= COGL_ENABLE_BACKFACE_CULLING; + cogl_enable (enable_flags); }