[osg-users] Android osgPlugins

Christian Kehl Christian.Kehl at uni.no
Thu Apr 16 06:33:46 PDT 2015


Jan Ciger <jan.ciger at ...> writes:

> 
> 
> 
> Hello Christian,
> 
> 
> On Wed, Apr 15, 2015 at 4:15 PM, Christian Kehl
<Christian.Kehl-Fu+0IGNV3AI at public.gmane.org> wrote: 
> Hi,
> I had a look on the OsgMainApp.hpp, where these plugin links are all active
> (looks as follows):
> //Static plugins Macro
> USE_OSGPLUGIN(ive)
> USE_OSGPLUGIN(osg)
> USE_OSGPLUGIN(osg2) 
> 
> 
> 
> USE_OSGPLUGIN(terrain)
> USE_OSGPLUGIN(rgb)
> USE_OSGPLUGIN(OpenFlight)
> USE_OSGPLUGIN(dds)
> //Static DOTOSG
> USE_DOTOSGWRAPPER_LIBRARY(osg)
> USE_DOTOSGWRAPPER_LIBRARY(osgFX)
> USE_DOTOSGWRAPPER_LIBRARY(osgParticle)
> USE_DOTOSGWRAPPER_LIBRARY(osgTerrain)
> USE_DOTOSGWRAPPER_LIBRARY(osgText)
> USE_DOTOSGWRAPPER_LIBRARY(osgViewer)
> USE_DOTOSGWRAPPER_LIBRARY(osgVolume)
> //Static serializer
> USE_SERIALIZER_WRAPPER_LIBRARY(osg)
> USE_SERIALIZER_WRAPPER_LIBRARY(osgAnimation)
> USE_SERIALIZER_WRAPPER_LIBRARY(osgFX)
> USE_SERIALIZER_WRAPPER_LIBRARY(osgManipulator)
> USE_SERIALIZER_WRAPPER_LIBRARY(osgParticle)
> USE_SERIALIZER_WRAPPER_LIBRARY(osgTerrain)
> USE_SERIALIZER_WRAPPER_LIBRARY(osgText)
> USE_SERIALIZER_WRAPPER_LIBRARY(osgVolume)
> if one of them would go wrong, my JNI-compiler would mourn, I presume ?
> Hence, the links are active, still the models are not loaded.
> 
> 
> That looks sensible to me. 
> 
>  
> 
> 
> At the moment, I follow this approach:
> go on the commandline to my workdirectory,
> execute "<path-to-ndk>/ndk-build", then go to eclipse,
> hit "start" and try out the app.
> May that be a cause for problems ?
> 
> 
> No not really. That is pretty much how it should be built.
> 
> It would be best to turn on debugging and check where exactly it fails. It
could also be that you don't have osgDB compiled statically for some reason
- it was looking for its shared library. Does it load an .ive or .osg file?
Or no files at all?
> 
> J.


It load's nothing at all, no matter the size. I tried out cessna.osg and
cow.osg from the sample set, an indoor .wrl-model I have (just one blank
wall, 100MB), a larger 3ds file - all run fine on the desktop but not a
single model loads on mobile. I try it currently out with the Nexus 5 and
the NVIDIA Shield tablet - same results at both.

How do I make sure it uses the ".a"-files (static libraries) ? I just used
the Android.mk that is shipped with the example, added -lgnustl..., as
written in all blogs to the topic, set the OSG_ANDROID_DIR to the location
of the local OSG_Android root install location (the folder with "bin" and
"lib" inside). As ndk-build reports, LOCAL_STATIC_LIBRARIES is not set in
the Android.mk, instead all libraries are referred in LOCAL_LDFLAGS.


More information about the osg-users mailing list