public WebGLRenderingContext GetContextWebGL(WebGLContextAttributes attributes) { if (attributes == null) attributes = new WebGLContextAttributes(); string[] names = { "experimental-webgl", "webgl", "moz-webgl", "webkit-webgl", "webkit-3d" }; for (int index = 0; index < names.Length; index++) { try { WebGLRenderingContext ctx = (WebGLRenderingContext)GetContext(names[index], attributes); // Hook for the semi-standard WebGLDebugUtils script. if ((bool)Script.Literal("window.WebGLDebugUtils")) return (WebGLRenderingContext)Script.Literal("window.WebGLDebugUtils.makeDebugContext({0})", ctx); return ctx; } catch { } } return null; }
public WebGL GetContext(string contextID, WebGLContextAttributes attributes) { return null; }
public object GetContext (string name, WebGLContextAttributes attribtues) { throw new System.NotSupportedException (); }