verify-compatibility.js 464 Bytes
(function() {
  var checkWebGLCompability = function() {
    var canvas = document.createElement('canvas');
    var gl = canvas.getContext("webgl");
    if (!gl) {
      gl = canvas.getContext("experimental-webgl");
      if (!gl) return false;
    }

    return true;
  };

  if (!checkWebGLCompability()) {
    VLibrasPlugin.showMessage('warning', 'O seu computador não suporta o WebGL. Por favor, atualize os drivers de vídeo.');
    window.stop();
  };
})();