Description
Describe the bug
Since the last macOS and Safari version, textImage2D
does not accept OffscreenCanvas anymore as a pixel source for texture. Passing directly a OffscreenCanvas element will throw a Type Error
exception.
Device:
- OS: macOS 13.3
- Browser: Safari 16.4
- melonJS Version: 14.0 and higher
Solution
This was fixed in the 15.1 release by using transfertToBitmapImage() when the pixels source is an Offscreen Canvas.
Unfortunately, that led to another issue when using Offscreencanvas and system font rendering in WebGL, with the converted BitmapImage producing some garbaged pixel soup :
Internal use of OffscreenCanvas
when rendering text was then also disabled in the same fix, to restore the previous behaviour :
In conclusion, the issue is fixed for now, but I'm creating this issue, because I'm not sure if this is actually the expected behaviour as per the W3C/WebGL standard or a bug with the current version of Safari (other browsers are still fine with using OffscreenCanvas as a pixel source).
If anyone has any additional insight on this, I'm definitely interested !
Activity