<div dir="ltr">I believe the factory mechanism will replace any instantiations of vtkRenderWindow with vtkOpenVRRenderWindow if it is linked into the executable. From what I have seen that is the trick. The executable has to be linked against the vtkOpenVR module for the autoinit to work. <div><br></div><div>Now for Slicer I have no idea how they create their RenderWindow. If they are explicitly creating a subclass of vtkRenderWindow then the factory code will not work because it is targeted at the generic vtkRenderWindow level. A slicer person could maybe tell you more (or digging through the code).  I think slicer may also open multiple renderwindows, for the OpenVR stuff I think you would really only want to have one window. etc. </div><div><br></div><div>Hope that helps!</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 25, 2016 at 8:38 PM, Adam Rankin <span dir="ltr"><<a href="mailto:arankin@robarts.ca" target="_blank">arankin@robarts.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="#0563C1" vlink="#954F72">
<div>
<p class="MsoNormal">Hello all,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I have succeeded in replicating Ken Martin’s VTK master build with the drop-in replacement classes for outputting to an OpenVR device.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I am looking to build 3D Slicer using this VTK build, and am trying to understand the autoinit system, so that the factory implementation for these classes kicks in.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">What I can’t find is where is the location where the list of classes to be autoinit’d is defined. I’ve found the dependency hierarchy traversal in vtkModuleMacros.cmake, but I can’t figure out how to add the vtkOpenVR module.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Would anyone be able to point me in the right direction?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Cheers and thanks!<span class="HOEnZb"><font color="#888888"><u></u><u></u></font></span></p><span class="HOEnZb"><font color="#888888">
<p class="MsoNormal">Adam<u></u><u></u></p>
</font></span></div>
</div>

<br>_______________________________________________<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/opensource/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=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/mailman/listinfo/vtk-developers</a><br>
<br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Ken Martin PhD<div>Chairman & CFO<br>Kitware Inc.<br>28 Corporate Drive<br>Clifton Park NY 12065<br>518 371 3971<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>