<div dir="ltr">I think its missing rendering the other eye at the center. Does it go away if you change the viewport dimensions? <div><br></div><div>Thanks,</div><div>Aashish</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 23, 2015 at 7:40 AM, Leucht, Nicola <span dir="ltr"><<a href="mailto:Nicola.Leucht@karlstorz.com" target="_blank">Nicola.Leucht@karlstorz.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="DE" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Von:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Aashish Chaudhary [mailto:<a href="mailto:aashish.chaudhary@kitware.com" target="_blank">aashish.chaudhary@kitware.com</a>]
<br>
<b>Gesendet:</b> Donnerstag, 23. April 2015 13:36<br>
<b>An:</b> Leucht, Nicola<br>
<b>Cc:</b> <a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a><br>
<b>Betreff:</b> Re: [vtkusers] Stereo rendering problem with OpenGL2<u></u><u></u></span></p><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Your code looks fine. Can you post a screen capture of what you see? <u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">- Aashish<u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Thu, Apr 23, 2015 at 7:20 AM, Leucht, Nicola <<a href="mailto:Nicola.Leucht@karlstorz.com" target="_blank">Nicola.Leucht@karlstorz.com</a>> wrote:<u></u><u></u></p>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US">Hi,</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US">I’m using VTK 6.2.0 with the OpenGL2 backend.
</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US">When rendering in stereo (interlaced mode), there are two horizontal lines in the middle of the window that belong to one eye.
</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p>
<p class="MsoNormal">Code:<u></u><u></u></p>
<p class="MsoNormal" style="text-autospace:none">
<span style="font-size:9.5pt;font-family:Consolas;color:#2b91af;background:white">vtkSmartPointer</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"><</span><span style="font-size:9.5pt;font-family:Consolas;color:#2b91af;background:white">vtkRenderer</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">>
 renderer = </span><span style="font-size:9.5pt;font-family:Consolas;color:#2b91af;background:white">vtkSmartPointer</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"><</span><span style="font-size:9.5pt;font-family:Consolas;color:#2b91af;background:white">vtkRenderer</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">>::New();</span><u></u><u></u></p>
<p class="MsoNormal" style="text-autospace:none">
<span style="font-size:9.5pt;font-family:Consolas;color:#2b91af;background:white">vtkSmartPointer</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"><</span><span style="font-size:9.5pt;font-family:Consolas;color:#2b91af;background:white">vtkRenderWindow</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">>
 renderWindow = </span><span style="font-size:9.5pt;font-family:Consolas;color:#2b91af;background:white">vtkSmartPointer</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"><</span><span style="font-size:9.5pt;font-family:Consolas;color:#2b91af;background:white">vtkRenderWindow</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">>::New();</span><u></u><u></u></p>
<p class="MsoNormal" style="text-autospace:none">
<span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">renderWindow->AddRenderer(renderer);</span><u></u><u></u></p>
<p class="MsoNormal" style="text-autospace:none">
<span style="font-size:9.5pt;font-family:Consolas;color:#2b91af;background:white">vtkSmartPointer</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"><</span><span style="font-size:9.5pt;font-family:Consolas;color:#2b91af;background:white">vtkRenderWindowInteractor</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">>
 renderWindowInteractor = </span><span style="font-size:9.5pt;font-family:Consolas;color:#2b91af;background:white">vtkSmartPointer</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"><</span><span style="font-size:9.5pt;font-family:Consolas;color:#2b91af;background:white">vtkRenderWindowInteractor</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">>::New();</span><u></u><u></u></p>
<p class="MsoNormal" style="text-autospace:none">
<span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white">renderWindowInteractor->SetRenderWindow(renderWindow);</span><u></u><u></u></p>
<p class="MsoNormal" style="text-autospace:none">
<span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> </span><u></u><u></u></p>
<p class="MsoNormal" style="text-autospace:none">
<span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#2b91af;background:white">vtkSmartPointer</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white"><</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#2b91af;background:white">vtkSphereSource</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white">>
 sphereSource = </span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#2b91af;background:white">vtkSmartPointer</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white"><</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#2b91af;background:white">vtkSphereSource</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white">>::New();</span><u></u><u></u></p>
