glProvokingVertex

glProvokingVertex: man4/glProvokingVertex.xml

a vertex shader varying output means to assign all vetices of the primitive the same value for that output. The vertex from which these values is derived is known as the and glProvokingVertex specifies which vertex is to be used as the source of data for flat shaded varyings. provokeMode must be either GL_FIRST_VERTEX_CONVENTION or GL_LAST_VERTEX_CONVENTION, and controls the selection of the vertex whose values are assigned to flatshaded varying outputs. The interpretation of these values for the supported primitive types is: Primitive Type of Polygon First Vertex Convention Last Vertex Convention point independent line 2 - 1 2 line loop + 1, if < 1, if = line strip + 1 independent triangle 3 - 2 3 triangle strip + 2 triangle fan + 1 + 2 line adjacency 4 - 2 4 - 1 line strip adjacency + 1 + 2 triangle adjacency 6 - 5 6 - 1 triangle strip adjacency 2 - 1 2 + 3 If a vertex or geometry shader is active, user-defined varying outputs may be flatshaded by using the flat qualifier when declaring the output.

glProvokingVertex is available only if the GL version is 3.2 or greater.

@OpenGL_Version(OGLIntroducedIn.V3P2)
@OpenGL_Extension("GL_ARB_provoking_vertex")
fn_glProvokingVertex glProvokingVertex;

See Also

Meta