Closed lucasvinbr closed 1 year ago
@lucasvinbr this will need a quick rebase, but other than that, looks good!
Also, I suspect the build may be failing because of a bad ccache result. If this is the case, I believe adding a [cache clear]
line on the commit message should clear the cache.
This should fix some AnimatedSprite2Ds breaking on openGL context lost. (issue #35)
I've tested demos 33, 49 and 50 on windows desktop, and fullscreen toggling seems to be fine now. Tested sample 49 in a web build and the sprites also didn't disappear.
I've added a "HasSpriteSheet" method to AnimatedSprite2D, to be able to only subscribe to E_DEVICERESET where it's really needed. AnimatedSprite2D needs to know about the reset in order to point to the rebuilt animationSet data.
I'm not a C++ guy, so I'm not sure if I did things the right way or forgot to clean up something. Maybe there's a better approach for reloading?