The glEdgeFlagPointer function defines an array of edge flags.
void glEdgeFlagPointer(
GLsizei stride,
GLsizei count,
const GLboolean * pointer
);
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 glDrawArrays or glArrayElement.
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 glEnableClientState. When enabled, glDrawArrays or glArrayElement 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, glPushAttrib and glPopAttrib do not save or restore their values.
Although calling glEdgeFlagPointer within a glBegin/glEnd 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
The following are the error codes generated and their conditions.
Error Code | Condition |
---|---|
GL_INVALID_ENUM | stride or count was negative. |
glArrayElement, glBegin, glColorPointer, glDrawArrays, glEnableClientState, glEnd, glGet, glGetPointerv, glGetString, glIndexPointer, glIsEnabled, glNormalPointer, glPopAttrib, glPushAttrib, glTexCoordPointer, glVertexPointer