[vtkusers] QVTK Widget odd behavior on Ubuntu 16.10 and NVidia GPU:

Elvis Stansvik elvis.stansvik at orexplore.com
Wed Jul 19 13:02:35 EDT 2017


2017-07-19 17:30 GMT+02:00 BBerco <bebe0705 at colorado.edu>:
> Utkarsh,
> thanks for the suggestion.
>
> I'm trying to have this working on my Mac first.
>
> I have replaced the QVTKWidget by a QVTKOpenGLWidget, and set its render
> window to a vtkGenericOpenGLRenderWindow.
>
> *
> vtkSmartPointer< vtkGenericOpenGLRenderWindow> render_window =
> vtkSmartPointer< vtkGenericOpenGLRenderWindow>::New();
> this -> qvtkWidget -> SetRenderWindow(render_window);
> this -> qvtkWidget -> GetRenderWindow() -> AddRenderer(this -> renderer);
> *
>
> Unfortunately it segfaults after returning the following error message:
> *
> Warning: In
> /Users/bbercovici/VTK/VTK_source/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx,
> line 835
> vtkGenericOpenGLRenderWindow (0x7f97260f8e00): VTK is designed to work with
> OpenGL version 3.2 but it appears it has been given a context that does not
> support 3.2. VTK will run in a compatibility mode designed to work with
> earlier versions of OpenGL but some features may not work.

Did you follow the instructions in the docs for QVTKOpenGLWidget [1] ?
Specifically, you need to set the default QSurfaceFormat to an
appropriate one with

    QSurfaceFormat::setDefaultFormat(QVTKOpenGLWidget::defaultFormat());

Elvis

[1] http://www.vtk.org/doc/nightly/html/classQVTKOpenGLWidget.html

>
> ERROR: In
> /Users/bbercovici/VTK/VTK_source/Rendering/OpenGL2/vtkOpenGLPolyDataMapper2D.cxx,
> line 902
> vtkOpenGLPolyDataMapper2D (0x7f9727e15960): failed after RenderOverlay 1
> OpenGL errors detected
>   0 : (1280) Invalid enum
> *
>
>
> I recompiled VTK beforehand with the -DVTK_RENDERING_BACKEND:STRING=OpenGL2
> flag. Is OpenGL3 a thing?
>
>
>
>
>
>
>
>
>
>
>
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/QVTK-Widget-odd-behavior-on-Ubuntu-16-10-and-NVidia-GPU-tp5744016p5744018.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> 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


More information about the vtkusers mailing list