[vtkusers] null vtkRenderWindow with CMake

Dženan Zukić dzenanz at gmail.com
Wed May 29 05:59:46 EDT 2013


Adding vtkRenderingOpenGL solves the problem. Thanks!


On Tue, May 28, 2013 at 8:47 PM, Marcus D. Hanwell <
marcus.hanwell at kitware.com> wrote:

> On Mon, May 27, 2013 at 4:54 AM, Dženan Zukić <dzenanz at gmail.com> wrote:
> > I am switching over to vtk6. Following a recommendation to use COMPONENTS
> > argument in CMakeLists causes access violation at run time. Namely,
> > QVTKWidget::GetRenderWindow() crashes at line win->Delete(); due to win
> > being null. The function is called from my main window's constructor:
> >
> > vtkOpenGLRenderer *renderer = vtkOpenGLRenderer::New();
> > qvtkWidget->GetRenderWindow()->AddRenderer(renderer); //crash
> >
> > If I don't use the components (but rather link all modules), there is no
> > crash. Way of invoking VTK:
> >
> > #FIND_PACKAGE(VTK REQUIRED COMPONENTS vtkRenderingVolumeOpenGL
> > vtkGUISupportQt vtkGUISupportQtOpenGL vtkRenderingQt NO_MODULE)
> > FIND_PACKAGE(VTK REQUIRED COMPONENTS vtkGUISupportQtOpenGL)
> >
> > I am using vtk git master. How can I resolve this crash? Or should I just
> > link all modules?
> >
> I added
> http://vtk.org/Wiki/VTK/Build_System_Migration#Common_Implementation_Modules
> to give an example where one might find the common implementation
> modules and use it. You could add vtkGUISupportQtOpenGL to the list of
> dependencies, but you are missing vtkRenderingOpenGL from your
> dependencies that is causing the null render window.
>
> Marcus
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130529/628915a7/attachment.htm>


More information about the vtkusers mailing list