Skip to content

blendEquation issue on iOS #3244

@Ziao

Description

@Ziao

When running in WebGL mode on iOS (any WebKit browser), images show up as black boxes.

The error that appears in the console is WebGL: INVALID_ENUM: blendEquation: invalid mode.

It looks like the constants on WebGLRenderingContext are only available from the actual context, and not from the global WebGLRenderingContext on that platform, as are all undefined. In other words, I think you should get FUNC_ADD (etc) from this.gl.FUNC_ADD instead of WebGLRenderingContext.FUNC_ADD inside WebGLRenderer.js. It's probably as simple as initiating this.blendModes after the init() call rather than in the constructor.

I am no WebGL guru by any means, so I don't want to submit a buggy pull request to attempt to fix this, but if you need any other information, please let me know. Using iOS 10.1.1, Phaser 3.1.0.

For anyone running into this issue, a temporary fix is setting the rendering mode to Phaser.CANVAS on iOS, at the cost of losing some features.

Hope this helps!
PS: Great job on P3!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions