Log in or register to post comments

Building up new project from scratch.....

November 16, 2010 - 4:18am #1

Hi all

I am very new to this.I have a doubt.Is it necessary to use native code for AR as if we have opengl APIS in android also available, wont that be sufficient.What I meant is what is the need of native code in c and c++.Is it necessary for projects made through qualcom sdk or is it just there for increasing performance and rendering opengl more efficiently as android doesnt expose all opengl features.

Re: Building up new project from scratch.....

November 18, 2010 - 11:03pm #6

hiii

thanxx i got it:)

Re: Building up new project from scratch.....

November 18, 2010 - 5:39am #5

Yes, the com.qualcomm.QCAR.QCAR Java class contains a set of native method calls that initialize QCAR in native. Most of these are called in the QCARSampleActivity Java class. Each sample project adds a few more native method calls, as well.

The rest of the QCAR API is exposed in native, as you said. That includes everything in the API listing on this site (API tab right next to the FORUMS tab).

- Kim

Re: Building up new project from scratch.....

November 17, 2010 - 7:52pm #4

Hey i jst wana know that com.qualcomm.QCAR.QCAR is the API used in java code to call the native methods.Rest all other apis exposes functionality for native code as said by Kim.Am i right?

Re: Building up new project from scratch.....

November 16, 2010 - 8:23pm #3

Hey Kim thanx a lottt it really helped me and gave me some idea of how the things are actually workin.Will get bck if i have some other doubt.

Re: Building up new project from scratch.....

November 16, 2010 - 8:20am #2

The QCAR SDK performs tracking in native, and exposes SDK functionality in native only. That said, you can easily pass the tracking information back to Java with a minimum amount of native coding. Then you could do your rendering in Java, using Android's OpenGL bindings, etc.

To talk between native and Java you will need to use the JNI (Java Native Interface). Here is a thread with some sample code for calling back to Java with the name of the currently visible trackable:

http://ar.qualcomm.at/node/2000032

- Kim

Log in or register to post comments