cogl: Use a CoglBitmask to store the list of used texcoord arrays

Instead of directly using a guint32 to store a bitmask for each used
texcoord array, it now stores them in a CoglBitmask. This removes the
limitation of 32 layers (although there are still other places in Cogl
that imply this restriction). To disable texcoord arrays code should
call _cogl_disable_other_texcoord_arrays which takes a bitmask of
texcoord arrays that should not be disabled. There are two extra
bitmasks stored in the CoglContext which are used temporarily for this
function to avoid allocating a new bitmask each time.

http://bugzilla.openedhand.com/show_bug.cgi?id=2132
This commit is contained in:
Neil Roberts
2010-05-24 12:40:11 +01:00
parent 4fb784d111
commit aaf5600b2d
8 changed files with 56 additions and 35 deletions

View File

@ -263,7 +263,8 @@ _cogl_add_path_to_stencil_buffer (CoglHandle path_handle,
GE (glStencilOp (GL_INVERT, GL_INVERT, GL_INVERT));
/* Disable all client texture coordinate arrays */
_cogl_disable_texcoord_arrays (ctx->texcoord_arrays_enabled);
_cogl_bitmask_clear_all (&ctx->temp_bitmask);
_cogl_disable_other_texcoord_arrays (&ctx->temp_bitmask);
while (path_start < path->data->path_nodes->len)
{