[vtkusers] Mixing OpenGL and VTK

Ram Sampath ram at centroidpic.com
Wed Apr 8 00:22:13 EDT 2015


Thank you so much for your response and looking into this. Please let me
know if you need a specific complete code example which illustrates this
interaction between QGLWidget and VTK.

Thank you again
Ram.

On Tue, Apr 7, 2015 at 11:55 PM, Sankhesh Jhaveri <
sankhesh.jhaveri at kitware.com> wrote:

> 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/20150408/de9d5126/attachment.html>


More information about the vtkusers mailing list