How to use OpenVR overlay with VTK ?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

How to use OpenVR overlay with VTK ?

liyang lin
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.

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;
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.

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.

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 ?

I also looked into vtkOpenVROverlay, it seems that it's a dashboard overlay and hard to be reused.

Anybody know how to create GUI in VTK with OpenVR ?

Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe: