Add paint-deform-tiles option to CLUTTER_DEBUG

To make easier to visualize the triangles in a ClutterDeformEffect

https://bugzilla.gnome.org/show_bug.cgi?id=660354
This commit is contained in:
Tomeu Vizoso
2011-09-28 14:24:57 +02:00
parent 4f5ce6c165
commit 39db46123e
3 changed files with 24 additions and 2 deletions

View File

@ -290,6 +290,26 @@ clutter_deform_effect_paint_target (ClutterOffscreenEffect *effect)
cogl_set_backface_culling_enabled (FALSE);
else if (priv->back_material == COGL_INVALID_HANDLE && is_cull_enabled)
cogl_set_backface_culling_enabled (TRUE);
if (G_UNLIKELY (clutter_debug_flags & CLUTTER_DEBUG_PAINT_DEFORM_TILES))
{
cogl_set_source_color4f (1.0, 0, 0, 1.0);
cogl_vertex_buffer_draw_elements (priv->vbo,
COGL_VERTICES_MODE_LINE_STRIP,
priv->indices,
0,
n_tiles,
0,
priv->n_indices);
cogl_vertex_buffer_draw_elements (priv->vbo,
COGL_VERTICES_MODE_LINE_STRIP,
priv->back_indices,
0,
n_tiles,
0,
priv->n_indices);
}
}
static inline void