glEdgeFlagPointer

[New - Windows 95, OEM Service Release 2]

The glEdgeFlagPointer function defines an array of edge flags.

void glEdgeFlagPointer(

    GLsizei stride,

 

    GLsizei count,

 

    const GLboolean * pointer

 

   );

 

 

Parameters

stride

The byte offset between consecutive edge flags. When stride is zero, the edge flags are tightly packed in the array.

count

The number of edge flags, counting from the first, that are static.

pointer

A pointer to the first edge flag in the array.

 

Remarks

The glEdgeFlagPointer function specifies the location and data of an array of Boolean edge flags to use when rendering. The stride parameter determines the byte offset from one edge flag to the next, which enables the packing of vertices and attributes in a single array or storage in separate arrays. In some implementations, storing the vertices and attributes in a single array can be more efficient than using separate arrays.

Starting from the first edge-flag array element, count indicates the total number of static elements. Your application can modify static elements, but once the elements are modified, the application must explicitly specify the array again before using it for any rendering. Nonstatic array elements are not accessed until you call glDrawArrays08Q9TG or glArrayElementMRW2UC.

Static array data can be read at any time. If any static array elements are modified and the array is not specified again, the results of any subsequent calls to glEdgeFlagPointer are undefined.

An edge-flag array is enabled when you specify the GL_EDGE_FLAG_ARRAY constant with glEnableClientState162GK9.. When enabled, glDrawArrays08Q9TG or glArrayElementMRW2UC uses the edge-flag array. By default the edge-flag array is disabled.

You cannot include glEdgeFlagPointer in display lists.

When you specify an edge-flag array using glEdgeFlagPointer, the values of all the function s edge-flag array parameters are saved in a client-side state and static array elements can be cached. Because the edge-flag array parameters are in a client-side state, glPushAttrib2Z6IY_ and glPopAttrib2Z6IY_ do not save or restore their values.

Although calling glEdgeFlagPointer within a glBeginONJASG/glEndONJASG pair does not generate an error, the results are undefined.

The following functions retrieve information related to the glEdgeFlagPointer function:

glIsEnabled with argument GL_EDGE_FLAG_ARRAY

glGet with argument GL_EDGE_FLAG_ARRAY_STRIDE

glGet with argument GL_EDGE_FLAG_ARRAY_COUNT

glGetPointerv with argument GL_EDGE_FLAG_ARRAY_POINTER

 

Error Codes

The following are the error codes generated and their conditions.

Error Code

Condition

GL_INVALID_ENUM

stride or count was negative.

 

See Also

glArrayElement, glBegin, glColorPointer, glDrawArrays, glEnableClientState, glEnd, glGet, glGetPointerv, glGetString, glIndexPointer, glIsEnabled, glNormalPointer, glPopAttrib, glPushAttrib, glTexCoordPointer, glVertexPointer