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 GLDRAWARRAYS

GLDRAWARRAYS

Index
 

NAME

glDrawArrays - render primitives from array data

 

C SPECIFICATION

void f3glDrawArraysfP( GLenum fImodefP,
f2modefP
Specifies what kind of primitives to render.
Symbolic constants
%f3GL_POINTSfP,
%f3GL_LINE_STRIPfP,
%f3GL_LINE_LOOPfP,
%f3GL_LINESfP,
%f3GL_TRIANGLE_STRIPfP,
%f3GL_TRIANGLE_FANfP,
%f3GL_TRIANGLESfP,
%f3GL_QUAD_STRIPfP,
%f3GL_QUADSfP,
and %f3GL_POLYGONfP are accepted. 
f2firstfP
Specifies the starting index in the enabled arrays.
f2countfP
Specifies the number of indices to be rendered.
 

DESCRIPTION

%f3glDrawArraysfP specifies multiple geometric primitives with very few subroutine calls. Instead of calling a GL procedure to pass each individual vertex, normal, texture coordinate, edge flag, or color, you can prespecify separate arrays of vertices, normals, and colors and use them to construct a sequence of primitives with a single call to %f3glDrawArraysfP. When %f3glDrawArraysfP is called, it uses f2countfP sequential elements from each enabled array to construct a sequence of geometric primitives, beginning with element f2firstfP. f2modefP specifies what kind of primitives are constructed, and how the array elements construct those primitives. If %f3GL_VERTEX_ARRAYfP is not enabled, no geometric primitives are generated. Vertex attributes that are modified by %f3glDrawArraysfP have an unspecified value after %f3glDrawArraysfP returns. For example, if %f3GL_COLOR_ARRAYfP is enabled, the value of the current color is undefined after %f3glDrawArraysfP executes. Attributes that aren't modified remain well defined.  

NOTES

%f3glDrawArraysfP is available only if the GL version is 1.1 or greater. %f3glDrawArraysfP is included in display lists. If %f3glDrawArraysfP is entered into a display list, the necessary array data (determined by the array pointers and enables) is also entered into the display list. Because the array pointers and enables are client-side state, their values affect display lists when the lists are created, not when the lists are executed.  

ERRORS

%f3GL_INVALID_ENUMfP is generated if f2modefP is not an accepted value. %f3GL_INVALID_VALUEfP is generated if f2countfP is negative. %f3GL_INVALID_OPERATIONfP is generated if %f3glDrawArraysfP is executed between the execution of %f3glBeginfP and the corresponding %f3glEndfP.  

SEE ALSO

%f3glArrayElement(3G)fP, %f3glColorPointer(3G)fP, %f3glDrawElements(3G)fP, %f3glDrawRangeElements(3G)fP, %f3glEdgeFlagPointer(3G)fP, %f3glGetPointerv(3G)fP, %f3glIndexPointer(3G)fP, %f3glInterleavedArrays(3G)fP, %f3glNormalPointer(3G)fP, %f3glTexCoordPointer(3G)fP, %f3glVertexPointer(3G)fP


 

Index

NAME
C SPECIFICATION
DESCRIPTION
NOTES
ERRORS
SEE ALSO