GearVRf
GearVRf copied to clipboard
Transparent Rendering Background
I am trying to use the framework in mono-camera mode as a regular Android application. Is it possible to have the background of the context set to alpha=0.0f? I want to set it up such that I'll be able to see buttons in the layout that is behind the GL context.
Hi there. I assume you mean you're running in monoscopic mode (probably fullscreen as well?) that is specified in the gvr.xml file? If so, there's nothing exposed for doing what you are looking for. This was not an imagined use case when that code was written :)
That being said, our code is open-source and you can modify to your hearts content :). The monoscopic code is in backend_oculus/src/main/java/org/gearvrf/OvrMonoscopicRenderer.java and OvrMonoscopicViewManager.java. You can modify the GLSurfaceView we use to be on top and transparent like a normal GLSurfaceView.
You might just need to setZOrderOnTop(true); with the GLSurfaceView and you're done. Maybe. You'll have to try it. Here's a StackOverflow link of putting a transparent GLSurfaceView over a regular view:
https://stackoverflow.com/questions/23628989/glsurfaceview-transparent-background-and-overlay-view-on-top-of-it
hope that helps, tom
Thanks @thomasflynn I'll take a look at it and see how it works for me.