Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What are missing to get JsBridge support WebGl? #40

Closed
JimSEOW opened this issue Sep 2, 2016 · 1 comment
Closed

What are missing to get JsBridge support WebGl? #40

JimSEOW opened this issue Sep 2, 2016 · 1 comment

Comments

@JimSEOW
Copy link

JimSEOW commented Sep 2, 2016

deltakosh/JsBridge#16

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

What needs to be done to make that works? There is no WebGLRenderingContext.cs
How to create WebGLRenderingContext.cs that links to the OpenGL example here?

    `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" || contextType == "webgl")
        {
            if (this.context == null)
            {
                this.context = new WebGLRenderingContext(this.window, this);
            }
            return this.context;
        }
        return null;
    }`
@liminzhu
Copy link
Member

liminzhu commented Sep 7, 2016

DOM and canvas are really out of the scope of JavaScript and Chakra/ChakraCore. deltakosh/JsBridge#16 would be a better place for this discussion.

@liminzhu liminzhu closed this as completed Sep 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants