Log in or register to post comments

Technical - How do I get Vuforia to update its UIGLViewProtocol delegate?

December 29, 2017 - 8:17am #1

I'm currently trying to figure out how to spread my AR functionality between two UIViewControllers inside of a UINavigationController. It is not working, and I think it's because I am unable to get Vuforia to update its UIGLViewProtocol delegate. 

The code

</p>
<p>- (bool) startAR:(Vuforia::CameraDevice::CAMERA_DIRECTION)camera error:(NSError **)error {</p>
<p>    CGSize ARViewBoundsSize = [self getCurrentARViewBoundsSize];<br>
	   <br>
	    // Start the camera.  This causes Vuforia to locate our EAGLView in the view<br>
	    // hierarchy, start a render thread, and then call renderFrameVuforia on the<br>
	    // view periodically<br>
	    if (! [self startCamera: camera viewWidth:ARViewBoundsSize.width andHeight:ARViewBoundsSize.height error:error]) {<br>
	        return NO;<br>
	    }<br>
	    self.cameraIsActive = YES;<br>
	    self.cameraIsStarted = YES;</p>
<p>    return YES;<br>
	}</p>
<p>

Talks about what is going on behind the scenes. However while I can get it to stop calling renderFrameVuforia on the first EAGLView, I can't get it to start calling renderFrameVuforia on the second EAGLView after I call startAR. I think this is because the first EAGLView still exists in the UINavigationController. Is there anything I can do to help Vuforia start calling renderFrameVuforia on the second EAGLView?

Technical - How do I get Vuforia to update its UIGLViewProtocol delegate?

December 29, 2017 - 12:01pm #2

Apparently the key is to swap out window.rootViewController

Log in or register to post comments