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 GLNORMALPOINTER

GLNORMALPOINTER

Index
 

NAME

glNormalPointer - define an array of normals

 

C SPECIFICATION

void f3glNormalPointerfP( GLenum fItypefP,
f2typefP
Specifies the data type of each coordinate in the array. 
Symbolic constants
%f3GL_BYTEfP,
%f3GL_SHORTfP,
%f3GL_INTfP,
%f3GL_FLOATfP, and
%f3GL_DOUBLEfP 
are accepted. The initial value is %f3GL_FLOATfP. 
f2stridefP
Specifies the byte offset between consecutive normals. If f2stridefP is 0- the initial value-the normals 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 normal in the array. The initial value is 0.
 

DESCRIPTION

%f3glNormalPointerfP specifies the location and data of an array of normals to use when rendering. f2typefP specifies the data type of the normal coordinates and f2stridefP gives the byte stride from one normal 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 normal array is specified, f2typefP, f2stridefP, and f2ptrfP are saved as client-side state. To enable and disable the normal array, call %f3glEnableClientStatefP and %f3glDisableClientStatefP with the argument %f3GL_NORMAL_ARRAYfP. If enabled, the normal 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

%f3glNormalPointerfP is available only if the GL version is 1.1 or greater. The normal array is initially disabled and isn't accessed when %f3glArrayElementfP, %f3glDrawElementsfP, or %f3glDrawArraysfP is called. Execution of %f3glNormalPointerfP is not allowed between %f3glBeginfP and the corresponding %f3glEndfP, but an error may or may not be generated. If an error is not generated, the operation is undefined. %f3glNormalPointerfP is typically implemented on the client side. Since the normal array parameters are client-side state, they are not saved or restored by %f3glPushAttribfP and %f3glPopAttribfP. Use %f3glPushClientAttribfP and %f3glPopClientAttribfP instead.  

ERRORS

%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_NORMAL_ARRAYfP
%f3glGetfP with argument %f3GL_NORMAL_ARRAY_TYPEfP
%f3glGetfP with argument %f3GL_NORMAL_ARRAY_STRIDEfP
%f3glGetPointervfP with argument %f3GL_NORMAL_ARRAY_POINTERfP  

SEE ALSO

%f3glArrayElement(3G)fP, %f3glColorPointer(3G)fP, %f3glDrawArrays(3G)fP, %f3glDrawElements(3G)fP, %f3glEdgeFlagPointer(3G)fP, %f3glEnable(3G)fP, %f3glGetPointerv(3G)fP, %f3glIndexPointer(3G)fP, %f3glInterleavedArrays(3G)fP, %f3glPopClientAttrib(3G)fP, %f3glPushClientAttrib(3G)fP, %f3glTexCoordPointer(3G)fP, %f3glVertexPointer(3G)fP


 

Index

NAME
C SPECIFICATION
DESCRIPTION
NOTES
ERRORS
ASSOCIATED GETS
SEE ALSO