<div dir="ltr">If you need it embedded into a Qt app you can do it the same basic way the OpenVR plugin in paraview does it. I think it relies on you having a vtk/qt window in your app (already up and displayed) and then using that as the HelperWindow. SOme snippets of code (and a lot you don;t need) can be found here<br><br><a href="https://gitlab.kitware.com/paraview/paraview/blob/master/Plugins/OpenVR/vtkPVOpenVRHelper.cxx#L591">https://gitlab.kitware.com/paraview/paraview/blob/master/Plugins/OpenVR/vtkPVOpenVRHelper.cxx#L591</a><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 28, 2018 at 9:36 PM, lmkkp <span dir="ltr"><<a href="mailto:lmkkpvtk@163.com" target="_blank">lmkkpvtk@163.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div>How can I render a window on screen with vtkOpenVRRenderWindow?</div><div>The relevant code in VTK8.1 is following:</div><div> this->HelperWindow-><wbr>SetDisplayId(this-><wbr>GetGenericDisplayId());</div><div> this->HelperWindow-><wbr>SetOffScreenRendering(1);//I tried to comment out this line, </div><div> //then a black window appeared on the screen. </div><div> //This window did not do any rendering.</div><div> this->HelperWindow-><wbr>Initialize();</div><div>The relevant code using sdl in VTK8.0 is following:</div><div><div> this->WindowId = SDL_CreateWindow( this->WindowName,</div><div> this->Position[0], this->Position[1],</div><div> this->Size[0] / 2, this->Size[1] / 2,</div><div> unWindowFlags );</div></div><div>I want the 8.1 version to be the same as the 8.0 version on the desktop to display the rendering window and embedded into the qt main window.</div><div>Ps: I can not embed the 8.0 version's sdl window into qt window because some strange errors.</div><div>Thanks very much.</div></div><br><br><span title="neteasefooter"><p> </p></span><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="https://vtk.org/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">https://vtk.org/mailman/<wbr>listinfo/vtkusers</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><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>101 East Weaver Street<br>Carrboro, North Carolina<br>
27510 USA<br><br><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></div>
</div>