Skip to content

Safari workaround breaks use of preinitialized GL contexts in library_webgl.js #13926

Open
@MarkCallow

Description

@MarkCallow

Somewhere between 2.0.15 and 2.0.17 code was added at line 586 of createContext() in library_webgl.js to workaround some Safari issue. This code tries to dereference the canvas argument to createContext and thus breaks use of preinitialized GL contexts. When using those you pass null as the canvas parameter.

The code that handles preinitialized contexts is at line 621. Presumably the fix is as simple as moving the Safari workaround to the else after line 621, the not-preinitialized case. But I don't have enough familiarity with the webgl library to feel comfortable providing a PR.

This has broken my JS KTX v2 decoder (including Basis Universal) and WebGL uploader. My users are naturally complaining to me. Please fix it as soon as possible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions