WebGL
Khronos
 

WebGL EXT_provoking_vertex Extension Draft Specification

Name

EXT_provoking_vertex

Contact

WebGL working group (public_webgl 'at' khronos.org)

Contributors

Kelsey Gilbert (Mozilla)

Members of the WebGL working group

Version

Last modified date: July 01, 2022
Revision: 2

Number

WebGL extension #48

Dependencies

Written against the WebGL API 2.0 specification.

Overview

This extension exposes the EXT_provoking_vertex functionality to WebGL.

The following WebGL-specific behavioral changes apply:

Consult the above extension for documentation, issues and new functions and enumerants.

When this extension is enabled:

IDL

[Exposed=(Window,Worker), LegacyNoInterfaceObject]
interface EXT_provoking_vertex {
    const GLenum FIRST_VERTEX_CONVENTION_EXT = 0x8E4D;
    const GLenum LAST_VERTEX_CONVENTION_EXT  = 0x8E4E; // default
    const GLenum PROVOKING_VERTEX_EXT        = 0x8E4F;

    undefined provokingVertexEXT(GLenum convention);
};
  

Sample Code

    function optimizeAssumingFlatsHaveSameFirstAndLastData(gl) {
      const epv = gl.getExtension('EXT_provoking_vertex');
      if (epv) {
        epv.provokingVertexEXT(epv.FIRST_VERTEX_CONVENTION_EXT);
      }
    }
    

Revision History

Revision 1, 2022/06/23

Revision 2, 2022/07/01