webglreport
webglreport copied to clipboard
Erroneously reports some browsers as supporting WebGL2
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.
this message
88 of 88 new functions implemented
Is also fails. 88 of the function have stubs. They have not been implemented.
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)
Sounds good. Would you have time to make a PR for the change?