[osg-users] [build] Building OSG for Android on Windows

144 views
Skip to first unread message

Zach Cregan

unread,
Jul 21, 2016, 3:44:04 AM7/21/16
to osg-...@lists.openscenegraph.org
Hi,

I'm working on a mobile app which displays interactive 3D indoor maps. I mainly work on iOS and have been using Apple's SceneKit with good results. On Android we've been using a 3D library called JPCT, but the results aren't quite what we were hoping for. JPCT has issues rendering some of our models and the performance is nowhere near what we're seeing on iOS with SceneKit (and that's on Android devices with significantly more power than the iPhones we're testing on). I'm really interested in trying out OpenSceneGraph as a replacement for JPCT. I'm trying to setup a barebones Android application using OpenSceneGraph to load an OBJ and MTL file from disk with some basic camera controls.

I can't get OSG compiled for Android though. I've been following the instructions from the OpenSceneGraph website > "Documentation" > "Platform Specifics" > "Android" > "Building OpenSceneGraph for Android [3.3.x - 3.4]". I'm on Windows, I've cloned the 3.4 branch to my system, downloaded the latest Android NDK, installed the latest version of cmake, and then ran this command:
> cmake .. -DANDROID_NDK=C:\Users\Zachary\Desktop\android-ndk-r12b -DCMAKE_TOOLCHAIN_FILE=../PlatformSpecifics/Android/android.toolchain.cmake -DOPENGL_PROFILE="GLES2" -DDYNAMIC_OPENTHREADS=OFF -DDYNAMIC_OPENSCENEGRAPH=OFF -DANDROID_NATIVE_API_LEVEL=15 -DANDROID_ABI=armeabi -DCMAKE_INSTALL_PREFIX=C:\Users\Zachary\Desktop\OpenSceneGraph
But I'm getting this error:
> CMake Error at CMakeLists.txt:52 (PROJECT): CMAKE_SYSTEM_NAME is 'Android' but 'NVIDIA Nsight Tegra Visual Studio Edition' is not installed.


Do I actually need to get this NVIDIA Nsight Tegra Visual Studio Edition? I haven't seen that dependency mentioned anywhere on the OSG website, forum, or through any Googling so I thought I must be doing something wrong. I appreciate any help. I have some experience setting up builds for iOS with Xcode, but this NDK stuff is beyond me.

Thank you!
Zach

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=68186#68186





_______________________________________________
osg-users mailing list
osg-...@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Jan Ciger

unread,
Jul 21, 2016, 4:25:44 AM7/21/16
to OpenSceneGraph Users


On Thu, Jul 21, 2016 at 7:04 AM, Zach Cregan <zcr...@outlook.com> wrote:
Hi,
...
 
Do I actually need to get this NVIDIA Nsight Tegra Visual Studio Edition? I haven't seen that dependency mentioned anywhere on the OSG website, forum, or through any Googling so I thought I must be doing something wrong. I appreciate any help. I have some experience setting up builds for iOS with Xcode, but this NDK stuff is beyond me.

Thank you!
Zach


I haven't built OSG for Android in a while, but a quick check of the current code doesn't show the above line in the build system. I recall the Tegra stuff was not really necessary and I believe it is not even avaliable anymore. 3.4 is quite old, try to update to the latest 3.5 branch or even master and that should get rid of that issue.

Apropos, if you want to save yourself a lot of trouble, don't use the official NDK from Google but the repackages Crystax variant: https://www.crystax.net/en/android/ndk

It should be a drop-in replacement but with a ton of bugs fixed. (NDK is a serious pain in the backside ...)

Regards,

J.

Reply all
Reply to author
Forward
0 new messages