Class EXTProvokingVertex
This extension provides an alternative provoking vertex convention for rendering lines, triangles, and (optionally depending on the implementation) quads.
The provoking vertex of a primitive is the vertex that determines the constant primary and secondary colors when flat shading is enabled.
In OpenGL, the provoking vertex for triangle, quad, line, and (trivially) point primitives is the last vertex used to assemble the primitive. The polygon primitive is an exception in OpenGL where the first vertex of a polygon primitive determines the color of the polygon, even if actually broken into triangles and/or quads.
See section 2.14.7 (Flatshading) of the OpenGL 2.1 specification, particularly Table 2.12 for more details.
Alternatively the provoking vertex could be the first vertex of the primitive. Other APIs with flat-shading functionality such as Reality Lab and Direct3D have adopted the "first vertex of the primitive" convention to determine the provoking vertex. However, these APIs lack quads so do not have a defined provoking vertex convention for quads.
The motivation for this extension is to allow applications developed for APIs with a "first vertex of the primitive" provoking vertex to be easily converted to OpenGL.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Accepted by themode
parameter of ProvokingVertexEXT.static final int
Accepted by themode
parameter of ProvokingVertexEXT.static final int
Accepted by thepname
parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev.static final int
Accepted by thepname
parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. -
Method Summary
-
Field Details
-
GL_FIRST_VERTEX_CONVENTION_EXT
public static final int GL_FIRST_VERTEX_CONVENTION_EXTAccepted by themode
parameter of ProvokingVertexEXT.- See Also:
-
GL_LAST_VERTEX_CONVENTION_EXT
public static final int GL_LAST_VERTEX_CONVENTION_EXTAccepted by themode
parameter of ProvokingVertexEXT.- See Also:
-
GL_PROVOKING_VERTEX_EXT
public static final int GL_PROVOKING_VERTEX_EXTAccepted by thepname
parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev.- See Also:
-
GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT
public static final int GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXTAccepted by thepname
parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev.- See Also:
-
-
Method Details
-
glProvokingVertexEXT
public static void glProvokingVertexEXT(int mode)
-