Closed subdan closed 5 years ago
That should work, actually — there haven't been any changes in this area lately. Do you have a complete sample that I could use to reproduce your problem? Maybe it's a specific setup I didn't think about. Also, have a look at this this section in the Starling Manual.
Ok. I will check it again and get back to you within next week.
Checked again. All is ok.
I'm glad to hear it's working! Thanks for checking again. :smile:
Hello, Daniel.
How can I manually restore a texture after context loss? I tried to use:
texture.root.onRestore = function():void { }
but the onRestore function doesn't fire on context loss. I get invalid bitmap data error.
In my app I use default
CameraUI
to capture an image. After the image is ready I create a Texture.var texture:Texture = Texture.fromBitmapData(bitmapData, false, false, Starling.current.contentScaleFactor);
And show this image withImage
.How to handle context loss to restore captured image after context restoration?