glEnableClientState

enable or disable client-side capability

Signature

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

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.
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/scenegraph/spherebackground.py Lines: 59, 60
OpenGLContext OpenGLContext/scenegraph/pointset.py Lines: 80, 89
OpenGLContext OpenGLContext/scenegraph/text/toolsfont.py Lines: 35, 171
OpenGLContext OpenGLContext/shadow/volume.py Lines: 289, 298, 308
OpenGLContext tests/ilsstrategies.py Lines: 38
OpenGLContext tests/shader_3.py Lines: 174, 175
OpenGLContext tests/shader_2.py Lines: 188, 189
OpenGLContext tests/shader_4_subset.py Lines: 75, 76
OpenGLContext tests/shader_1.py Lines: 276
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson45.py Lines: 442, 443
OpenGL-Demo PyOpenGL-Demo/da/dots.py Lines: 60
{LGPL} Pyggel pyggel/data.py Lines: 262, 263, 264, 265, 388, 389, 390, 391
{LGPL} pygl2d pygl2d/draw.py Lines: 91
Gloopy gloopy/view/render.py Lines: 164, 165
Visvis wobjects/polygonalModeling.py Lines: 1069, 1070, 1071, 1072
Visvis wobjects/textures.py Lines: 966, 967
Visvis text/text_base.py Lines: 268, 269
Visvis functions/boxplot.py Lines: 335
Visvis functions/bar.py Lines: 181
Visvis wibjects/sliders.py Lines: 404, 462
Visvis wibjects/colorWibjects.py Lines: 558, 758
Visvis utils/cropper.py Lines: 410, 432
Visvis core/line.py Lines: 702, 808, 855
Visvis core/baseWibjects.py Lines: 200
Visvis core/axises.py Lines: 810, 841, 2032
glEnableClientState
OpenGLContext OpenGLContext/scenegraph/box.py Lines: 36, 38, 41
OpenGLContext OpenGLContext/scenegraph/spherebackground.py Lines: 42, 43
OpenGLContext OpenGLContext/scenegraph/indexedpolygons.py Lines: 29, 39, 54, 63, 77, 96, 115, 128
OpenGLContext OpenGLContext/scenegraph/arraygeometry.py Lines: 146, 152, 157, 165
OpenGLContext OpenGLContext/scenegraph/quadrics.py Lines: 50, 54, 57
OpenGLContext OpenGLContext/scenegraph/pointset.py Lines: 50, 67
OpenGLContext OpenGLContext/scenegraph/text/toolsfont.py Lines: 22, 166
OpenGLContext OpenGLContext/shadow/volume.py Lines: 284, 296, 304
OpenGLContext tests/ilsstrategies.py Lines: 29
OpenGLContext tests/shader_3.py Lines: 167, 168
OpenGLContext tests/gldrawarrays.py Lines: 17, 18
OpenGLContext tests/gldrawelements_list.py Lines: 53
OpenGLContext tests/shader_2.py Lines: 146, 147
OpenGLContext tests/glarrayelement.py Lines: 18, 19
OpenGLContext tests/shader_2_c_void_p.py Lines: 59, 60
OpenGLContext tests/line_stipple.py Lines: 33, 34
OpenGLContext tests/gldrawarrays_string.py Lines: 17, 18
OpenGLContext tests/gldrawelements.py Lines: 16
OpenGLContext tests/shader_sphere.py Lines: 88, 89, 90, 100, 101, 102
OpenGLContext tests/gldrawelements_string.py Lines: 23
OpenGLContext tests/shader_4_subset.py Lines: 68, 69
OpenGLContext tests/shader_1.py Lines: 258
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson45.py Lines: 408, 409
OpenGL-Demo PyOpenGL-Demo/da/dots.py Lines: 58
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/arraytest.py Lines: 42, 43
OpenGL-Demo PyOpenGL-Demo/tom/poly.py Lines: 53, 54
OpenGL-Demo PyOpenGL-Demo/tom/arraytest.py Lines: 52, 53
{LGPL} Pyggel pyggel/data.py Lines: 250, 251, 252, 253, 370, 374, 378, 382
{LGPL} pygl2d pygl2d/draw.py Lines: 88
Gloopy gloopy/view/render.py Lines: 159, 160
Visvis wobjects/polygonalModeling.py Lines: 950, 954, 968, 975, 985
Visvis wobjects/textures.py Lines: 957, 958
Visvis text/text_base.py Lines: 254, 255
Visvis functions/boxplot.py Lines: 331
Visvis functions/bar.py Lines: 152
Visvis wibjects/sliders.py Lines: 397, 459
Visvis wibjects/colorWibjects.py Lines: 536, 755
Visvis utils/cropper.py Lines: 365, 420
Visvis core/line.py Lines: 665, 733, 825
Visvis core/baseWibjects.py Lines: 197
Visvis core/axises.py Lines: 785, 828, 2013
{GPL3} OpenGL-Programmable 05-shader.py Lines: 145, 146, 147, 148
{GPL3} OpenGL-Programmable 03-array.py Lines: 78, 79, 80, 81
{GPL3} OpenGL-Programmable 06-perpixel.py Lines: 153, 154, 155, 156
{GPL3} OpenGL-Programmable 04-vbo.py Lines: 79, 80, 81, 82