[cogl-gles2-wrapper] Convert texture unit settings to be a static sized array
authorNeil Roberts <neil@linux.intel.com>
Fri, 20 Feb 2009 15:56:57 +0000 (15:56 +0000)
committerNeil Roberts <neil@linux.intel.com>
Fri, 20 Feb 2009 15:59:13 +0000 (15:59 +0000)
commitb0df99fbad39b56bbe65b61063d30c3013debd0f
tree65dc05d875b253f1bee8ea08b054d4c3129a7dd1
parent21aa09748c95912de5f32fdaa84183c3e8b0f412
[cogl-gles2-wrapper] Convert texture unit settings to be a static sized array

Previously the texture unit settings were stored in growable GArrays
and every time a new texture unit was encountered it would expand the
arrays. However the array wasn't copied when stored in a
CoglGles2WrapperSettings struct so all settings had the same
array. This meant that it wouldn't detect that a different program is
needed if a texture unit is disabled or enabled.

The texture unit settings arrays are all now a fixed size and the
enabledness of each unit is stored in a bit mask. Therefore the
settings can just be copied around by assignment as before.

This puts a limit on the number of texture units accessible by Cogl
but I think it is worth it to make the code simpler and more
efficient. The material API already poses a limit on the number of
texture units it can use.
clutter/cogl/gles/cogl-gles2-wrapper.c
clutter/cogl/gles/cogl-gles2-wrapper.h