Previous: glEnableClientState Table of Contents (GL) Next: glEvalCoord

glEnableVertexAttribArray

Enable or disable a generic vertex attribute array

Signature

glDisableVertexAttribArray( GLuint ( index ) )-> void
glDisableVertexAttribArray( index )
glEnableVertexAttribArray( GLuint ( index ) )-> void
glEnableVertexAttribArray( index )

Parameters

VariablesDescription
index
Specifies the index of the generic vertex attribute to be enabled or disabled.

Description

glEnableVertexAttribArray enables the generic vertex attribute array specified by index . glDisableVertexAttribArray disables the generic vertex attribute array specified by index . By default, all client-side capabilities are disabled, including all generic vertex attribute arrays. If enabled, the values in the generic vertex attribute array will be accessed and used for rendering when calls are made to vertex array commands such as glDrawArrays , glDrawElements , glDrawRangeElements , glMultiDrawElements , or glMultiDrawArrays .

Errors

GL_INVALID_VALUE is generated if index is greater than or equal to GL_MAX_VERTEX_ATTRIBS .

Associated Gets

glGet with argument GL_MAX_VERTEX_ATTRIBS
glGetVertexAttrib with arguments index and GL_VERTEX_ATTRIB_ARRAY_ENABLED
glGetVertexAttribPointerv with arguments index and GL_VERTEX_ATTRIB_ARRAY_POINTER

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.

glDisableVertexAttribArray
OpenGLContext tests/shader_8.py Lines: 251, 252
OpenGLContext tests/shader_7.py Lines: 333, 334
OpenGLContext tests/shader_11.py Lines: 313, 314, 315
OpenGLContext tests/shader_10.py Lines: 328, 329
OpenGLContext tests/shader_9.py Lines: 383, 384
OpenGLContext tests/shader_4.py Lines: 169, 170, 171
OpenGLContext tests/shader_5.py Lines: 318, 319
OpenGLContext tests/shader_6.py Lines: 317, 318
OpenGLContext tests/pygame_textureatlas.py Lines: 149, 150
OpenGLContext OpenGLContext/scenegraph/shaders.py Lines: 96
OpenGL Tutorial (Python Translation) t02.playing-with-colors/FragPosition.py Lines: 92
OpenGL Tutorial (Python Translation) t02.playing-with-colors/VertexColors.py Lines: 97, 98
OpenGL Tutorial (Python Translation) t01.hello-triangle/HelloTriangle.py Lines: 106
glEnableVertexAttribArray
OpenGLContext tests/shader_spike.py Lines: 82, 87
OpenGLContext tests/shader_8.py Lines: 233, 234
OpenGLContext tests/shader_7.py Lines: 316, 317
OpenGLContext tests/shader_11.py Lines: 291, 292, 293
OpenGLContext tests/shader_10.py Lines: 311, 312
OpenGLContext tests/shader_9.py Lines: 366, 367
OpenGLContext tests/shader_4.py Lines: 140, 141, 142
OpenGLContext tests/shader_5.py Lines: 303, 304
OpenGLContext tests/shader_6.py Lines: 288, 289
OpenGLContext tests/pygame_textureatlas.py Lines: 135, 141
OpenGLContext OpenGLContext/scenegraph/shaders.py Lines: 89
Gloopy gloopy/view/glyph.py Lines: 80, 81, 82
OpenGL Tutorial (Python Translation) t02.playing-with-colors/FragPosition.py Lines: 87
OpenGL Tutorial (Python Translation) t02.playing-with-colors/VertexColors.py Lines: 90, 91
OpenGL Tutorial (Python Translation) t01.hello-triangle/HelloTriangle.py Lines: 101
Previous: glEnableClientState Table of Contents (GL) Next: glEvalCoord