[vtkusers] Find reason for exclusion of vtkGUISupportQtOpenGL in build output?

Elvis Stansvik elvis.stansvik at orexplore.com
Wed Jun 29 11:47:36 EDT 2016


2016-06-29 17:17 GMT+02:00 Marcus D. Hanwell <marcus.hanwell at kitware.com>:

> On Wed, Jun 29, 2016 at 10:43 AM, Elvis Stansvik
> <elvis.stansvik at orexplore.com> wrote:
> > 2016-06-29 16:37 GMT+02:00 Sankhesh Jhaveri <
> sankhesh.jhaveri at kitware.com>:
> >>
> >> vtkGUISupportQtOpenGL module hasn't been ported to the OpenGL2 backend
> >> yet.
> >>
> >> See:
> >>
> https://github.com/Kitware/VTK/commit/e58ca401466f9af4c542c085f7b599b6bde939c8
> >>
> >> For now, it just works with the OpenGL backend.
> >
> > Aha. That explains it. Thanks.
> >
> > Are there any big downsides to using the OpenGL backend? What are the
> main
> > benefits of the OpenGL2 backend?
> >
> I would echo Sankhesh's comments - are there any applications using
> the classes in vtkGUISupportQtOpenGL? There are not many I am aware
> of, and the classes in that module use a deprecated Qt class. The vast
> majority make use of QVTKWidget in vtkGUISupportQt
>
> Things changed quite a bit in Qt, and I think if you are
> packaging/using this in general builds skipping vtkGUISupportQtOpenGL
> is normally the correct thing to do unless you have a compelling user
> of the classes in there. If you do it would be great to learn what is
> using it in the wild.
>
> We will hopefully have a replacement for OpenGL2 soon, but it should
> likely derive from the newer QOpenGL* classes, and as such may not
> precisely match the previous API.
>

I see, I may have misunderstood the role of QVTKWidget2 is vs QVTKWidget. I
thought QVTKWidget2 was essentially a newer replacement for QVTKWidget, and
to be preferred in new code.

I've also misunderstood a little how the two widgets work. I knew
QVTKWidget2 makes use of the deprecated QGLWidget (and was in fact trying
to make a similar Python class just recently, which uses QOpenGLWidget, but
ran into some problems). But I also wrongly thought that QVTKWidget used
QGLWidget, looking at the code I see now that it doesn't.

So in short: I have no great need for QVTKWidget2, functionality-wise. So
if using it precludes using the OpenGL2 backend, I'll use QVTKWidget
instead.

One thing I did like was that the code in QVTKWidget2 looked a little
simpler/cleaner than the one QVTKWidget. It's always nice to be able to
quickly check how something work.

An officially supported widget, based on QOpenGLWidget and supporting the
OpenGL2 backend, would be the absolutely best of course. In fact, there's
an answer on StackOverflow where a user posted his QVTKWidget2 hacked to
work with QOpenGLWidget [1], perhaps it could be used as a starting point?

Elvis

[1]
http://stackoverflow.com/questions/26944831/using-qvtkwidget-and-qopenglwidget-in-the-same-ui/26946040#26946040


>
> Marcus
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160629/161e1072/attachment.html>


More information about the vtkusers mailing list