GLProgramming.com

home :: about :: development guides :: irc :: forums :: search :: paste :: links :: contribute :: code dump

-> Click here to learn how to get live help <-


Manpage of GLVERTEXPOINTER

GLVERTEXPOINTER

Index
 

NAME

glVertexPointer - define an array of vertex data
   

C SPECIFICATION

void f3glVertexPointerfP( GLint fIsizefP,
f2sizefP
Specifies the number of coordinates per vertex; must be 2, 3, or
4. The initial value is 4.
f2typefP
Specifies the data type of each coordinate in the array. Symbolic constants %f3GL_SHORTfP, %f3GL_INTfP, %f3GL_FLOATfP, and %f3GL_DOUBLEfP are accepted. The initial value is %f3GL_FLOATfP.
f2stridefP
Specifies the byte offset between consecutive vertices. If f2stridefP is 0, the vertices are understood to be tightly packed in the array. The initial value is 0.
f2ptrfP
Specifies a pointer to the first coordinate of the first vertex in the array. The initial value is 0.
 

DESCRIPTION

%f3glVertexPointerfP specifies the location and data of an array of vertex coordinates to use when rendering. f2sizefP specifies the number of coordinates per vertex and f2typefP the data type of the coordinates. f2stridefP specifies the byte stride from one vertex 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 vertex array is specified, f2sizefP, f2typefP, f2stridefP, and f2ptrfP are saved as client-side state. To enable and disable the vertex array, call %f3glEnableClientStatefP and
%f3glDisableClientStatefP with the argument %f3GL_VERTEX_ARRAYfP. If enabled, the vertex array is used when %f3glDrawArraysfP, %f3glDrawElementsfP, or %f3glArrayElementfP is called. Use %f3glDrawArraysfP to construct a sequence of primitives (all of the same type) from prespecified vertex and vertex attribute arrays. Use %f3glArrayElementfP to specify primitives by indexing vertices and vertex attributes and %f3glDrawElementsfP to construct a sequence of primitives by indexing vertices and vertex attributes.  

NOTES

%f3glVertexPointerfP is available only if the GL version is 1.1 or greater. The vertex array is initially disabled and isn't accessed when %f3glArrayElementfP, %f3glDrawElementsfP or %f3glDrawArraysfP is called. Execution of %f3glVertexPointerfP 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. %f3glVertexPointerfP is typically implemented on the client side. Vertex 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 2, 3, or 4. %f3GL_INVALID_ENUMfP is generated if f2typefP is is not an accepted value. %f3GL_INVALID_VALUEfP is generated if f2stridefP is negative.  

ASSOCIATED GETS

%f3glIsEnabledfP with argument %f3GL_VERTEX_ARRAYfP
%f3glGetfP with argument %f3GL_VERTEX_ARRAY_SIZEfP
%f3glGetfP with argument %f3GL_VERTEX_ARRAY_TYPEfP
%f3glGetfP with argument %f3GL_VERTEX_ARRAY_STRIDEfP
%f3glGetPointervfP with argument %f3GL_VERTEX_ARRAY_POINTERfP  

SEE ALSO

%f3glArrayElement(3G)fP, %f3glColorPointer(3G)fP, %f3glDrawArrays(3G)fP, %f3glDrawElements(3G)fP, %f3glDrawRangeElements(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


 

Index

NAME
C SPECIFICATION
DESCRIPTION
NOTES
ERRORS
ASSOCIATED GETS
SEE ALSO