Some webGL methods are not functioning properly in IE11 Version 11.0.9600.16428 and older versions, as detailed here: https://github.com/mrdoob/three.js/issues/3600)
For example, the clearStencil
method seems to exist but does not work as expected. I am looking for a way to detect this issue and provide feedback to the user. I attempted to use Detector.js from Three.js, but it only checks if the browser and graphics card support WebGL, not if they support all necessary features.
I attempted a WebGL check like so:
var supportsWebGL=function(){
if(Detector.webgl){
var _canvas = document.createElement( 'canvas' );
var _gl = _canvas.getContext( 'webgl' ) || _canvas.getContext( 'experimental-webgl' );
try{
_gl.clearStencil( 0 );
}catch(e){
return false;
}
return true;
}else{
return false;
}
}
In IE11 (11.0.9600.16428), the supportsWebGL
method returns true, but throws an error like:
WEBGL11095: INVALID-OPERATION: clearStencil: Method not currently supported.
Now, I want my supportsWebGL
method to recognize this incompatibility and return false. Any suggestions on how to achieve this?