Name

glWeightPointerOES - define an array of weights

C Specification

void glWeightPointerOES(GLint size,
    GLenum type,
    GLsizei stride,
    const GLvoid * pointer)

Parameters

size

Specifies the number of weights per vertex. Must be is less than or equal to GL_MAX_VERTEX_UNITS_OES. The initial value is 0.

type

Specifies the data type of each weight in the array. Symbolic constant GL_FIXED is accepted. However, the common profile also accepts the symbolic constant GL_FLOAT as well. The initial value is GL_FIXED for the common lite profile, or GL_FLOAT for the common profile.

stride

Specifies the byte offset between consecutive weights. If stride is 0, the weights are understood to be tightly packed in the array. The initial value is 0.

pointer

Specifies a pointer to the first weight of the first vertex in the array. The initial value is 0.

Description

glWeightPointer specifies the location and data of an array of weights to use when rendering. size specifies the number of weights per vertex and type the data type of the coordinates. stride specifies the byte stride from one weight 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.)

These weights are used to blend corresponding matrices for a given vertex.

When a weight array is specified, size, type, stride, and pointer are saved as client-side state.

If the weight array is enabled, it is used when glDrawArrays, or glDrawElements is called. To enable and disable the vertex array, call glEnableClientState and glDisableClientState with the argument GL_WEIGHT_ARRAY_OES. The weight array is initially disabled and isn't accessed when glDrawArrays or glDrawElements is called.

Use glDrawArrays to construct a sequence of primitives (all of the same type) from prespecified vertex and vertex attribute arrays. Use glDrawElements to construct a sequence of primitives by indexing vertices and vertex attributes.

Notes

glWeightPointer is typically implemented on the client side.

Errors

GL_INVALID_VALUE is generated if size is greater than GL_MAX_VERTEX_UNITS_OES.

GL_INVALID_ENUM is generated if type is is not an accepted value.

GL_INVALID_VALUE is generated if stride is negative.

Copyright

Copyright © 2003-2004 Silicon Graphics, Inc.

This document is licensed under the SGI Free Software B License. For details, see http://oss.sgi.com/projects/FreeB/.

See Also

glCurrentPaletteMatrix, glDrawArrays, glDrawElements, glLoadPaletteFromModelViewMatrix, glMatrixIndexPointer, glMatrixMode,