CesiumGS / webglreport

A web page that reports a browser's WebGL capabilities, including supported extensions and implementation specific capabilities, such as the maximum number of texture units.
https://webglreport.com
Apache License 2.0
400 stars 100 forks source link

Erroneously reports some browsers as supporting WebGL2 #43

Open greggman opened 5 years ago

greggman commented 5 years ago

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 commented 5 years ago

this message

88 of 88 new functions implemented

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

greggman commented 5 years ago

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 commented 5 years ago

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