Skip to content

Instantly share code, notes, and snippets.

@jeromeetienne
Created April 13, 2011 14:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jeromeetienne/917600 to your computer and use it in GitHub Desktop.
Save jeromeetienne/917600 to your computer and use it in GitHub Desktop.
how to detect webgl (tested to work in chrome10 and ff4)
try {
var webGlSupport = !!window.WebGLRenderingContext && !!document.createElement('canvas').getContext('experimental-webgl');
}catch(e){
var webGlSupport = false;
}
console.log("webglSupport", webGlSupport);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment