guint n_rects);
/**
+ * cogl_rectangles:
+ * @verts: an array of vertices
+ * @n_rects: number of rectangles to draw
+ *
+ * Draws a series of rectangles in the same way that
+ * cogl_rectangle() does. In some situations it can give a
+ * significant performance boost to use this function rather than
+ * calling cogl_rectangle() separately for each rectangle.
+ *
+ * @verts should point to an array of #float<!-- -->s with
+ * @n_rects * 8 elements. Each group of 4 values corresponds to the
+ * parameters x1, y1, x2, and y2, and have the same
+ * meaning as in cogl_rectangle().
+ *
+ * Since: 1.0
+ */
+void cogl_rectangles (const float *verts,
+ guint n_rects);
+
+
+/**
* cogl_polygon:
* @vertices: An array of #CoglTextureVertex structs
* @n_vertices: The length of the vertices array
}
void
+cogl_rectangles (const float *verts,
+ guint n_rects)
+{
+ struct _CoglMutiTexturedRect rects[n_rects];
+ int i;
+
+ for (i = 0; i < n_rects; i++)
+ {
+ rects[i].x_1 = verts[i * 4];
+ rects[i].y_1 = verts[i * 4 + 1];
+ rects[i].x_2 = verts[i * 4 + 2];
+ rects[i].y_2 = verts[i * 4 + 3];
+ rects[i].tex_coords = NULL;
+ rects[i].tex_coords_len = 0;
+ }
+
+ _cogl_rectangles_with_multitexture_coords (rects, n_rects);
+}
+
+void
cogl_rectangles_with_texture_coords (const float *verts,
guint n_rects)
{
_cogl_journal_flush ();
}
+void
+cogl_rectangles (const float *verts,
+ guint n_rects)
+{
+ struct _CoglMutiTexturedRect rects[n_rects];
+ int i;
+
+ for (i = 0; i < n_rects; i++)
+ {
+ rects[i].x_1 = verts[i * 4];
+ rects[i].y_1 = verts[i * 4 + 1];
+ rects[i].x_2 = verts[i * 4 + 2];
+ rects[i].y_2 = verts[i * 4 + 3];
+ rects[i].tex_coords = NULL;
+ rects[i].tex_coords_len = 0;
+ }
+
+ _cogl_rectangles_with_multitexture_coords (rects, n_rects);
+}
void
cogl_rectangles_with_texture_coords (const float *verts,