glx: Trivial clean-ups to __glXSetArrayEnable

This commit is contained in:
Ian Romanick 2008-07-15 11:06:04 -07:00
parent f214a848ab
commit 67108adb48
1 changed files with 8 additions and 4 deletions

View File

@ -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 );