<div dir="ltr">Make sure you also explicitly create the OpenGL/OpenVRCamera for each renderer as they are different. And I would create the OpenVRRenderWindowInteractor Win32OpenGLRenderWindowInteractor explicitly and assign them. Those are the 4 key classes you have to explicitly create as leaf nodes<div><br></div><div>OpenVRRenderWIndow</div><div>OpenVRRenderer</div><div>OpenVRCamera</div><div>OpenVRRenderWIndowInteractor</div><div><br></div><div>Win32OpenGLRenderWindow</div><div>OpenGLRenderer</div><div>OpenGLCamera</div><div>Win32OpenGLRenderWIndowInteractor</div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 3, 2017 at 11:08 AM, Carlos Lopez <span dir="ltr"><<a href="mailto:rcourant@gmail.com" target="_blank">rcourant@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">Hi Ken,<div><br></div><div>Thanks for your reply.</div><div><br></div><div>There seems to be something else going on.</div><div><br></div><div>In my example, I create 2 of source (cubesource),mapper, actor , renderer, and renderwindow; for the last 2 one is win32 and the other OpenVR.</div><div><br></div><div>I add the cube to the win32 render window and call render, it appears and renders correctly.</div><div><br></div><div>Calling renwin->Render() in a loop only for the OpenVR render window, running under the debugger, makes the OpenVR window on the screen show in sequence, a black screen and then the VR circles. It does not update the graphics and seems to be showing an old frame.</div><div><br></div><div>If I run the OpenVR loop, before the win32 window renders, then it works ok, it tracks and renders the geometry and the controllers, but then calling render on the other one, one single time and going back to its own loop, breaks the rendering as described above.</div><div><br></div><div>There also seems to be an issue with the order of initialization if I add an interactor to the win32 window.</div><div><br></div><div>any suggestions are welcome.</div><div><br></div><div>thanks,</div><div>carlos</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 3, 2017 at 8:34 AM, Ken Martin <span dir="ltr"><<a href="mailto:ken.martin@kitware.com" target="_blank">ken.martin@kitware.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">It should work, but you have to be careful, I would not share any mappers/actors etc between the two and make sure you are letting the OpenVR loop run at least 100 fps. </div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_7047474008783304316h5">On Tue, May 2, 2017 at 6:05 PM, Carlos Lopez <span dir="ltr"><<a href="mailto:rcourant@gmail.com" target="_blank">rcourant@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_7047474008783304316h5"><div dir="ltr">Hello,<div><br></div><div>Is it possible to have a vtkOpenVRRenderWindow and  a vtkWin32OpenGLRenderWindow</div><div>working in the same application?</div><div><br></div><div>I'm trying it by compiling vtk without the OpenVR render factory enabled and initializing the openvr classes directly.</div><div><br></div><div>I get to have 2 render windows, one for openvr and a regular one. Calling renwin->Render() inside a loop for the openvr window works as it tracks the HMD and shows the controllers, but if I call Render() for the regular window, the openVRRenderWindow stops tracking the HMD and the rendering starts to flicker.</div><div><br></div><div>Is there any shared resource between these windows that would break the rendering?</div><div><br></div><div>thanks,</div><div>carlos</div><div><br></div></div>
<br></div></div>______________________________<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/opensou<wbr>rce/opensource.html</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtk-developers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtk-developers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtk-developers" rel="noreferrer" target="_blank">http://public.kitware.com/mail<wbr>man/listinfo/vtk-developers</a><br>
<br>
<br></blockquote></div><span class="m_7047474008783304316HOEnZb"><font color="#888888"><br><br clear="all"><span class="HOEnZb"><font color="#888888"><div><br></div>-- <br><div class="m_7047474008783304316m_6446837642309169520gmail_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>
</font></span></font></span></div>
</blockquote></div><br></div>
</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>