Closed bholcomb closed 6 years ago
Please close this issue, it turns out there were a few things wrong, mostly on my side of the fence:
OpenGL textures submitted as overlays need to have an Alpha Channel. I found that GL_RGBA8 textures were visible, but GL_RGB8 textures were not. Can you please add a list of the acceptable texture formats to the wiki. I also found that GL_RGBA32 did not work for overlays, but does for eye textures.
While debugging this, I was calling SetOverlayFromFile every frame in my overlay submit function. This was causing the flicker and disappearing overlay. While this is really bad for performance, I would expect this to not to stop working. I know this is a stupid use case but might be worth a bug.
I had an order operations error outside of openVR that invalidated the texture I was using. Apparently you need to submit overlay textures that actually have data in them. There was a window resize event is triggered on startup that would call a function to recreate my framebuffer targets (my UI being one of the targets). I needed to update the overlay object to use the new texture.
Not related, but may be a problem elsewhere:
cheers,
Bob
I'm using the C# API and I've integrated openVR (v1.0.12) into my openGL rendering engine without any issues except overlays fail to display (mostly). When I submit an overlay to be displayed, it flickers in my view for a few frames then dissapears. If I pause rendering in my app (such as hitting a debug breakpoint for example) the view fades to the gray grid and my overlay is visible. I don't get any errors returned from any functions and when the overlay is visible in the grey grid loading screen, it behaves properly with respect to being absolute or relative to the HMD and located where my transform says it should be.
I've attached my overlay.cs source that shows creation and submitting of the overlay. My project is on github if you need a working example (should build and run without much setup once downloaded).
Any suggestions for how to begin debugging this would be appreciated.
cheers,
Bob
overlay.cs.txt