[vtkusers] Mixing OpenGL and VTK

Ram Sampath ram at centroidpic.com
Tue Mar 31 03:28:55 EDT 2015


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;

}


>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150331/c652ab79/attachment.html>


More information about the vtkusers mailing list