Use GL_QUADS for flushing a quad batch

Instead of using GL_TRIANGLES and uploading the indices every time, it
now uses GL_QUADS instead on OpenGL. Under GLES it still uses indices
but it uses the new cogl_vertex_buffer_indices_get_for_quads function
to avoid uploading the vertices every time.

This requires the _cogl_vertex_buffer_indices_pointer_from_handle
function to be exposed privately to the rest of Cogl.

The static_indices array has been removed from the Cogl context.
This commit is contained in:
Neil Roberts
2009-06-01 17:10:22 +01:00
parent 39cb36ba01
commit 9d41a27f61
6 changed files with 25 additions and 58 deletions

View File

@ -161,5 +161,9 @@ typedef struct _CoglVertexBuffer
} CoglVertexBuffer;
CoglVertexBuffer *_cogl_vertex_buffer_pointer_from_handle (CoglHandle handle);
CoglVertexBufferIndices *
_cogl_vertex_buffer_indices_pointer_from_handle (CoglHandle handle);
#endif /* __COGL_VERTEX_BUFFER_H */