Return to Starling Playback Library

changeTexture vs texture and disposing old texture

Questions related to Starling playback library should be asked here.

changeTexture vs texture and disposing old texture

Postby Gigi Marzullo » April 25th, 2017, 10:31 pm

In my project I would like to load an image dynamically and exchange it with one inside GAF atlas.
What is the best? Do I need to use changeTexture method or .texture setter property?
Furthermore, how do I dispose the old texture?
It looks like textures are organized in atlases, so if I dispose the single texture I am replacing, it won't dispose it since it's a subtexture from the atlas. That would require to dispose the full atlas.

I'd like to have your thought on the subject.
User avatar
Gigi Marzullo
 
Posts: 14
Joined: March 10th, 2017, 4:42 pm

Re: changeTexture vs texture and disposing old texture

Postby Назар Левицкий » April 26th, 2017, 11:35 pm

Hi, Gigi!
There is an example of changing a texture in GAFImage.
Hope it will help you.
User avatar
Назар Левицкий
 
Posts: 12
Joined: June 6th, 2014, 12:01 am

Re: changeTexture vs texture and disposing old texture

Postby Gigi Marzullo » May 31st, 2017, 4:20 am

I noticed that if I change the texture I lose the filters...
Do I need to reapply the filters somehow? how?

Thanks.
User avatar
Gigi Marzullo
 
Posts: 14
Joined: March 10th, 2017, 4:42 pm

Return to Starling Playback Library

Who is online

Users browsing this forum: No registered users and 2 guests