Author Topic: Virtualizer and storing models (.ser) on SD card  (Read 3207 times)

Offline AceGIS

  • byte
  • *
  • Posts: 32
    • View Profile
Virtualizer and storing models (.ser) on SD card
« on: February 08, 2013, 12:27:40 am »
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.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Virtualizer and storing models (.ser) on SD card
« Reply #1 on: February 08, 2013, 09:05:08 pm »
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.

Offline AceGIS

  • byte
  • *
  • Posts: 32
    • View Profile
Re: Virtualizer and storing models (.ser) on SD card
« Reply #2 on: February 14, 2013, 03:24:29 am »
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.

Offline AceGIS

  • byte
  • *
  • Posts: 32
    • View Profile
Re: Virtualizer and storing models (.ser) on SD card
« Reply #3 on: February 20, 2013, 11:29:41 pm »
Hi Egon,

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

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

What does the error mean?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Virtualizer and storing models (.ser) on SD card
« Reply #4 on: February 20, 2013, 11:34:35 pm »
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

Offline AceGIS

  • byte
  • *
  • Posts: 32
    • View Profile
Re: Virtualizer and storing models (.ser) on SD card
« Reply #5 on: February 21, 2013, 09:51:22 pm »
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.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Virtualizer and storing models (.ser) on SD card
« Reply #6 on: February 21, 2013, 10:22:05 pm »
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...