I wasn't able to build the static version of OpenSceneGraph using the
provided guide, so I tried building a shared version directly using CMake
and the Android NDK toolchain which seems to have worked.

The problem I have right now is with osgPlugins-x.y.z being prefixed to the
search path by OSG. As an experiment, I put some osgPlugins in the sdcard
folder (external storage) /sdcardpath/osgPlugins-x.y.z/ and if I explicitly
specify this path (/sdcardpath) to the osgDB::Registry, it loads the
plugins just fine. This isn't okay for general app deployment though.

I was able to pack shared object (plugin) files without a 'lib' prefix in
the APK/lib directory. I'm unable to create any more directories in
APK/lib. Unfortunately I can't load these because (I think) OSG is
prefixing the path with "osgPlugins-x.y.z.". I want to disable this
behavior so I can package the app properly.


On Tue, Sep 10, 2013 at 3:32 PM, Jorge Izquierdo Ciges <[email protected]>wrote:

> Android has a serie of troubles:
>
> 1rst every library has to begin with lib if has to be included in the APK
> 2nd every library has to be loaded at the first try or will never be
> loaded until you close your application
> 3rd If your library needs a dependence he will not load it even if its on
> the same directory
>
> So... 1rst -> OSG searches plugins without lib at the begin and they are
> compiled with lib if my memory is well enough.
> 2nd  -> this is confirmed for versions pre 4.2
> 3rd   -> this is confirmed for versions pre 4.2
>
> At least on a Nexus 4 the 2/3 don't happen anymore with the last version.
> I have OSG with shared libraries and plugins in Android but it is far from
> submission because we changed a lot of things and we are checking
> everything thrice, so don't expect it soon.
>
> But... you can make it work, my phone is proof.
>
>
> 2013/9/10 Preet <[email protected]>
>
>> m to create an osgPlugins directory where OSG ends up being deployed in
>> the application package so I just want OSG to load plugins from the
>> directory where the rest of the shared objects live on Android:
>>
>> /data/app-lib/org.some.app/    <--- where all the *.so libraries live,
>> including osgdb_xx.so
>>
>
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to