Virtualizer and storing models (.ser) on SD card

Started by AceGIS, February 08, 2013, 12:27:40 AM

Previous topic - Next topic

AceGIS

Hi Egon,

Just wondering if you could show an example of using the virtualizer for transferring texture data to SD card. I would also like to store my models on SD card, is this a matter of using the correct path to the SD card??

Thanks in advance.

EgonOlsen

It's pretty simple to use the Virtualizer. Create it, assign it to the TextureManager and then call TextureManager.virtualize(<Texture>); on textures that you want to process.

Do load something from the sd directly, you have to know the path and you have to create an inputstream to access it. Depending on where you stored it, you might need additional rights to access it. Check out the Android SDK documentation for more information.

AceGIS

Thanks Egon. Still working on a large GIS modelling project for real world 3D data and augmented reality. Will let you know more when closer to completion. Thanks again.

AceGIS

Hi Egon,

I have implemented the virtualizer for my textures but I am getting the following in my logcat.

QuoteTexture loaded...65536 bytes/128*128 pixels!
Stored texture data on disk!
Storage state : error

What does the error mean?

EgonOlsen

No idea. It's nothing that jPCT-AE prints out. Try to add

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

to your AndroidManifest.xml

AceGIS

Yes. I have that in my manifest. It seems I cannot read or write anything to the external SD card on my Samsung Galaxy S2 4G (Telstra branded). I have no idea if it's Telstra permissions or Samsung permissions or what?? Really annoying me that I can't find a solution.

Thanks for your help again.

EgonOlsen

I had that on my Galaxy Note too. It always reported the build-in sd-card as full no matter how much space was left on it. The solution was to insert an additional sd-card (no idea if the S2 has such an option). I added a really tiny 512kb one. But now, the system checks that card for space (it always has 512mb free), but writes onto the internal storage. Really strange...