glEnableClientState, glDisableClientState

[New - Windows 95, OEM Service Release 2]

The glEnableClientState and glDisableClientState functions enable and disable arrays respectively.

void glEnableClientState(

    GLenum array

 

   );

 

 

void glDisableClientState(

    GLenum array

 

   );

 

 

Parameters

array

A symbolic constant for the array you want to enable or disable. This parameter can assume one of the following values:

GL_COLOR_ARRAY

If enabled, use color arrays with calls to glArrayElementMRW2UC, glDrawElementsCLEUL1, or glDrawArrays08Q9TG. See also glColorPointer2FWM7CO.

GL_EDGE_FLAG_ARRAY

If enabled, use edge flag arrays with calls to glArrayElementMRW2UC, glDrawElementsCLEUL1, or glDrawArrays08Q9TG. See also glEdgeFlagPointerDGLC.G.

GL_INDEX_ARRAY

If enabled, use index arrays with calls to glArrayElementMRW2UC, glDrawElementsCLEUL1, or glDrawArrays08Q9TG. See also glIndexPointer17VGIZ0.

GL_NORMAL_ARRAY

If enabled, use normal arrays with calls to glArrayElementMRW2UC, glDrawElementsCLEUL1, or glDrawArrays08Q9TG. See also glNormalPointer8QF0WU.

GL_TEXTURE_COORD_ARRAY

If enabled, use texture coordinate arrays with calls to glArrayElementMRW2UC, glDrawElementsCLEUL1, or glDrawArrays08Q9TG. See also glTexCoordPointerIYS25F.

GL_VERTEX_ARRAY

If enabled, use vertex arrays with calls to glArrayElementMRW2UC, glDrawElementsCLEUL1, or glDrawArrays08Q9TG. See also glVertexPointer32FZ_60.

 

Remarks

The glEnableClientState and glDisableClientState functions enable and disable various individual arrays. Use glIsEnabled1MZ_ZK. or glGet8KNKTW to determine the current setting of any capability.

Calling glEnableClientState and glDisableClientState between calls to glBegin and the corresponding call to glEnd can cause an error. If no error is generated, the behavior is undefined.

 

Note  The glEnableClientState and glDisableClientState functions are only available in OpenGL version 1.1 or later.

 

Error Codes

The following is the error code generated and its condition.

Error Code

Condition

GL_INVALID_ENUM

array was not an accepted value.

 

See Also

glArrayElement, glBegin, glColorPointer, glDrawArrays, glDrawElements, glEdgeFlagPointer, glEnable, glEnd, glGetPointerv, glIndexPointer, glInterleavedArrays, glNormalPointer, glTexCoordPointer, glVertexPointer