Having issues with ETC textures that don't happen with PVRTC or uncompressed.


we've used air build app , deploy on ipad, we're having lot of difficulty going other mobile platforms. briefly, our app texture-heavy can't use uncompressed textures. means have smart textures loaded, loading , unloading textures come in , out of use.

 

however, whenever app run on devices use etc textures (so far we've tried kindle hd , nexus) rather pvrtc, enough loads , unloads cause crash. same devices won't crash when loading , unloading uncompressed textures. not viable solution in general because many textures on screen @ once.

 

to eliminate complicating factors, i've reduced test down code, crash when using etc textures, not others. objects don't come flash libraries can found in starling.

 

                    private function upload_unload_data(data:bytearray):void {

                              var context:context3d = starling.context;

                              var atfdata:atfdata = new atfdata(data);

                              var nativetexture:flash.display3d.textures.texture = context.createtexture(

                                        atfdata.width, atfdata.height, atfdata.format, false);

                              nativetexture.uploadcompressedtexturefrombytearray(data,0,false);

                              nativetexture.dispose();

                              nativetexture = null;

                    }

                    private function upload_unload():void {

                              var atf_bytes:bytearray = new bytearray();

                              var file:file = file.applicationdirectory.resolvepath("./assets/atlas.atf");

 

                              var fs:filestream = new filestream();

                              fs.open(file, filemode.read);

                              fs.readbytes(atf_bytes, 0, fs.bytesavailable);

                              fs.close();

 

                              upload_unload_data(atf_bytes);

 

                              settimeout(upload_unload, 0);

                    }

 

 

i can't figure out why happening. best guess leak, based on behavior, couldn't find mention of leak on web (if google problem, you'll see me asking question on starling forums , getting no response). imagine leak of size couldn't creep unnoticed, i'm doubting guess. scout doesn't show leakage either.

 

what's going on here?

could please provide image used create atf, .atf, command create atf. also, version of gaming sdk , platform(win/mac) using? reproduce issue.

 

-nimit



More discussions in AIR Development


adobe

Comments

Popular posts from this blog

Object Fitting Keyboard Shortcuts Disfuntional

Markers not showing up after opening a saved project. Where did they go!?

After Effects error: (-1610153453)