Closed subdan closed 5 years ago
I tried the following code that forces the context to be lost, and the texture restores correctly:
var textureCache:TextureCache = new TextureCache();
var image1:ImageLoader = new ImageLoader();
image1.textureCache = textureCache;
image1.source = "https://feathersui.com/examples/tabs/images/men67.jpg"
image1.move(20, 100);
addChild(image1);
var button:Button = new Button();
button.label = "Click Me";
button.move(20, 20);
button.addEventListener(Event.TRIGGERED, function():void
{
Starling.current.context.dispose();
})
this.addChild(button);
I noticed that if I set textureCache value ImageLoader doesn't restore texture after context loss.
Could you please check it? Try to create 5 ImageLoader instances and load 5 different images by URL.