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

Zach Cregan zcregan at outlook.com
Wed Jul 20 22:04:22 PDT 2016


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








More information about the osg-users mailing list