Previous: glEnable Table of Contents (GL) Next: glEnableVertexAttribArray

glEnableClientState

enable or disable client-side capability

Deprecation Notice

Note that this function has been marked deprecated in the OpenGL 3.0 specification. You should not be using this function in new code, though it will likely be supported by most implementations via the GL_ARB_compatibility extension. For more information on OpenGL 3.x deprecations, see the deprecations page.

Signature

glDisableClientState( GLenum ( cap ) )-> void
glDisableClientState( array )
glDisableClientState( GLenum(array) ) -> None
glEnableClientState( GLenum ( cap ) )-> void
glEnableClientState( array )
glEnableClientState( GLenum(array) ) -> None

Parameters

VariablesDescription
cap
Specifies the capability to enable. Symbolic constants GL_COLOR_ARRAY , GL_EDGE_FLAG_ARRAY , GL_FOG_COORD_ARRAY , GL_INDEX_ARRAY , GL_NORMAL_ARRAY , GL_SECONDARY_COLOR_ARRAY , GL_TEXTURE_COORD_ARRAY , and GL_VERTEX_ARRAY are accepted.

Parameters

cap
Specifies the capability to disable.

Description

glEnableClientState and glDisableClientState enable or disable individual client-side capabilities. By default, all client-side capabilities are disabled. Both glEnableClientState and glDisableClientState take a single argument, cap , which can assume one of the following values:
GL_COLOR_ARRAY
If enabled, the color array is enabled for writing and used during rendering when glArrayElement , glDrawArrays , glDrawElements , glDrawRangeElements glMultiDrawArrays , or glMultiDrawElements is called. See glColorPointer .
GL_EDGE_FLAG_ARRAY
If enabled, the edge flag array is enabled for writing and used during rendering when glArrayElement , glDrawArrays , glDrawElements , glDrawRangeElements glMultiDrawArrays , or glMultiDrawElements is called. See glEdgeFlagPointer .
GL_FOG_COORD_ARRAY
If enabled, the fog coordinate array is enabled for writing and used during rendering when glArrayElement , glDrawArrays , glDrawElements , glDrawRangeElements glMultiDrawArrays , or glMultiDrawElements is called. See glFogCoordPointer .
GL_INDEX_ARRAY
If enabled, the index array is enabled for writing and used during rendering when glArrayElement , glDrawArrays , glDrawElements , glDrawRangeElements glMultiDrawArrays , or glMultiDrawElements is called. See glIndexPointer .
GL_NORMAL_ARRAY
If enabled, the normal array is enabled for writing and used during rendering when glArrayElement , glDrawArrays , glDrawElements , glDrawRangeElements glMultiDrawArrays , or glMultiDrawElements is called. See glNormalPointer .
GL_SECONDARY_COLOR_ARRAY
If enabled, the secondary color array is enabled for writing and used during rendering when glArrayElement , glDrawArrays , glDrawElements , glDrawRangeElements glMultiDrawArrays , or glMultiDrawElements is called. See glColorPointer .
GL_TEXTURE_COORD_ARRAY
If enabled, the texture coordinate array is enabled for writing and used during rendering when glArrayElement , glDrawArrays , glDrawElements , glDrawRangeElements glMultiDrawArrays , or glMultiDrawElements is called. See glTexCoordPointer .
GL_VERTEX_ARRAY
If enabled, the vertex array is enabled for writing and used during rendering when glArrayElement , glDrawArrays , glDrawElements , glDrawRangeElements glMultiDrawArrays , or glMultiDrawElements is called. See glVertexPointer .

Notes

glEnableClientState is available only if the GL version is 1.1 or greater.
GL_FOG_COORD_ARRAY and GL_SECONDARY_COLOR_ARRAY are available only if the GL version is 1.4 or greater.
For OpenGL versions 1.3 and greater, or when
ARB_multitexture
is supported, enabling and disabling GL_TEXTURE_COORD_ARRAY affects the active client texture unit. The active client texture unit is controlled with glClientActiveTexture .

Errors

GL_INVALID_ENUM is generated if cap is not an accepted value.
glEnableClientState is not allowed between the execution of glBegin and the corresponding glEnd , but an error may or may not be generated. If no error is generated, the behavior is undefined.

See Also

Sample Code References

The following code samples have been found which appear to reference the functions described here. Take care that the code may be old, broken or not even use PyOpenGL.

glDisableClientState
OpenGLContext OpenGLContext/shadow/volume.py Lines: 287, 296, 306
OpenGLContext OpenGLContext/scenegraph/spherebackground.py Lines: 58, 59
OpenGLContext OpenGLContext/scenegraph/pointset.py Lines: 79, 88
OpenGLContext OpenGLContext/scenegraph/text/toolsfont.py Lines: 34, 166
OpenGLContext tests/shader_1.py Lines: 276
OpenGLContext tests/ativertexarrayobject.py Lines: 102, 103
OpenGLContext tests/shader_3.py Lines: 174, 175
OpenGLContext tests/shader_2.py Lines: 187, 188
OpenGL-Demo PyOpenGL-Demo/da/dots.py Lines: 61
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson45.py Lines: 456, 457
{LGPL} Pyggel pyggel/data.py Lines: 262, 263, 264, 265, 388, 389, 390, 391
glEnableClientState
OpenGLContext OpenGLContext/shadow/volume.py Lines: 282, 294, 302
OpenGLContext OpenGLContext/scenegraph/quadrics.py Lines: 48, 52, 55
OpenGLContext OpenGLContext/scenegraph/spherebackground.py Lines: 40, 41
OpenGLContext OpenGLContext/scenegraph/indexedpolygons.py Lines: 28, 38, 53, 62, 81, 95, 114, 127
OpenGLContext OpenGLContext/scenegraph/pointset.py Lines: 49, 66
OpenGLContext OpenGLContext/scenegraph/box.py Lines: 36, 38, 41
OpenGLContext OpenGLContext/scenegraph/arraygeometry.py Lines: 145, 151, 156, 164
OpenGLContext OpenGLContext/scenegraph/text/toolsfont.py Lines: 21, 161
OpenGLContext tests/shader_2_c_void_p.py Lines: 59, 60
OpenGLContext tests/shader_1.py Lines: 258
OpenGLContext tests/gldrawelements_list.py Lines: 54
OpenGLContext tests/glarrayelement.py Lines: 19, 20
OpenGLContext tests/shader_sphere.py Lines: 88, 89, 90, 100, 101, 102
OpenGLContext tests/gldrawarrays.py Lines: 18, 19
OpenGLContext tests/ativertexarrayobject.py Lines: 76, 77
OpenGLContext tests/gldrawelements_string.py Lines: 24
OpenGLContext tests/heightmap.py Lines: 52
OpenGLContext tests/gldrawelements.py Lines: 18
OpenGLContext tests/shader_3.py Lines: 167, 168
OpenGLContext tests/gldrawarrays_string.py Lines: 16, 17
OpenGLContext tests/shader_2.py Lines: 145, 146
OpenGL-Demo PyOpenGL-Demo/tom/poly.py Lines: 62, 63
OpenGL-Demo PyOpenGL-Demo/tom/arraytest.py Lines: 60, 61
OpenGL-Demo PyOpenGL-Demo/da/dots.py Lines: 59
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson45.py Lines: 422, 423
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/arraytest.py Lines: 46, 47
{GPL} GLChess src/lib/scene/opengl/new_models.py Lines: 260, 261, 262
{LGPL} Pyggel pyggel/data.py Lines: 250, 251, 252, 253, 370, 374, 378, 382
Previous: glEnable Table of Contents (GL) Next: glEnableVertexAttribArray