<div dir="ltr"><span style="font-size:12.8px">Hi, I have a simple Virtual Reality app that uses VTK for visualization, and I'm trying to make GUI using OpenVR overlay but can't get it working.</span><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">I tried to use two threads to do the job, In the main thread, I set up OpenVRRenderWindow, renderer and interactor, and starts the interactor;</div><div style="font-size:12.8px">In the overlay thread, I create an OpenVR overlay and an OpenGL context that associated with a Qt offscreen surface, then render a Qt widget into a framebuffer object in the OpenGL context, then extract the texture from the framebuffer object, and feed it into the overlay using setOverlayTexture. The second thread also listens for OpenVR overlayShown, mouse move/up/down event, and dispatch them to the widget.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">The overlay appears as expected, but the 3D scene rendered by VTK is problematic, scene in the left eye flashes and doesn't react to HMD movement, and when I points the controller to the overlay(which cause rerender of the widget, and a setOverlayTexture call), the scene just disappears.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">I have no idea why this happens since I use my own OpenGL context in the overlay thread, why is the scene rendered by VTK is affected ?</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">I also looked into vtkOpenVROverlay, it seems that it's a dashboard overlay and hard to be reused.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Anybody know how to create GUI in VTK with OpenVR ?</div></div>