glEdgeFlagPointer function

The glEdgeFlagPointer function defines an array of edge flags.

Syntax

void WINAPI glEdgeFlagPointer(
         GLsizei stride,
   const GLvoid  *pointer
);

Parameters

stride

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

pointer

A pointer to the first edge flag in the array.

Return value

This function does not return a value.

Error codes

The following error code can be retrieved by the glGetError function.

Name Meaning
GL_INVALID_ENUM
stride or count was negative.

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.

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 vertices and vertex attributes, and glDrawElements to construct a sequence of primitives by indexing vertices 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:

glGet with argument GL_EDGE_FLAG_ARRAY_STRIDE

glGet with argument GL_EDGE_FLAG_ARRAY_COUNT

glGetPointerv with argument GL_EDGE_FLAG_ARRAY_POINTER

glIsEnabled with argument GL_EDGE_FLAG_ARRAY

Requirements

Requirement Value
Minimum supported client
Windows 2000 Professional [desktop apps only]
Minimum supported server
Windows 2000 Server [desktop apps only]
Header
Gl.h
Library
Opengl32.lib
DLL
Opengl32.dll

See also

glArrayElement

glBegin

glColorPointer

glDrawArrays

glEnableClientState

glEnd

glGet

glGetPointerv

glGetString

glIndexPointer

glIsEnabled

glNormalPointer

glPopAttrib

glPushAttrib

glTexCoordPointer

glVertexPointer