<p class="MsoNormal" style="text-autospace:none">
<span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white">sphereSource->SetCenter(0.0, 0.0, 0.0);</span><u></u><u></u></p>
<p class="MsoNormal" style="text-autospace:none">
<span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white">sphereSource->SetRadius(50.0);</span><u></u><u></u></p>
<p class="MsoNormal" style="text-autospace:none">
<span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white">sphereSource->SetPhiResolution(100);</span><u></u><u></u></p>
<p class="MsoNormal" style="text-autospace:none">
<span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white">sphereSource->SetThetaResolution(100);</span><u></u><u></u></p>
<p class="MsoNormal" style="text-autospace:none">
<span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#2b91af;background:white">vtkSmartPointer</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white"><</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#2b91af;background:white">vtkOpenGLPolyDataMapper</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white">>
 mapper = </span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#2b91af;background:white">vtkSmartPointer</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white"><</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#2b91af;background:white">vtkOpenGLPolyDataMapper</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white">>::New();   
</span><u></u><u></u></p>
<p class="MsoNormal" style="text-autospace:none">
<span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white">mapper->SetInputConnection(sphereSource->GetOutputPort());</span><u></u><u></u></p>
<p class="MsoNormal" style="text-autospace:none">
<span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> </span><u></u><u></u></p>
<p class="MsoNormal" style="text-autospace:none">
<span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#2b91af;background:white">vtkSmartPointer</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white"><</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#2b91af;background:white">vtkActor</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white">>
 actor = </span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#2b91af;background:white">vtkSmartPointer</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white"><</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#2b91af;background:white">vtkActor</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white">>::New();</span><u></u><u></u></p>
<p class="MsoNormal" style="text-autospace:none">
<span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white">actor->SetMapper(mapper);</span><u></u><u></u></p>
<p class="MsoNormal" style="text-autospace:none">
<span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white">mapper->Update();</span><u></u><u></u></p>
<p class="MsoNormal" style="text-autospace:none">
<span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white">renderer->AddActor(actor);</span><u></u><u></u></p>
<p class="MsoNormal" style="text-autospace:none">
<span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white">renderer->GetActiveCamera()->SetEyeAngle(30);</span><u></u><u></u></p>
<p class="MsoNormal" style="text-autospace:none">
<span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white">renderer->ResetCamera();</span><u></u><u></u></p>
<p class="MsoNormal" style="text-autospace:none">
<span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white">renderer->SetBackground(.3, .6, .3);
</span><u></u><u></u></p>
<p class="MsoNormal" style="text-autospace:none">
<span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white">renderWindow->StereoCapableWindowOn();</span><u></u><u></u></p>
<p class="MsoNormal" style="text-autospace:none">
<span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white">renderWindow->SetStereoTypeToInterlaced();</span><u></u><u></u></p>
<p class="MsoNormal" style="text-autospace:none">
<span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white">renderWindow->StereoRenderOn();</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white">renderWindowInteractor->Start();</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black"> </span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US">Is there anything I need to change in my code?</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US">Kind regards</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#888888">Nicola</span><span style="color:#888888"><u></u><u></u></span></p>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">
http://www.kitware.com/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" target="_blank">
http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" target="_blank">
http://markmail.org/search/?q=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><u></u><u></u></p>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<p class="MsoNormal">-- <u></u><u></u></p>
<div>
<div>
<p class="MsoNormal"><i><span style="font-family:"Trebuchet MS","sans-serif"">| Aashish Chaudhary
<br>
| Technical Leader         <br>
| Kitware Inc.            </span></i><u></u><u></u></p>
<div>
<p class="MsoNormal"><i><span style="font-family:"Trebuchet MS","sans-serif"">| </span><a href="http://www.kitware.com/company/team/chaudhary.html" target="_blank">http://www.kitware.com/company/team/chaudhary.html</a></i><u></u><u></u></p>
</div>
</div>
</div>
</div>
</div></div></div>
</div>

</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><font face="trebuchet ms, sans-serif"><i>| Aashish Chaudhary <br>| Technical Leader         <br>| Kitware Inc.            <br></i></font><div><i><font face="trebuchet ms, sans-serif">| </font><a href="http://www.kitware.com/company/team/chaudhary.html" target="_blank">http://www.kitware.com/company/team/chaudhary.html</a></i></div></div></div>
</div>