Skip to content
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

Erroneously reports some browsers as supporting WebGL2 #43

Open
greggman opened this issue Apr 23, 2019 · 3 comments
Open

Erroneously reports some browsers as supporting WebGL2 #43

greggman opened this issue Apr 23, 2019 · 3 comments

Comments

@greggman
Copy link

Some browsers (Safari) you can enable WebGL2 but in reality they haven't actually implemented WebGL2. AFAICT all Safari has done is (a) respond to getContext('webgl2') and (b) allow GLSL ES 3.0 shaders. All other functionality over WebGL1 does not work. Running the webgl2 conformance tests around 80% of them fail.

What do you think about trying to detect that situation? At the moment a simple test is to test if some of the parameters returned are at least the required minimum values. Safari for example returns both less than minimums and various INVALID_ENUMs for things they haven't yet supported.

@greggman
Copy link
Author

this message

88 of 88 new functions implemented

Is also fails. 88 of the function have stubs. They have not been implemented.

@greggman
Copy link
Author

An even simpler test at the moment may be just to check for errors. If you run the site in Safari you'll see it's getting errors

[Error] WebGL: INVALID_ENUM: getParameter: invalid parameter name
	getParameter
	getParams (stat.js:63)
	getWebglInfo (stat.js:190)
	collect (stat.js:239)
[Error] TypeError: null is not an object (evaluating 'ext.MAX_TEXTURE_MAX_ANISOTROPY_EXT')
	getExtensions (stat.js:90)
	getWebglInfo (stat.js:191)
	collect (stat.js:239)

@emackey
Copy link
Contributor

emackey commented Apr 23, 2019

Sounds good. Would you have time to make a PR for the change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants