summaryrefslogtreecommitdiff
path: root/src/glx
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2008-07-15 11:06:04 -0700
committerIan Romanick <ian.d.romanick@intel.com>2008-07-15 11:06:04 -0700
commit67108adb48f3be927d7fb92ba8f6bd5c9d165222 (patch)
tree93cab6ded2b62b153e26d299b518153c011d9b4e /src/glx
parentf214a848abb7cefb3d2c0bb7d172d54deeb05308 (diff)
glx: Trivial clean-ups to __glXSetArrayEnable
Diffstat (limited to 'src/glx')
-rw-r--r--src/glx/x11/indirect_vertex_array.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/glx/x11/indirect_vertex_array.c b/src/glx/x11/indirect_vertex_array.c
index 09d7244ba9..769c88f4d2 100644
--- a/src/glx/x11/indirect_vertex_array.c
+++ b/src/glx/x11/indirect_vertex_array.c
@@ -1601,17 +1601,21 @@ void __indirect_glClientActiveTextureARB(GLenum texture)
/**
+ * Modify the enable state for the selected array
*/
GLboolean
-__glXSetArrayEnable( __GLXattribute * state,
- GLenum key, unsigned index, GLboolean enable )
+__glXSetArrayEnable(__GLXattribute *state, GLenum key, unsigned index,
+ GLboolean enable)
{
struct array_state_vector * arrays = state->array_state;
struct array_state * a;
- if ( key == GL_TEXTURE_COORD_ARRAY ) {
- index = arrays->active_texture_unit;
+ /* Texture coordinate arrays have an implict index set when the
+ * application calls glClientActiveTexture.
+ */
+ if (key == GL_TEXTURE_COORD_ARRAY) {
+ index = arrays->active_texture_unit;
}
a = get_array_entry( arrays, key, index );