Log in or register to post comments

NativeActivity custom engine drawVideoBackground issues

September 11, 2015 - 3:13pm #1

I am using Vuforia with openGL initialized inside of a NativeActivity and I'm not using a glSurfaceView. I am able to initialize the library, start the camera and track markers. I am unable to draw the camera image. I have tried creating a texture from the pixel data as well as bind the camera texture to a shader and drawing it directly. I think the problem is the context created in my native activity is not shared with the context being used by the Vuforia library to draw the camera image. Is there any other way of getting the camera image? Here is a dump of my logcat. You can see that the Vuforia RenderManager is complaining about not being able to retrieve a valid glsurfaceview and then when I call QCAR::Renderer::getInstance().drawVideoBackground(); I get a GL_INVALID_OPERATION from the Vuforia library and the image is black. I am very close to being able to use the library as everything is working except the camera texture. Any help would be very much appreciated.

 

09-11 15:08:30.629      501-540/net.jameshurlbut.vuforiaappnew I/AR﹕ QCAR has been initialized successfully
09-11 15:08:30.630      501-540/net.jameshurlbut.vuforiaappnew I/AR﹕ QCAR SDK version 5.0.5
09-11 15:08:30.751      501-540/net.jameshurlbut.vuforiaappnew D/AR﹕ RenderManager: Could not retrieve a valid GLSurfaceView in view hierarchy, therefore cannot set any render mode
09-11 15:08:30.751      501-540/net.jameshurlbut.vuforiaappnew I/cinder﹕ |info   | int VuforiaAppNew::initTracker()[64] initTracker 4354
09-11 15:08:30.773      501-540/net.jameshurlbut.vuforiaappnew I/cinder﹕ |info   | int VuforiaAppNew::initTracker()[75] Successfully initialized ObjectTracker.
09-11 15:08:30.774      501-540/net.jameshurlbut.vuforiaappnew I/cinder﹕ |info   | int VuforiaAppNew::loadTrackerData()[80] loadTrackerData
09-11 15:08:30.774      501-540/net.jameshurlbut.vuforiaappnew I/AR﹕ ObjectTracker: Successfully created dataset
09-11 15:08:31.296      501-540/net.jameshurlbut.vuforiaappnew I/cinder﹕ |info   | int VuforiaAppNew::loadTrackerData()[115] Successfully loaded and activated data set.
09-11 15:08:31.297      501-540/net.jameshurlbut.vuforiaappnew I/cinder﹕ |info   | void VuforiaAppNew::startCamera()[120] startCamera
09-11 15:08:31.471      501-540/net.jameshurlbut.vuforiaappnew I/cinder﹕ |info   | void VuforiaAppNew::startCamera()[127] camera inited
09-11 15:08:31.495      501-540/net.jameshurlbut.vuforiaappnew I/cinder﹕ |info   | void VuforiaAppNew::startCamera()[132] camera default mode set
09-11 15:08:31.495      501-540/net.jameshurlbut.vuforiaappnew I/cinder﹕ |info   | void VuforiaAppNew::configureVideoBackground()[196] Configure Video Background : Video (1280,720), Screen (1080,1920), mSize (1080,1920)
09-11 15:08:31.548      501-540/net.jameshurlbut.vuforiaappnew I/art﹕ Explicit concurrent mark sweep GC freed 17084(1192KB) AllocSpace objects, 1(138KB) LOS objects, 40% free, 19MB/32MB, paused 586us total 48.284ms
09-11 15:08:31.562      501-540/net.jameshurlbut.vuforiaappnew I/cinder﹕ |info   | void VuforiaAppNew::startCamera()[139] camera started
09-11 15:08:32.054      501-540/net.jameshurlbut.vuforiaappnew W/Adreno-ES20﹕ <core_glVertexAttribPointer:525>: GL_INVALID_OPERATION
 

NativeActivity custom engine drawVideoBackground issues

October 18, 2015 - 3:49pm #2

Did you ever get a fix for this?  I'm in a similar situation, the target markers work, but no video background is rendered. This is using Unity and builing for Android. Works fine in desktop and iOS.

Log in or register to post comments