Name ANGLE_provoking_vertex Name Strings GL_ANGLE_provoking_vertex Status Complete Version Last Modified Date: Nov 1, 2022 Author Revision: 1 Number OpenGL ES Extension XX Dependencies OpenGL ES 3.0 is required. This extension is written against the OpenGL ES 3.0 specification. OES_geometry_shader and EXT_geometry_shader interact with this extension. Overview This extension provides an alternative provoking vertex convention for rendering lines and triangles. The provoking vertex of a primitive is the vertex that determines the constant output values when "flat" interpolation qualifier is used. In OpenGL ES, the provoking vertex for triangle, line, and (trivially) point primitives is the last vertex used to assemble the primitive. Alternatively the provoking vertex could be the first vertex of the primitive. Other APIs have adopted the "first vertex of the primitive" convention to determine the provoking vertex. The motivation for this extension is to allow convention-agnostic applications to have better performance when running on top of layered implementations of OpenGL ES (such as ANGLE) that use native APIs with the "first vertex of the primitive" provoking vertex convention. New Procedures and Functions void ProvokingVertexANGLE(enum provokeMode); New Tokens Accepted by the parameter of ProvokingVertex: FIRST_VERTEX_CONVENTION_ANGLE 0x8E4D LAST_VERTEX_CONVENTION_ANGLE 0x8E4E Accepted by the parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev: PROVOKING_VERTEX_ANGLE 0x8E4F Additions to Chapter 2 of the OpenGL ES 3.0 Specification (OpenGL ES Operation) Modify Section 2.17 "Flatshading" (replace Table 2.12) First vertex Last vertex Primitive type of polygon i convention convention =========================== ============ ============= point i i independent line 2i-1 2i line loop i i+1, if ith primitive generated by drawing commands with the indicated primitive type are derived from the corresponding values of the vertex whose index is shown in the table. Vertices are numbered 1 through n, where n is the number of vertices drawn. (add after the second paragraph) The provoking vertex is controlled with the command void ProvokingVertexANGLE(enum provokeMode); must be either FIRST_VERTEX_CONVENTION_ANGLE or LAST_VERTEX_CONVENTION_ANGLE, and controls selection of the vertex whose values are assigned to varying outputs, as shown in Table 2.12. The state required for flatshading is one bit for the provoking vertex mode. The initial value of the provoking vertex mode is LAST_VERTEX_CONVENTION_ANGLE. Dependencies on OES_geometry_shader, EXT_geometry_shader, and/or the geometry shader functionality integrated into the core by OpenGL ES 3.2: If none of OES_geometry_shader, EXT_geometry_shader, or OpenGL ES 3.2 are supported: * ignore the rows of table 2.12 for line adjacency, line strip adjacency, triangle adjacency, and triangle strip adjacency. Errors INVALID_ENUM is generated when ProvokingVertexANGLE is called with a that is not either FIRST_VERTEX_CONVENTION_ANGLE or LAST_VERTEX_CONVENTION_ANGLE. New State (add a new table "Coloring" after the table 6.5) Get Value Type Get Command Initial Value Description Sec ---------------- ---- ----------- ---------------------------- ---------------- ---- PROVOKING_VERTEX_ANGLE Z2 GetIntegerv LAST_VERTEX_CONVENTION_ANGLE Provoking vertex 2.17 convention Revision History 11/1/2022 First revision