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

glEnableClientState

enable or disable client-side capability

Signature

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

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 tests/shader_2.py Lines: 187, 188
OpenGLContext tests/shader_1.py Lines: 276
OpenGLContext tests/shader_3.py Lines: 174, 175
OpenGLContext OpenGLContext/shadow/volume.py Lines: 289, 298, 308
OpenGLContext OpenGLContext/scenegraph/pointset.py Lines: 80, 89
OpenGLContext OpenGLContext/scenegraph/spherebackground.py Lines: 58, 59
OpenGLContext OpenGLContext/scenegraph/text/toolsfont.py Lines: 35, 167
OpenGL-Demo PyOpenGL-Demo/da/dots.py Lines: 60
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson45.py Lines: 457, 458
{LGPL} Pyggel pyggel/data.py Lines: 262, 263, 264, 265, 388, 389, 390, 391
Gloopy gloopy/view/render.py Lines: 164, 165
Visvis utils/cropper.py Lines: 414, 436
Visvis core/line.py Lines: 698, 803, 850
Visvis core/axises.py Lines: 810, 841, 2032
Visvis core/baseWibjects.py Lines: 200
Visvis functions/boxplot.py Lines: 328
Visvis functions/bar.py Lines: 155
Visvis text/text_base.py Lines: 267, 268
Visvis wobjects/textures.py Lines: 963, 964
Visvis wobjects/polygonalModeling.py Lines: 1064, 1065, 1066, 1067
Visvis wibjects/sliders.py Lines: 356, 413
Visvis wibjects/colorWibjects.py Lines: 558, 758
glEnableClientState
OpenGLContext tests/line_stipple.py Lines: 34, 35
OpenGLContext tests/gldrawelements_string.py Lines: 24
OpenGLContext tests/gldrawarrays.py Lines: 18, 19
OpenGLContext tests/shader_2_c_void_p.py Lines: 59, 60
OpenGLContext tests/gldrawarrays_string.py Lines: 16, 17
OpenGLContext tests/shader_2.py Lines: 145, 146
OpenGLContext tests/gldrawelements.py Lines: 18
OpenGLContext tests/twitchtest.py Lines: 26, 27
OpenGLContext tests/gldrawelements_list.py Lines: 54
OpenGLContext tests/glarrayelement.py Lines: 19, 20
OpenGLContext tests/shader_1.py Lines: 258
OpenGLContext tests/shader_3.py Lines: 167, 168
OpenGLContext tests/shader_sphere.py Lines: 88, 89, 90, 100, 101, 102
OpenGLContext OpenGLContext/shadow/volume.py Lines: 284, 296, 304
OpenGLContext OpenGLContext/scenegraph/pointset.py Lines: 50, 67
OpenGLContext OpenGLContext/scenegraph/box.py Lines: 36, 38, 41
OpenGLContext OpenGLContext/scenegraph/indexedpolygons.py Lines: 29, 39, 54, 63, 82, 96, 115, 128
OpenGLContext OpenGLContext/scenegraph/spherebackground.py Lines: 40, 41
OpenGLContext OpenGLContext/scenegraph/quadrics.py Lines: 48, 52, 55
OpenGLContext OpenGLContext/scenegraph/arraygeometry.py Lines: 146, 152, 157, 165
OpenGLContext OpenGLContext/scenegraph/text/toolsfont.py Lines: 22, 162
OpenGL-Demo PyOpenGL-Demo/da/dots.py Lines: 58
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/arraytest.py Lines: 46, 47
OpenGL-Demo PyOpenGL-Demo/tom/arraytest.py Lines: 54, 55
OpenGL-Demo PyOpenGL-Demo/tom/poly.py Lines: 56, 57
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson45.py Lines: 423, 424
{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
Gloopy gloopy/view/render.py Lines: 159, 160
Visvis utils/cropper.py Lines: 369, 424
Visvis core/line.py Lines: 665, 728, 820
Visvis core/axises.py Lines: 785, 828, 2013
Visvis core/baseWibjects.py Lines: 197
Visvis functions/boxplot.py Lines: 324
Visvis functions/bar.py Lines: 126
Visvis text/text_base.py Lines: 253, 254
Visvis wobjects/textures.py Lines: 954, 955
Visvis wobjects/polygonalModeling.py Lines: 949, 953, 967, 974, 984
Visvis wibjects/sliders.py Lines: 349, 410
Visvis wibjects/colorWibjects.py Lines: 536, 755
Previous: glEnable Table of Contents (GL) Next: glEnableVertexAttribArray