Currently I detect if WebGL is available with creating a canvas and trying to get the context for "webgl" and "experimental-webgl". If both return null, WebGL will be disabled. Now the Problem is, when the user has IEWebGL installed the application itself works fine, but both getContext’s return null, so the availability check returns false. When I visit the tutorial at the IEWebGL website (http://iewebgl.com/Developer.aspx#CreatingTutorial) I can see that they are doing it exactly like I am. Am I missing something?
Some code:
var contextNames = ["webgl", "experimental-webgl"];
var isEnabled = false;
for(var i = 0, length = contextNames.length; i < length; i++)
if(canvas[0].getContext(contextNames[i]))
isEnabled = true;
You don’t create a canvas element in IEWebGL, you use a object elment instead. Try to replace your canvas element with this and see if it works: