WebGL
Khronos
 

WebGL EXT_clip_control Extension Specification

Name

EXT_clip_control

Contact

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

Contributors

Members of the WebGL working group

Version

Last modified date: November 06, 2023
Revision: 2

Number

WebGL extension #51

Dependencies

Written against the WebGL API 1.0 specification.

Overview

This extension exposes the EXT_clip_control functionality to WebGL.

There are no WebGL-specific behavioral changes.

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

IDL

[Exposed=(Window,Worker), LegacyNoInterfaceObject]
interface EXT_clip_control {
    const GLenum LOWER_LEFT_EXT = 0x8CA1;
    const GLenum UPPER_LEFT_EXT = 0x8CA2;

    const GLenum NEGATIVE_ONE_TO_ONE_EXT = 0x935E;
    const GLenum ZERO_TO_ONE_EXT         = 0x935F;

    const GLenum CLIP_ORIGIN_EXT     = 0x935C;
    const GLenum CLIP_DEPTH_MODE_EXT = 0x935D;

    undefined clipControlEXT(GLenum origin, GLenum depth);
};
  

New Functions

undefined clipControlEXT(GLenum origin, GLenum depth)

origin must be LOWER_LEFT_EXT (default) or UPPER_LEFT_EXT.

depth must be NEGATIVE_ONE_TO_ONE_EXT (default) or ZERO_TO_ONE_EXT.

New Tokens

any getParameter(GLenum pname)

New enums CLIP_ORIGIN_EXT and CLIP_DEPTH_MODE_EXT are accepted as the pname parameter.

The return type of this method depends on the parameter queried:

pnamereturned type
CLIP_ORIGIN_EXTGLenum
CLIP_DEPTH_MODE_EXTGLenum

Revision History

Revision 1, 2023/06/01

Revision 2, 2023/11/06