WEBGL_provoking_vertex
WebGL working group (public_webgl 'at' khronos.org)
Kelsey Gilbert (Mozilla)
Members of the WebGL working group
Last modified date: January 26, 2023
Revision: 5
WebGL extension #48
Written against the WebGL API 2.0 specification.
This extension exposes the ANGLE_provoking_vertex functionality to WebGL.
The following WebGL-specific behavioral changes apply:
FIRST_VERTEX_CONVENTION
is more efficient than the default behavior of LAST_VERTEX_CONVENTION
.
Applications should expect that if this extension is supported by a WebGL context, they should try to use FIRST_VERTEX_CONVENTION
if they can.
Consult the above extension for documentation, issues and new functions and enumerants.
When this extension is enabled:
FIRST_VERTEX_CONVENTION
for provoking vertex, as opposed to the default of LAST_VERTEX_CONVENTION
.
On some implementations, FIRST_VERTEX_CONVENTION
is more efficient than LAST_VERTEX_CONVENTION
.
[Exposed=(Window,Worker), LegacyNoInterfaceObject] interface WEBGL_provoking_vertex { const GLenum FIRST_VERTEX_CONVENTION_WEBGL = 0x8E4D; const GLenum LAST_VERTEX_CONVENTION_WEBGL = 0x8E4E; // default const GLenum PROVOKING_VERTEX_WEBGL = 0x8E4F; undefined provokingVertexWEBGL(GLenum provokeMode); };
function optimizeAssumingFlatsHaveSameFirstAndLastData(gl) { const epv = gl.getExtension('WEBGL_provoking_vertex'); if (epv) { epv.provokingVertexWEBGL(epv.FIRST_VERTEX_CONVENTION_WEBGL); } }
Revision 1, 2022/06/23
Revision 2, 2022/07/01
Revision 3, 2022/11/01
Revision 4, 2022/11/23
Revision 5, 2023/01/26