Skip to content
Mihail edited this page Aug 16, 2016 · 25 revisions

1. Is there any example of object following the head tracking, just like a reticle?

See gvr-tutorial-lesson2 sample. Examine the BalloonMain.java and the headTracker tracker object it sets up. The key part is adding the object to the main camera rig.

https://github.com/gearvrf/GearVRf-Demos/blob/master/gvr-tutorial-lesson2/app/src/main/java/org/gearvrf/balloons/BalloonMain.java#L51

2. I want to implement a scrollable list of item like ListView in Android. How to go about that?

  1.   Background objects: rendering order N, depth test on
    
  2.   Clip object: rendering order N+1, depth test on, alpha blend on, alpha = 0 (completely transparent)
    
  3.   List view object: rendering order N+2, depth test on
    

The clip object should be a plane with a hole in it where you want to see the list view. It should be completely transparent. It will be rendered after the background so it will update the depth buffer but the background will show thru completely. This clip object should have a Z value putting it IN FRONT of the list view object even though it will be rendered before that object (because you set the rendering order to a smaller value).

GearVRF will render objects in ascending rendering order so the background will be rendered first. The clip object will update the depth buffer so that anything drawn BEHIND it will show thru the hole but will be obscured by the transparent clip area (the depth buffer will do the clipping for us).

3. Can i use an emulator during development for testing?

Short answer: No.

Long answer: It would likely be somewhat painful to do. Oculus only provides 32bit arm libraries. Which means you would need to set up an arm emulator (rather than an x86 one). In that emulator, we would detect the oculus service is not on the system and fall back to daydream. However, in our experience, running an arm emulator is horrifically slow, especially for anything GL related. It's best to stick with a physical phone for development.

4. I am using Windows, trying to build the framework and getting weird errors. Like this one:

...\GearVRf\GVRf\Framework\framework\..\backend_oculus/src/main/jni/util/configuration_helper.cpp:235:1: fatal error: opening dependency file ./obj/local/armeabi-v7a/objs/...\GearVRf\GVRf\Framework\framework\..\backend_oculus/src/main/jni/util/configuration_helper.o.d: No such file or directory

Your paths might be too long. Try moving the framework to C:\ and build again.

Clone this wiki locally