Hi Tom,
That's an interesting new test case.  I'd be curious if you could get
your files to load using my most recent code submission and adding
"pathtoapk.apk/assets" to OSG_FILE_PATH.  I suspect you would also
have to get the .zip plugin to recognize your .apk file; maybe you can
add that extension to ReaderWriterZIP.cpp just to test, but I don't
know what the permanent solution would be.

I have only tested using files in the root of my archive and not in
subdirectories.  This test would be a good new data point and maybe
give us more ideas.
--
Terry Welsh
mogumbo 'at' gmail.com
www.reallyslick.com


>
> Hi Guys
>
> Sorry to butt in, I've been following this thread with interest
>
>
>> Could you make some suggestions about some simple example data and
>> usages that we can put together to test the specific issues you are
>> seeing.
>>
>
> I've recently ported a few games I've made for IOS to Android. Android
> applications exist in a .apk file which is readable as a zip archive. This
> meant I had to access all my asset files within the archive, most of which
> were setup with relative paths.
>
> I managed to achieve this using a osgDB::ReadFileCallback, but had to wrap
> all my osgDB::readNodeFile etc calls into my own class to handle attaching
> it each time, I also had to use the class to ensure my relative file paths
> where being read from the archive on Android and not through
> osgDB::readNodeFile. The android apk also had the added anoyance that all
> the assets had to be in a folder called "assets" and could be placed in the
> root, so all my read calls have "/assets/" prepended.
>
> I guess what I'm saying is Android apk files are a good example of wanting
> to read files within an archive as if it's just another disk. So that you
> don't have to change any assets or file paths when running on Android.
>
> Terry's work seems to address the main issues of models referencing local
> images and correct me if 'm wrong, but not having to give the full path
> including the archive once opened. Android files do though raise another
> issue of wanting to mount a specific folder in the archive. In Androids
> case mounting pathtoapk.apk/assets/.
>
> I'd be interested in testing things out on the Android side once I'm
> more familiar with the changes.
>
> Cheers
> Tom
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to