WebGL
Khronos
 

WebGL WEBGL_blend_func_extended Extension Specification

Name

WEBGL_blend_func_extended

Contact

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

Contributors

Members of the WebGL working group

Version

Last modified date: January 11, 2024
Revision: 2

Number

WebGL extension #58

Dependencies

Written against the WebGL API 1.0 specification.

Overview

This extension exposes the EXT_blend_func_extended 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 WEBGL_blend_func_extended {
    const GLenum SRC1_COLOR_WEBGL                   = 0x88F9;
    const GLenum SRC1_ALPHA_WEBGL                   = 0x8589;
    const GLenum ONE_MINUS_SRC1_COLOR_WEBGL         = 0x88FA;
    const GLenum ONE_MINUS_SRC1_ALPHA_WEBGL         = 0x88FB;
    const GLenum MAX_DUAL_SOURCE_DRAW_BUFFERS_WEBGL = 0x88FC;
};
  

New Tokens

undefined blendFunc(GLenum src, GLenum dst)

New enums SRC1_COLOR_WEBGL, SRC1_ALPHA_WEBGL, ONE_MINUS_SRC1_COLOR_WEBGL, and ONE_MINUS_SRC1_ALPHA_WEBGL are accepted as the src and dst parameters.

WebGL 1.0: An existing enum SRC_ALPHA_SATURATE is accepted as the dst parameter.

undefined blendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)

New enums SRC1_COLOR_WEBGL, SRC1_ALPHA_WEBGL, ONE_MINUS_SRC1_COLOR_WEBGL, and ONE_MINUS_SRC1_ALPHA_WEBGL are accepted as the srcRGB, dstRGB, srcAlpha, and dstAlpha parameters.

WebGL 1.0: An existing enum SRC_ALPHA_SATURATE is accepted as the dstRGB and dstAlpha parameters.

undefined blendFunciOES(GLuint buf, GLenum src, GLenum dst)
When OES_draw_buffers_indexed is enabled, new enums SRC1_COLOR_WEBGL, SRC1_ALPHA_WEBGL, ONE_MINUS_SRC1_COLOR_WEBGL, and ONE_MINUS_SRC1_ALPHA_WEBGL are accepted as the src and dst parameters.
undefined blendFuncSeparateiOES(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
When OES_draw_buffers_indexed is enabled, new enums SRC1_COLOR_WEBGL, SRC1_ALPHA_WEBGL, ONE_MINUS_SRC1_COLOR_WEBGL, and ONE_MINUS_SRC1_ALPHA_WEBGL are accepted as the srcRGB, dstRGB, srcAlpha, and dstAlpha parameters.
any getParameter(GLenum pname)

New MAX_DUAL_SOURCE_DRAW_BUFFERS_WEBGL enum is accepted as the pname parameter.

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

pnamereturned type
MAX_DUAL_SOURCE_DRAW_BUFFERS_WEBGLGLint

Revision History

Revision 1, 2023/06/01

Revision 2, 2024/01/11