If you are developing an Application or SDK that does stereoscopic rendering, your code will have to put the R-7 Glasses displays into “extended” mode. This will allow applications to render different content on the left and right displays. The extended frame buffer has left and right displays side by side. The usual “cloned” 2D displays are copies, each 1280x720. The screen size of the R-7 in extended mode will be expanded to 2560x720.
We provide a library: com.osterhoutgroup.api.ext.jar (extension library to change display surface from cloned to extended) that the developer adds as external jar file to their Application project.
- Add the following in AndroidManifest.xml:
<uses-library android:name="com.osterhoutgroup.api.ext" android:required="false" />
- If you want the App to always be in extended mode, put this in AndroidManifest.xml:
android:value="extend" />Before <application> tag.
- For setting a extended surface for the application window :
- To get the display size of a window that is extended:
ExtendDisplay.getDisplayMetrics(Context context, Window window, DisplayMetrics outMetrics);
- For setting a SurfaceView or any of its subclass as a extended surface:
- To get the display size if the SurfaceView is extended
ExtendDisplay.getDisplayMetrics(Context context, SurfaceView surfaceView, DisplayMetrics outMetrics);
In the sample file ExtendActivity.java its onCreate method is calling two API for setting the display mode.
Attached to this article are theExternal jar com.osterhoutgroup.api.ext.jar as well as sample project in extendTest.zip that one of our developers uses for testing and shows native rendering rendering. Also attached is a JavaDoc for the library.
This reference is to a book that covers concepts on rendering using OpenGL:
Rendering in Unity:
If you were doing tracking with the camera, and Unity rendering with respect to the marker being tracked (using Vuforia or Wikitude), the tracking vendor usually supplies a Unity plug-in in their SDK. If you are not doing tracking and want to try Unity based rendering, see this article: