• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Name
2
3    ANGLE_provoking_vertex
4
5Name Strings
6
7    GL_ANGLE_provoking_vertex
8
9Status
10
11    Complete
12
13Version
14
15    Last Modified Date: Nov 1, 2022
16    Author Revision: 1
17
18Number
19
20    OpenGL ES Extension XX
21
22Dependencies
23
24    OpenGL ES 3.0 is required.
25
26    This extension is written against the OpenGL ES 3.0 specification.
27
28    OES_geometry_shader and EXT_geometry_shader interact with this extension.
29
30Overview
31
32    This extension provides an alternative provoking vertex convention
33    for rendering lines and triangles.
34
35    The provoking vertex of a primitive is the vertex that determines the
36    constant output values when "flat" interpolation qualifier is used.
37
38    In OpenGL ES, the provoking vertex for triangle, line, and (trivially)
39    point primitives is the last vertex used to assemble the primitive.
40
41    Alternatively the provoking vertex could be the first vertex of
42    the primitive. Other APIs have adopted the "first vertex of the
43    primitive" convention to determine the provoking vertex.
44
45    The motivation for this extension is to allow convention-agnostic
46    applications to have better performance when running on top of layered
47    implementations of OpenGL ES (such as ANGLE) that use native APIs with
48    the "first vertex of the primitive" provoking vertex convention.
49
50New Procedures and Functions
51
52    void ProvokingVertexANGLE(enum provokeMode);
53
54New Tokens
55
56    Accepted by the <provokeMode> parameter of ProvokingVertex:
57
58        FIRST_VERTEX_CONVENTION_ANGLE             0x8E4D
59        LAST_VERTEX_CONVENTION_ANGLE              0x8E4E
60
61    Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
62    GetFloatv, and GetDoublev:
63
64        PROVOKING_VERTEX_ANGLE                    0x8E4F
65
66Additions to Chapter 2 of the OpenGL ES 3.0 Specification (OpenGL ES Operation)
67
68    Modify Section 2.17 "Flatshading"
69
70    (replace Table 2.12)
71
72                                 First vertex  Last vertex
73    Primitive type of polygon i  convention    convention
74    ===========================  ============  =============
75    point                             i        i
76
77    independent line                  2i-1     2i
78    line loop                         i        i+1, if i<n
79                                               1,   if i==n
80    line strip                        i        i+1
81
82    independent triangle              3i-2     3i
83    triangle strip                    i        i+2
84    triangle fan                      i+1      i+2
85
86    line adjacency                    4i-2     4i-1
87    line strip adjacency              i+1      i+2
88    triangle adjacency                6i-5     6i-1
89    triangle strip adjacency          2i-1     2i+3
90
91    Table 2.12: Provoking vertex selection. The output values used for
92    flatshading the <i>th primitive generated by drawing commands with the
93    indicated primitive type are derived from the corresponding values of
94    the vertex whose index is shown in the table. Vertices are numbered 1
95    through n, where n is the number of vertices drawn.
96
97    (add after the second paragraph)
98
99    The provoking vertex is controlled with the command
100
101       void ProvokingVertexANGLE(enum provokeMode);
102
103    <provokeMode> must be either FIRST_VERTEX_CONVENTION_ANGLE or
104    LAST_VERTEX_CONVENTION_ANGLE, and controls selection of the vertex whose
105    values are assigned to varying outputs, as shown in Table 2.12.
106
107    The state required for flatshading is one bit for the provoking vertex
108    mode. The initial value of the provoking vertex mode is
109    LAST_VERTEX_CONVENTION_ANGLE.
110
111Dependencies on OES_geometry_shader, EXT_geometry_shader, and/or the geometry
112shader functionality integrated into the core by OpenGL ES 3.2:
113
114    If none of OES_geometry_shader, EXT_geometry_shader, or OpenGL ES 3.2
115    are supported:
116       * ignore the rows of table 2.12 for line adjacency, line strip
117         adjacency, triangle adjacency, and triangle strip adjacency.
118
119Errors
120
121    INVALID_ENUM is generated when ProvokingVertexANGLE is called with a
122    <provokeMode> that is not either FIRST_VERTEX_CONVENTION_ANGLE or
123    LAST_VERTEX_CONVENTION_ANGLE.
124
125New State
126
127(add a new table "Coloring" after the table 6.5)
128
129Get Value               Type  Get Command  Initial Value                 Description       Sec
130----------------        ----  -----------  ----------------------------  ----------------  ----
131PROVOKING_VERTEX_ANGLE  Z2    GetIntegerv  LAST_VERTEX_CONVENTION_ANGLE  Provoking vertex  2.17
132                                                                            convention
133
134Revision History
135
136    11/1/2022   First revision
137