Jump to content

PIXI.autoDetectRenderer TypeError: gl.getInternalformatParameter is not a function


Gangafintie
 Share

Recommended Posts

When trying to run PIXI.autoDetectRenderer in Safari 14.1 we get the following error

    [Error] Unhandled Promise Rejection: TypeError: gl.getInternalformatParameter is not a function. (In 'gl.getInternalformatParameter(gl.RENDERBUFFER, gl.RGBA8, gl.SAMPLES)', 'gl.getInternalformatParameter' is undefined)
        (anonymous function) (main.c39d6dcf.js:27763)
        (anonymous function) (main.c39d6dcf.js:21272)
        (anonymous function) (main.c39d6dcf.js:27454)
        (anonymous function) (main.c39d6dcf.js:27467)
        Renderer (main.c39d6dcf.js:33069)
        (anonymous function)) (main.c39d6dcf.js:33104)
        PixiWorld (main.c39d6dcf.js:92750)
        init (main.c39d6dcf.js:94076)
        init
        active (main.c39d6dcf.js:56402)
        K (main.c39d6dcf.js:56314:675)
        na (main.c39d6dcf.js:56317:376)
        (anonymous function) (main.c39d6dcf.js:56316:788)
       (anonymous function)
        (anonymous function)) (main.c39d6dcf.js:56314:1641)
        promiseReactionJob


Here is the code we used

        this.renderer = PIXI.autoDetectRenderer(
            {width: App.WIDTH, 
             height: App.HEIGHT, 
             backgroundColor: 0x0b3a21, 
             view:document.getElementsByTagName("canvas")[0] as HTMLCanvasElement | undefined}
        );

This used to work fine but broke with the latest safari update. How can we fix this?

 

We used pixi 5.3.3

Edited by Gangafintie
Link to comment
Share on other sites

Safari doesn't offer complete support to webgl2 . At least looks like that function is missing: https://developer.mozilla.org/en-US/docs/Web/API/WebGL2RenderingContext/getInternalformatParameter

You could try forcing webgl1 into use when on Safari (settings.PREFER_ENV). Do you have webgl2 enabled on experimental features? Or could it be that Safari finally has added support for webgl2.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...