[vtkusers] Mixing OpenGL and VTK

Sankhesh Jhaveri sankhesh.jhaveri at kitware.com
Tue Apr 7 10:55:38 EDT 2015


Hi Ram,

Seems like a bug. What you are doing is right.

Following your email, I too tested the external renderer in the QGLWidget.
We'll have to look deeper to find out what's going on.

I'll update here once I have a fix.



Best Regards,

Sankhesh Jhaveri
Research & Development Engineer
Kitware, Inc.
*Phone*: (518) 881 4417
*Fax*: (518) 371 4573



On Tue, Mar 31, 2015 at 3:28 AM, Ram Sampath <ram at centroidpic.com> wrote:

> Hello everyone,
>
>  I tried the ExternalVTK calls as instructed by the blog page and I am
> doing the following but for some reason VTK doesn't seem to render.
>
> I am using Qt 5.4 as well. If someone could throw some light on how to mix
> native OpenGL calls with VTK renders I would really appreciate it.
>
> ​Thank you very much
> Ram.​
>
>
>
> VisWidget::VisWidget( QWidget* parent, const GLWidget* shareWidget,
> Qt::WindowFlags f ): NEGLWidget( parent, shareWidget, f )
>
> {
> #if WIN32
>     this->m_externalVTKWidget = vtkSmartPointer<ExternalVTKWidget>::New();
>     this->m_renWin =
> ​ ​
> vtkSmartPointer<vtkExternalOpenGLRenderWindow>::New();
>     this->m_externalVTKWidget->SetRenderWindow( m_renWin.GetPointer() );
>     this->m_ren    = vtkSmartPointer<vtkExternalOpenGLRenderer>(
> this->m_externalVTKWidget->AddRenderer() );
>     this->m_cam    = vtkSmartPointer<vtkExternalOpenGLCamera>::New();
>     m_ren->SetActiveCamera( this->m_cam );
> #endif
>
>     m_VTK = false;
>
> }
>
>
>>
> _______________________________________________
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150407/c0ac4555/attachment.html>


More information about the vtkusers mailing list