I am attempting to detect WebGL support across multiple browsers and I\'ve encountered the following scenario. The current version of Firefox appears to report positive supp
The excellent Three library has, in fact, a mechanism for detecting the following:
For WebGL, particularly, here is the code that is used:
function webgl_support () {
try {
var canvas = document.createElement('canvas');
return !!window.WebGLRenderingContext &&
(canvas.getContext('webgl') || canvas.getContext('experimental-webgl'));
} catch(e) {
return false;
}
};
That code snippet is part of a Detector class which may also display the corresponding error messages to the user.