protected WebGL2RenderingContextBase( JSObject canvas, string contextType, WebGLContextAttributes contextAttributes, string windowPropertyName = WindowPropertyName) : base(canvas, contextType, contextAttributes, windowPropertyName) { }
protected WebGLRenderingContextBase( JSObject canvas, string contextType, WebGLContextAttributes contextAttributes, string windowPropertyName = WindowPropertyName) { if (!CheckWindowPropertyExists(windowPropertyName)) { throw new PlatformNotSupportedException( $"The context '{contextType}' is not supported in this browser"); } gl = (JSObject)canvas.Invoke("getContext", contextType, contextAttributes?.Handle); }
public WebGLRenderingContext(JSObject canvas, WebGLContextAttributes contextAttributes) : base(canvas, "webgl", contextAttributes) { }