[osg-users] Android osgPlugins

Rafa Gaitan rafa.gaitan at gmail.com
Fri May 1 23:47:05 PDT 2015


Hi,

If you built OSG in static, then the osgsimple sample should load properly
the cessna model without worry about that message. OSG usually use the
dynamic loading of the plugins and always emits that message even in static
if the "dynamic" plugins is not found, anyway osgandroid preconfigures some
of the required plugins in  the JNIosgDB.cpp filename using the macro
USE_OSGPLUGIN.

If it's not working, maybe is something related to how you compiled OSG, or
maybe your device has multiple external storages and the sample didn't
found the model in the expected path.

My build configuration for osg was:

cmake .. -DANDROID_NDK=/Users/rgaitan/Projects/android/android-ndk-r10c/
-DCMAKE_TOOLCHAIN_FILE=../PlatformSpecifics/Android/android.toolchain.cmake
          -DOPENGL_PROFILE="GLES1" -DDYNAMIC_OPENTHREADS=OFF
-DDYNAMIC_OPENSCENEGRAPH=OFF          -DANDROID_NATIVE_API_LEVEL=15
  -DANDROID_ABI=armeabi
-DCMAKE_INSTALL_PREFIX=/Users/rgaitan/Projects/OSG/osg-trunk-android-static-gles1-sdk/
I hope you make it work soon :)

Regards,
Rafa.


2015-04-30 18:58 GMT+02:00 Christian Kehl <christian-kehl at web.de>:

> Hi,
> So, I needed to uncomment my submitted fix in GLDefines again, but with
> that, I actually made it through the compilation (yeaha).
>
> Now, it generates the jar, I start osgSimple (I also created the
> osgAndroid folder on the phone and put the cessna in it) - buuut: the ap
> doesn't find the compiled library .a-files:
>
> (eclipse report)
> 04-30 18:50:05.218: I/OpenSceneGraph-Android Library(11567): Successfully
> initialized
> 04-30 18:50:05.226: I/org.openscenegraph.osg.viewer.JNIViewer(11567):
> CullSettings::readEnvironmentalVariables()
> 04-30 18:50:05.226: I/org.openscenegraph.osg.viewer.JNIViewer(11567):
> CullSettings::readEnvironmentalVariables()
> 04-30 18:50:05.226: I/org.openscenegraph.osg.viewer.JNIViewer(11567):
> CullSettings::readEnvironmentalVariables()
> 04-30 18:50:05.226: I/org.openscenegraph.osg.viewer.JNIViewer(11567):
> CullSettings::readEnvironmentalVariables()
> 04-30 18:50:05.226: I/org.openscenegraph.osg.viewer.JNIViewer(11567):
> CullSettings::readEnvironmentalVariables()
> 04-30 18:50:05.226: I/org.openscenegraph.osg.viewer.JNIViewer(11567):
> ShaderComposer::ShaderComposer() 0x70513830
> 04-30 18:50:05.226: I/org.openscenegraph.osg.viewer.JNIViewer(11567):
> ShaderComposer::ShaderComposer() 0x70513ba0
> 04-30 18:50:05.227: I/org.openscenegraph.osg.viewer.JNIViewer(11567):
> View::setSceneData() Reusing existing scene0x70526418
> 04-30 18:50:05.227: I/org.openscenegraph.osg.viewer.JNIViewer(11567): OSG
> Version:3.3.8
> 04-30 18:50:05.227: I/org.openscenegraph.osg.viewer.JNIViewer(11567):
> CullSettings::readEnvironmentalVariables()
> 04-30 18:50:05.227: I/org.openscenegraph.osg.viewer.JNIViewer(11567):
> CullSettings::readEnvironmentalVariables()
> 04-30 18:50:05.227: I/org.openscenegraph.osg.viewer.JNIViewer(11567):
> CullSettings::readEnvironmentalVariables()
> 04-30 18:50:05.227: I/org.openscenegraph.osg.viewer.JNIViewer(11567):
> CullSettings::readEnvironmentalVariables()
> 04-30 18:50:05.227: I/org.openscenegraph.osg.viewer.JNIViewer(11567):
> CullSettings::readEnvironmentalVariables()
> 04-30 18:50:05.227: I/org.openscenegraph.osg.viewer.JNIViewer(11567):
> ShaderComposer::ShaderComposer() 0x70513f60
> 04-30 18:50:05.227: I/org.openscenegraph.osg.viewer.JNIViewer(11567):
> ShaderComposer::ShaderComposer() 0x70529330
> 04-30 18:50:05.650: I/org.openscenegraph.osg.viewer.JNIViewer(11567):
> Warning: dynamic library 'osgPlugins-3.3.8/osgdb_osg.so' does not exist (or
> isn't readable):
> 04-30 18:50:05.650: I/org.openscenegraph.osg.viewer.JNIViewer(11567):
> dlopen failed: library "osgPlugins-3.3.8/osgdb_osg.so" not found
> 04-30 18:50:05.650: I/org.openscenegraph.osg.viewer.JNIViewer(11567):
> DynamicLibrary::failed loading "osgPlugins-3.3.8/osgdb_osg.so"
> 04-30 18:50:05.650: W/org.openscenegraph.osg.viewer.JNIViewer(11567): No
> data loaded
> 04-30 18:50:05.650: E/org.openscenegraph.osg.db.JNIosgDB(11567): Error
> loading scene
> 04-30 18:50:05.650: W/OSGActivity(11567): Attempt to invoke virtual method
> 'long org.openscenegraph.osg.core.Node.getNativePtr()' on a null object
> reference
> 04-30 18:50:05.658: D/OpenGLRenderer(11567): Render dirty regions
> requested: true
> 04-30 18:50:05.660: D/Atlas(11567): Validating map...
> 04-30 18:50:05.709: D/NvOsDebugPrintf(11567): NvRmPrivGetChipPlatform:
> Could not read platform information
> 04-30 18:50:05.709: D/NvOsDebugPrintf(11567): Expected on kernels without
> fuse support, using silicon
> 04-30 18:50:05.730: I/OpenGLRenderer(11567): Initialized EGL, version 1.4
> 04-30 18:50:05.781: D/OpenGLRenderer(11567): Enabling debug mode 0
> 04-30 18:50:05.930: V/RenderScript(11567): Application requested CPU
> execution
> 04-30 18:50:05.934: V/RenderScript(11567): 0x789cae00 Launching thread(s),
> CPUs 4
>
> where do I have to copy the osgPlugins-3.3.8 folder to so to make that all
> work ?
>
> I'm already quite happy it made it through the compilation - nice effort
> guys!
>
> Cheers,
> Christian
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=63589#63589
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 
Rafael Gaitán Linares
CTO at Mirage Technologies S.L - http://www.mirage-tech.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20150502/38bfccda/attachment-0001.htm>


More information about the osg-users mailing list