Simple NDK example

Discussion of issues specific to mobile platforms such as iOS, Android, Symbian and Meego.
Post Reply
redpearl
Gnoblar
Posts: 17
Joined: Tue Nov 28, 2017 12:19 am

Simple NDK example

Post by redpearl » Wed Mar 14, 2018 4:00 am

The current NDK example, SampleBrowserNDK, is huge and used many other .a libraries. Does anyone have a simple, hello-world kind, NDK example for beginners to study?
0 x

paroj
OGRE Team Member
OGRE Team Member
Posts: 461
Joined: Sun Mar 30, 2014 2:51 pm
x 53
Contact:

Re: Simple NDK example

Post by paroj » Thu Mar 15, 2018 1:50 pm

the preferred way is to use the the Java bindings:
https://github.com/OGRECave/ogre/blob/v ... ivity.java

but if you want to use the lower-level NDK API you can look at the older example here:
https://github.com/OGRECave/ogre/blob/v ... ityJNI.cpp
0 x

redpearl
Gnoblar
Posts: 17
Joined: Tue Nov 28, 2017 12:19 am

Re: Simple NDK example

Post by redpearl » Fri Apr 06, 2018 12:43 am

My application already have JNI with native code, and I will use Ogre from the native code (instead of from Java code). So the second way looks better for my case.

Is there any instructions for the second way? Particularly, can I build an libOgre.so file (similar to libOgreJNI.so)? So I do not need to include all Ogre source files (.cpp files). The instruction here only talks about first way (i.e. calling from Java).
0 x

Post Reply