Skip to content

Instantly share code, notes, and snippets.

@thejefflarson
Created June 10, 2013 20:35
Show Gist options
  • Select an option

  • Save thejefflarson/5752052 to your computer and use it in GitHub Desktop.

Select an option

Save thejefflarson/5752052 to your computer and use it in GitHub Desktop.
glEnabled: function() {
try {
return !!window.WebGLRenderingContext &&
(!!document.createElement('canvas').getContext('experimental-webgl') ||
!!document.createElement('canvas').getContext('webgl'));
} catch(e) {
return false;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment