JsBridge icon indicating copy to clipboard operation
JsBridge copied to clipboard

getContext("experimental-webgl") fails

Open JimSEOW opened this issue 9 years ago • 2 comments

var ctx = document.createElement('canvas').getContext('experimental-webgl');

What needs to be done to make that works?

    `public object getContext(string contextType)
    {
        if (contextType == "2d") {
            if (this.context == null) {
                this.context = new CanvasRenderingContext2D(this.window, this);
            }
            return this.context;
        }
       else if (contextType == "experimental-webgl")
        {
            if (this.context == null)
            {
                this.context = new CanvasRenderingContext2D(this.window, this);
            }
            return this.context;
        }
        return null;
    }`

JimSEOW avatar Sep 02 '16 01:09 JimSEOW

http://stackoverflow.com/questions/22751313/what-is-the-difference-between-getcontextwebgl-vs-getcontext3d

How to create IWebGLRenderingContext.cs ?

JimSEOW avatar Sep 02 '16 01:09 JimSEOW

Getting 3D context from Angle? https://github.com/Microsoft/angle/issues/86

JimSEOW avatar Sep 02 '16 14:09 JimSEOW