Created
August 31, 2012 17:39
-
-
Save jeromeetienne/3556305 to your computer and use it in GitHub Desktop.
webgl instpect got a dependancy on domReady
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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