-
Notifications
You must be signed in to change notification settings - Fork 203
Add WebGL2 Canvas Context #1516
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| name: WebGL2 Color Space | ||
| description: Specifies the color space to be used for the context. | ||
| spec: https://registry.khronos.org/webgl/specs/latest/2.0/ | ||
| compat_features: | ||
| - api.WebGL2RenderingContext.drawingBufferColorSpace | ||
| - api.WebGL2RenderingContext.unpackColorSpace | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| # Generated from: webgl2-context-colorspace.yml | ||
| # Do not edit this file by hand. Edit the source file instead! | ||
|
|
||
| status: | ||
| baseline: false | ||
| support: | ||
| chrome: "104" | ||
| chrome_android: "104" | ||
| edge: "104" | ||
| compat_features: | ||
| # baseline: low | ||
| # baseline_low_date: 2024-06-11 | ||
| # support: | ||
| # chrome: "104" | ||
| # chrome_android: "104" | ||
| # edge: "104" | ||
| # firefox: "127" | ||
| # firefox_android: "127" | ||
| # safari: "16.4" | ||
| # safari_ios: "16.4" | ||
| - api.WebGL2RenderingContext.drawingBufferColorSpace | ||
|
|
||
| # ⬇️ Same status as overall feature ⬇️ | ||
| # baseline: false | ||
| # support: | ||
| # chrome: "104" | ||
| # chrome_android: "104" | ||
| # edge: "104" | ||
| - api.WebGL2RenderingContext.unpackColorSpace |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| name: WebGL2 `desynchronized` parameter | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Has same support as WebGL1 |
||
| description: Reduces latency by desynchronizing the canvas paint cycle from the event loop. | ||
| spec: https://registry.khronos.org/webgl/specs/latest/2.0/ | ||
| compat_features: | ||
| - api.HTMLCanvasElement.getContext.webgl2_context.options_desynchronized_parameter | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # Generated from: webgl2-context-desynchronized.yml | ||
| # Do not edit this file by hand. Edit the source file instead! | ||
|
|
||
| status: | ||
| baseline: false | ||
| support: | ||
| chrome: "81" | ||
| chrome_android: "75" | ||
| edge: "79" | ||
| compat_features: | ||
| - api.HTMLCanvasElement.getContext.webgl2_context.options_desynchronized_parameter |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| name: WebGL2 drawing buffer | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Has same support as WebGL1 |
||
| description: Provides access to the underlying storage buffer. | ||
| spec: https://registry.khronos.org/webgl/specs/latest/2.0/#2.2 | ||
| compat_features: | ||
| - api.WebGL2RenderingContext.drawingBufferFormat | ||
| - api.WebGL2RenderingContext.drawingBufferStorage | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| # Generated from: webgl2-context-drawingbuffer.yml | ||
| # Do not edit this file by hand. Edit the source file instead! | ||
|
|
||
| status: | ||
| baseline: false | ||
| support: | ||
| chrome: "122" | ||
| chrome_android: "122" | ||
| edge: "122" | ||
| compat_features: | ||
| - api.WebGL2RenderingContext.drawingBufferFormat | ||
| - api.WebGL2RenderingContext.drawingBufferStorage |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| name: WebGL2 `powerPreference` parameter | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Has similar support as WebGL1 |
||
| description: Allows the developer to prioritize rendering performance or power savings. | ||
| spec: https://registry.khronos.org/webgl/specs/latest/2.0/ | ||
| compat_features: | ||
| - api.HTMLCanvasElement.getContext.webgl2_context.options_powerPreference_parameter | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # Generated from: webgl2-context-powerpreference.yml | ||
| # Do not edit this file by hand. Edit the source file instead! | ||
|
|
||
| status: | ||
| baseline: false | ||
| support: | ||
| chrome: "75" | ||
| chrome_android: "75" | ||
| edge: "79" | ||
| safari: "15" | ||
| safari_ios: "15" | ||
| compat_features: | ||
| - api.HTMLCanvasElement.getContext.webgl2_context.options_powerPreference_parameter |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,9 @@ | ||
| draft_date: 2024-07-11 | ||
| name: WebGL 2.0 Specification | ||
| description: TODO | ||
| name: WebGL2 2D and 3D Graphics | ||
| description: WebGL2 is a JavaScript API for rendering high-performance interactive 3D and 2D graphics and support for much of the OpenGL ES 3.0 feature set. | ||
| spec: https://registry.khronos.org/webgl/specs/latest/2.0/ | ||
| compat_features: | ||
| - api.HTMLCanvasElement.getContext.webgl2_context.options_alpha_parameter | ||
| - api.HTMLCanvasElement.getContext.webgl2_context.options_desynchronized_parameter | ||
| - api.HTMLCanvasElement.getContext.webgl2_context.options_failIfMajorPerformanceCaveat_parameter | ||
| - api.HTMLCanvasElement.getContext.webgl2_context.options_powerPreference_parameter | ||
| - api.WebGL2RenderingContext | ||
| - api.WebGL2RenderingContext.activeTexture | ||
| - api.WebGL2RenderingContext.attachShader | ||
|
|
@@ -84,10 +81,7 @@ compat_features: | |
| - api.WebGL2RenderingContext.drawBuffers | ||
| - api.WebGL2RenderingContext.drawElements | ||
| - api.WebGL2RenderingContext.drawElementsInstanced | ||
| - api.WebGL2RenderingContext.drawingBufferColorSpace | ||
| - api.WebGL2RenderingContext.drawingBufferFormat | ||
| - api.WebGL2RenderingContext.drawingBufferHeight | ||
| - api.WebGL2RenderingContext.drawingBufferStorage | ||
| - api.WebGL2RenderingContext.drawingBufferWidth | ||
| - api.WebGL2RenderingContext.drawRangeElements | ||
| - api.WebGL2RenderingContext.enable | ||
|
|
@@ -159,7 +153,6 @@ compat_features: | |
| - api.WebGL2RenderingContext.linkProgram | ||
| - api.WebGL2RenderingContext.pauseTransformFeedback | ||
| - api.WebGL2RenderingContext.pixelStorei | ||
| - api.WebGL2RenderingContext.pixelStorei | ||
| - api.WebGL2RenderingContext.polygonOffset | ||
| - api.WebGL2RenderingContext.readBuffer | ||
| - api.WebGL2RenderingContext.readPixels | ||
|
|
@@ -220,7 +213,6 @@ compat_features: | |
| - api.WebGL2RenderingContext.uniformMatrix4fv | ||
| - api.WebGL2RenderingContext.uniformMatrix4x2fv | ||
| - api.WebGL2RenderingContext.uniformMatrix4x3fv | ||
| - api.WebGL2RenderingContext.unpackColorSpace | ||
| - api.WebGL2RenderingContext.useProgram | ||
| - api.WebGL2RenderingContext.validateProgram | ||
| - api.WebGL2RenderingContext.vertexAttrib1f | ||
|
|
@@ -241,25 +233,6 @@ compat_features: | |
| - api.WebGL2RenderingContext.viewport | ||
| - api.WebGL2RenderingContext.waitSync | ||
| - api.WebGLQuery | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Even though this is titled |
||
| - api.WebGLRenderingContext.bindBuffer | ||
| - api.WebGLRenderingContext.bindFramebuffer | ||
| - api.WebGLRenderingContext.bindTexture | ||
| - api.WebGLRenderingContext.checkFramebufferStatus | ||
| - api.WebGLRenderingContext.getBufferParameter | ||
| - api.WebGLRenderingContext.getFramebufferAttachmentParameter | ||
| - api.WebGLRenderingContext.getParameter | ||
| - api.WebGLRenderingContext.getProgramParameter | ||
| - api.WebGLRenderingContext.getRenderbufferParameter | ||
| - api.WebGLRenderingContext.getTexParameter | ||
| - api.WebGLRenderingContext.getUniform | ||
| - api.WebGLRenderingContext.getVertexAttrib | ||
| - api.WebGLRenderingContext.isEnabled | ||
| - api.WebGLRenderingContext.pixelStorei | ||
| - api.WebGLRenderingContext.renderbufferStorage | ||
| - api.WebGLRenderingContext.texImage2D | ||
| - api.WebGLRenderingContext.texParameterf | ||
| - api.WebGLRenderingContext.texParameteri | ||
| - api.WebGLRenderingContext.texSubImage2D | ||
| - api.WebGLSampler | ||
| - api.WebGLSync | ||
| - api.WebGLTransformFeedback | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm open to splitting this into two features, one has baseline low, the other is only supported in Chrome/Edge.
It also has the same support versions as the same functionality in WebGL1, so we could alternatively merge it that way.