Looks like CreateScreenshotUsingRenderTarget is broken on Mac and iOS while using Safari.
I ran across this issue that seemed similar, however, the above function throws errors on both the latest version of macOS and iOS (with fairly new devices, that should definitely be WebGL 2 capable).
This used to work with no changes on our part. We updated from Babylon 5.38.0 to 6.9.0 and started seeing the issue, if that helps narrow down where this may of started.
There has been no changes in the 3 files involved (dumpData.ts, tools.ts and screenshotTools.ts) since then, so Iām not sure what the problem could beā¦
For testing purpose, I have updated your PG to use the old code before 5.33.0:
Ah, I seem to have failed looking at the history of these files, obviously there have been changes over the last few monthsā¦
Perhaps we could add a static boolean DumpTools.DisableOffscreenCanvas that users could set before using the screenshot APIs, to create a canvas instead of an OffscreenCanvas?
[EDIT] Or, if weāre sure that context creation fails and the ThinEngine constructor throws an exception (which seems to be the case in the screenshot), I could catch it and use a canvas instead, removing the need for the new staticā¦