The glEdgeFlagPointer function defines an array of edge flags.

void glEdgeFlagPointer(
  GLsizei stride,
  const GLboolean *pointer


The byte offset between consecutive edge flags. When stride is zero, the edge flags are tightly packed in the array.
A pointer to the first edge flag in the array.


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.

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.

Use glDrawArrays to construct a sequence of primitives (all of the same type) from prespecified vertex and vertex attribute arrays. Use glArrayElement to specify primitives by indexing vertexes and vertex attributes, and glDrawElements to construct a sequence of primitives by indexing vertexes and vertex attributes.

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

Error Codes

The following are the error codes generated and their conditions.

Error code Condition
GL_INVALID_ENUM stride or count was negative.


  Windows NT/2000: Requires Windows NT 4.0 or later.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Header: Declared in Gl.h.
  Library: Use Opengl32.lib.

See Also

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


Community Additions