KhronosGroup / KhronosGroup/WebGL

Clarify getContext behavior with webgl / webgl2

Open
#3,256 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
2.9k
Forks
703
Avg merge
2d 9h
Merged PRs (30d)
4

Description

As has been found in https://github.com/emscripten-core/emscripten/pull/13497 and https://github.com/emscripten-core/emscripten/issues/13295 , and pointed out by @kainino0x , the canvas getContext specification at:

https://html.spec.whatwg.org/multipage/canvas.html#dom-canvas-getcontext

is very unclear about whether the 'webgl' and 'webgl2' context types are compatible.

By design they should not be. WebGL2RenderingContext deliberately does not extend WebGLRenderingContext.

Chrome and Firefox implement the correct behavior; Safari does not. The conformance suite needs to be extended to cover this, and the canvas specification updated.

Contributor guide

Open the contributing guide

Research direction

Start with the WHATWG canvas getContext specification and the WebGL conformance suite, using issues 13295 and pull request 13497 for context. Extend coverage for compatibility between the webgl and webgl2 context types and update the canvas specification so the intended behavior is explicit; done means the suite captures the expected distinction and the specification reflects it.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
documentation, testing, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.