[cogl-vertex-buffers] Support putting index arrays into VBOS

It's now possible to add arrays of indices to a Cogl vertex buffer and
they will be put into an OpenGL vertex buffer object. Since it's quite
common for index arrays to be static it saves the OpenGL driver from
having to validate them repeatedly.

This changes the cogl_vertex_buffer_draw_elements API: It's no longer
possible to provide a pointer to an index array at draw time. So
cogl_vertex_buffer_draw_elements now takes an indices identifier that
should correspond to an idendifier returned when calling
cogl_vertex_buffer_add_indices ()
This commit is contained in:
Robert Bragg
2009-05-24 04:04:38 +01:00
parent 68214fe4b8
commit 6bb6686666
5 changed files with 244 additions and 48 deletions

View File

@@ -307,6 +307,8 @@ cogl_vertex_buffer_submit
cogl_vertex_buffer_disable
cogl_vertex_buffer_enable
cogl_vertex_buffer_draw
CoglIndicesType
cogl_vertex_buffer_add_indices
cogl_vertex_buffer_draw_elements
<SUBSECTION Private>
CoglVertexBufferAttribFlags