Virtualize GL matrix operations and use a client-side matrix when GL is indirect

This is useful because sometimes we need to get the current matrix, which
is too expensive when indirect rendering.

In addition, this virtualization makes it easier to clean up the API in
the future.
This commit is contained in:
Havoc Pennington
2009-02-24 13:51:25 -05:00
committed by Robert Bragg
parent c418b23baf
commit 08932584b5
24 changed files with 1318 additions and 454 deletions

View File

@ -1621,6 +1621,8 @@ cogl_vertex_buffer_draw (CoglHandle handle,
enable_state_for_drawing_buffer (buffer);
_cogl_current_matrix_state_flush ();
/* FIXME: flush cogl cache */
GE (glDrawArrays (mode, first, count));
@ -1647,6 +1649,8 @@ cogl_vertex_buffer_draw_elements (CoglHandle handle,
enable_state_for_drawing_buffer (buffer);
_cogl_current_matrix_state_flush ();
/* FIXME: flush cogl cache */
GE (glDrawRangeElements (mode, min_index, max_index,
count, indices_type, indices));