![]() -> Click here to learn how to get live help <- |
GLCOLORPOINTERIndexNAMEglColorPointer - define an array of colorsC SPECIFICATIONvoid f3glColorPointerfP( GLint fIsizefP,f2sizefP Specifies the number of components per color. Must be 3 or 4. The initial value is 4.
DESCRIPTION%f3glColorPointerfP specifies the location and data of an array of color components to use when rendering. f2sizefP specifies the number of components per color, and must be 3 or 4. f2typefP specifies the data type of each color component, and f2stridefP specifies the byte stride from one color to the next allowing vertices and attributes to be packed into a single array or stored in separate arrays. (Single-array storage may be more efficient on some implementations; see %f3glInterleavedArraysfP.) When a color array is specified, f2sizefP, f2typefP, f2stridefP, and f2ptrfP are saved as client-side state. To enable and disable the color array, call %f3glEnableClientStatefP and%f3glDisableClientStatefP with the argument %f3GL_COLOR_ARRAYfP. If enabled, the color array is used when %f3glDrawArraysfP, %f3glDrawElementsfP, %f3glDrawRangeElementsfP, or %f3glArrayElementfP is called. NOTES%f3glColorPointerfP is available only if the GL version is 1.1 or greater. The color array is initially disabled and isn't accessed when %f3glArrayElementfP, %f3glDrawArraysfP, %f3glDrawRangeElementsfP, or %f3glDrawElementsfP is called. Execution of %f3glColorPointerfP is not allowed between the execution of %f3glBeginfP and the corresponding execution of %f3glEndfP, but an error may or may not be generated. If no error is generated, the operation is undefined. %f3glColorPointerfP is typically implemented on the client side. Color array parameters are client-side state and are therefore not saved or restored by %f3glPushAttribfP and %f3glPopAttribfP. Use %f3glPushClientAttribfP and %f3glPopClientAttribfP instead.ERRORS%f3GL_INVALID_VALUEfP is generated if f2sizefP is not 3 or 4. %f3GL_INVALID_ENUMfP is generated if f2typefP is not an accepted value. %f3GL_INVALID_VALUEfP is generated if f2stridefP is negative.ASSOCIATED GETS%f3glIsEnabledfP with argument %f3GL_COLOR_ARRAYfP%f3glGetfP with argument %f3GL_COLOR_ARRAY_SIZEfP %f3glGetfP with argument %f3GL_COLOR_ARRAY_TYPEfP %f3glGetfP with argument %f3GL_COLOR_ARRAY_STRIDEfP %f3glGetPointervfP with argument %f3GL_COLOR_ARRAY_POINTERfP SEE ALSO%f3glArrayElement(3G)fP, %f3glDrawArrays(3G)fP, %f3glDrawElements(3G)fP, %f3glEdgeFlagPointer(3G)fP, %f3glEnable(3G)fP, %f3glGetPointerv(3G)fP, %f3glIndexPointer(3G)fP, %f3glInterleavedArrays(3G)fP, %f3glNormalPointer(3G)fP, %f3glPopClientAttrib(3G)fP, %f3glPushClientAttrib(3G)fP, %f3glTexCoordPointer(3G)fP, %f3glVertexPointer(3G)fP
Index |