glColorPointer

define an array of colors

Signature

glColorPointer( GLint ( size ) , GLenum ( type ) , GLsizei ( stride ) , const GLvoid * ( pointer ) )-> void
glColorPointer( size , type , stride , pointer )
glColorPointerf( pointer )
glColorPointeri( pointer )
glColorPointers( pointer )
glColorPointerui( pointer )
glColorPointerus( pointer )

Parameters

VariablesDescription
size
Specifies the number of components per color. Must be 3 or 4. The initial value is 4.
type
Specifies the data type of each color component in the array. Symbolic constants GL_BYTE , GL_UNSIGNED_BYTE , GL_SHORT , GL_UNSIGNED_SHORT , GL_INT , GL_UNSIGNED_INT , GL_FLOAT , and GL_DOUBLE are accepted. The initial value is GL_FLOAT .
stride
Specifies the byte offset between consecutive colors. If stride is 0, the colors are understood to be tightly packed in the array. The initial value is 0.
pointer
Specifies a pointer to the first component of the first color element in the array. The initial value is 0.

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.

glColorPointer
OpenGLContext tests/shader_3.py Lines: 170
OpenGLContext tests/shader_2.py Lines: 181
OpenGLContext tests/shader_2_c_void_p.py Lines: 63
OpenGLContext OpenGLContext/scenegraph/indexedpolygons.py Lines: 28, 80
{GPL3} OpenGL-Programmable 06-perpixel.py Lines: 191
{GPL3} OpenGL-Programmable 03-array.py Lines: 98
{GPL3} OpenGL-Programmable 05-shader.py Lines: 183
{GPL3} OpenGL-Programmable 04-vbo.py Lines: 117