Skip to content

Instantly share code, notes, and snippets.

@jeromeetienne
Created August 31, 2012 17:39
Show Gist options
  • Save jeromeetienne/3556305 to your computer and use it in GitHub Desktop.
Save jeromeetienne/3556305 to your computer and use it in GitHub Desktop.
webgl instpect got a dependancy on domReady
<!doctype html>
<script src='http://benvanik.github.com/WebGL-Inspector/core/embed.js'></script>
<body><script>
// This is from Detector.js
// see https://github.com/mrdoob/three.js/blob/master/examples/js/Detector.js#L9
// It will display
// $ gotFunction true
// $ gotContext false
//
// So no context, aka WebGL not available...
// remove webgl inspector embed.js and webgl is available
var gotFunction = !! window.WebGLRenderingContext;
console.log('gotFunction', gotFunction)
var gotContext = !! document.createElement( 'canvas' ).getContext( 'experimental-webgl' );
console.log('gotContext', gotContext)
</script></body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment