<div dir="ltr">Yes vtkOpenVROverlay is intended to be a dashboard overlay. Using Qt to create the texture for an overlay (per the OpenVR SDK example) seems like a fine idea. Not sure why you are running into issues as long as you keep the thread/context boundaries clean. I have not tried that approach personally but I think it is a fine way to go.<div><br></div><div>Thanks</div><div>Ken</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 19, 2017 at 11:49 AM, liyang lin <span dir="ltr"><<a href="mailto:linlycode@gmail.com" target="_blank">linlycode@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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>
<br>______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_<wbr>FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Ken Martin PhD<div>Distinguished Engineer<br><span style="font-size:12.8px">Kitware Inc.</span><br></div><div>28 Corporate Drive<br>Clifton Park NY 12065<br><div><br></div><div><span style="font-size:10pt;font-family:Tahoma,sans-serif">This communication,
including all attachments, contains confidential and legally privileged
information, and it is intended only for the use of the addressee. Access to this email by anyone else is
unauthorized. If you are not the intended recipient, any disclosure, copying,
distribution or any action taken in reliance on it is prohibited and may be
unlawful. If you received this communication in error please notify us
immediately and destroy the original message.
Thank you.</span></div></div></div></div></div>
</div>