Return to Starling Playback Library

Loading uncompressed / unzipped files

Questions related to Starling playback library should be asked here.

Loading uncompressed / unzipped files

Postby Ersen Danacı » December 14th, 2015, 12:14 am

I want to load the files in the zip file seperately instead of loading single zip file. (gaf and texture files) Reason is handling lost context situation my self. In the current situation gaf restores textures by keeping bitmap datas in ram. I will change that to dynamically loading texture atlasses after context loss. So I need to integrate the texture files to my loader system.

I tried to find any other converter then ZipToGAFAssetConverter but couldn't. There is a BinGAFAssetConfigConverter class which converts configuration file but does not create GAF objects. As fas as I see ZipToGAFAssetConverter is the only class which instantiates GAF timeline, movieclips etc. Is there a hidden mechanism I miss or should I implement that feature manually? (by duplicating some codes in ZipToGAFAssetConverter)

Thank you.
User avatar
Ersen Danacı
 
Posts: 8
Joined: May 11th, 2015, 8:37 am

Re: Loading uncompressed / unzipped files

Postby vadym.mitin » December 14th, 2015, 8:00 am

Hi Ersen,

Here are some key places that you need to modify in order to get described result:

https://github.com/CatalystApps/Starlin ... er.as#L674 - the place where you need to pass URL to the texture atlas

https://github.com/CatalystApps/Starlin ... ata.as#L67 - here you need to save the URL

https://github.com/CatalystApps/Starlin ... ta.as#L442 - the place where you can define "onRestore" function (for PNG texture atlases)

https://github.com/CatalystApps/Starlin ... ta.as#L454 - the place where you can define "onRestore" function (for ATF texture atlases)

https://github.com/CatalystApps/Starlin ... er.as#L472 - remove this line of code in order to always dispose loaded images and bitmap data after the texture atlases loaded into video memory

https://github.com/CatalystApps/Starlin ... ta.as#L115 - also remove this line of code

ZipToGAFAssetConverter property "actionWithAtlases" should be set to ACTION_LOAD_IN_GPU_MEMORY_ONLY_DEFAULT (by default) or ACTION_LOAD_ALL_IN_GPU_MEMORY in order to force ZipToGAFAssetConverter to load texture atlases into video memory before disposing images

Hope this information will help you.
User avatar
vadym.mitin
 
Posts: 254
Joined: December 4th, 2013, 8:00 am

Return to Starling Playback Library

Who is online

Users browsing this forum: No registered users and 2 guests