[vtkusers] Stereo rendering problem with OpenGL2
Aashish Chaudhary
aashish.chaudhary at kitware.com
Thu Apr 23 07:43:31 EDT 2015
I think its missing rendering the other eye at the center. Does it go away
if you change the viewport dimensions?
Thanks,
Aashish
On Thu, Apr 23, 2015 at 7:40 AM, Leucht, Nicola <Nicola.Leucht at karlstorz.com
> wrote:
>
>
> *Von:* Aashish Chaudhary [mailto:aashish.chaudhary at kitware.com]
> *Gesendet:* Donnerstag, 23. April 2015 13:36
> *An:* Leucht, Nicola
> *Cc:* vtkusers at vtk.org
> *Betreff:* Re: [vtkusers] Stereo rendering problem with OpenGL2
>
>
>
> Your code looks fine. Can you post a screen capture of what you see?
>
>
>
> - Aashish
>
>
>
> On Thu, Apr 23, 2015 at 7:20 AM, Leucht, Nicola <
> Nicola.Leucht at karlstorz.com> wrote:
>
> Hi,
>
>
>
> I’m using VTK 6.2.0 with the OpenGL2 backend.
>
> When rendering in stereo (interlaced mode), there are two horizontal lines
> in the middle of the window that belong to one eye.
>
>
>
> Code:
>
> vtkSmartPointer<vtkRenderer> renderer = vtkSmartPointer<vtkRenderer
> >::New();
>
> vtkSmartPointer<vtkRenderWindow> renderWindow = vtkSmartPointer<
> vtkRenderWindow>::New();
>
> renderWindow->AddRenderer(renderer);
>
> vtkSmartPointer<vtkRenderWindowInteractor> renderWindowInteractor =
> vtkSmartPointer<vtkRenderWindowInteractor>::New();
>
> renderWindowInteractor->SetRenderWindow(renderWindow);
>
>
>
> vtkSmartPointer<vtkSphereSource> sphereSource = vtkSmartPointer<
> vtkSphereSource>::New();
>
> sphereSource->SetCenter(0.0, 0.0, 0.0);
>
> sphereSource->SetRadius(50.0);
>
> sphereSource->SetPhiResolution(100);
>
> sphereSource->SetThetaResolution(100);
>
> vtkSmartPointer<vtkOpenGLPolyDataMapper> mapper = vtkSmartPointer<
> vtkOpenGLPolyDataMapper>::New();
>
> mapper->SetInputConnection(sphereSource->GetOutputPort());
>
>
>
> vtkSmartPointer<vtkActor> actor = vtkSmartPointer<vtkActor>::New();
>
> actor->SetMapper(mapper);
>
> mapper->Update();
>
> renderer->AddActor(actor);
>
> renderer->GetActiveCamera()->SetEyeAngle(30);
>
> renderer->ResetCamera();
>
> renderer->SetBackground(.3, .6, .3);
>
> renderWindow->StereoCapableWindowOn();
>
> renderWindow->SetStereoTypeToInterlaced();
>
> renderWindow->StereoRenderOn();
>
> renderWindowInteractor->Start();
>
>
>
> Is there anything I need to change in my code?
>
>
>
> Kind regards
>
> Nicola
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
>
>
>
>
> --
>
>
>
> *| Aashish Chaudhary | Technical Leader | Kitware Inc.
> *
>
> *| http://www.kitware.com/company/team/chaudhary.html
> <http://www.kitware.com/company/team/chaudhary.html>*
>
--
*| Aashish Chaudhary | Technical Leader | Kitware Inc. *
*| http://www.kitware.com/company/team/chaudhary.html
<http://www.kitware.com/company/team/chaudhary.html>*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150423/f232e0da/attachment.html>
More information about the vtkusers
mailing list