I'm trying to integrate the Vuforia SDK with our existing Android app. Our app is a large native app with minimal Java code. My approach has been to try to get the camera feed rendering over the top of our GL clear calls by integrating the relevant changes found in either the ImageTargets sample, or as found here...
At this point I think I've made all the required changes, but the sample app works and my app, while appearing to work, renders nothing more than it usually would.
In brief the things I've done are...
- Modify our build process such that libQCAR.so is packaged with the APK.
- Loaded libQCAR.so inside a static block of Java code.
- Called QCAR setInitParameters and QCAR.init. We used GL_20 and these calls both succeed.
- I've added hooks for onPause and onResume and forwarded to QCAR.
- I've added a Java method named onGLInitialized, called from native code after the window and GL context have been created and from here have called QCAR.onSurfaceCreated and onSurfaceChanged.
- I've added a block of native code to initialize and start the camera, called in the middle of our apps initialisation. This appears to complete without error.
- I've added a call to drawVideoBackground, called once per frame inside begin/end calls on the QCAR renderer instance.
- I've also added manifest permissions for the camera.
I was expecting at this point I'd see the camera feed rendering behind my own 3D graphics, but instead I just see the clear colour.
I'm not sure what I could be missing. I can't see much else relevant in the sample code. I can provide more details on any of the changes I've made if that helps but otherwise if anyone could point out what I'm missing I'd be very appreciative!