diff options
author | Neil Roberts <neil@linux.intel.com> | 2010-12-03 17:46:16 +0000 |
---|---|---|
committer | Neil Roberts <neil@linux.intel.com> | 2010-12-13 17:28:29 +0000 |
commit | e38e9e03555ed8b3af3fb1fbc52767196cd3e481 (patch) | |
tree | 75081738e25af2d224974ffaeeb8029b582d1d91 /cogl/cogl-context.h | |
parent | 12b3d21aaac6f3091c7b23a34afdb67050a7a3ab (diff) | |
download | cogl-e38e9e03555ed8b3af3fb1fbc52767196cd3e481.tar.gz |
cogl-vertex-attribute: Use glVertexAttribPointer on GLES2
When the GLES2 wrapper is removed we can't use the fixed function API
such as glColorPointer to set the builtin attributes. Instead the GLSL
progend now maintains a cache of attribute locations that are queried
with glGetAttribLocation. The code that previously maintained a cache
of the enabled texture coord arrays has been modified to also cache
the enabled vertex attributes under GLES2. The vertex attribute API is
now the only place that is using this cache so it has been moved into
cogl-vertex-attribute.c
Diffstat (limited to 'cogl/cogl-context.h')
-rw-r--r-- | cogl/cogl-context.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cogl/cogl-context.h b/cogl/cogl-context.h index 3e553b40..b26dfbce 100644 --- a/cogl/cogl-context.h +++ b/cogl/cogl-context.h @@ -120,12 +120,14 @@ typedef struct GArray *pipeline0_nodes; GArray *pipeline1_nodes; - /* Bitmask of texture coordinates arrays that are enabled */ - CoglBitmask texcoord_arrays_enabled; + /* Bitmask of attributes enabled. On GLES2 these are the vertex + attribute numbers and on regular GL these are only used for the + texture coordinate arrays */ + CoglBitmask arrays_enabled; /* These are temporary bitmasks that are used when disabling texcoord arrays. They are here just to avoid allocating new ones each time */ - CoglBitmask texcoord_arrays_to_disable; + CoglBitmask arrays_to_change; CoglBitmask temp_bitmask; gboolean gl_blend_enable_cache; |