TypeError: Failed to execute 'texImage2D' on 'WebGL2RenderingContext': Overload resolution failed

I was seeing this error before in the past months, but I had no idea where it was coming from.
Now I tried to simulate webgl context lost/restored for the first time in a while and that’s when I got it locally:

I’m on version 5.0.0-beta.6, but expect it to be in there from the alpha on as well…

this is the code I use to simulate, it happens after the restoreContext call.

    const loseContext = engine.babylonScene.getEngine()._gl.getExtension('WEBGL_lose_context')!;
    void System.delay(10000).then(() => loseContext.loseContext());
    void System.delay(11000).then(() => loseContext.restoreContext());

I will see if I can playground it later when I have time.

Yes please, provide a PG so we can have a look

I located the issue, and it’s not a bug in Babylon, so we’re good!

(maybe the error message could be improved, not sure!)

If you’re interested:

1 Like