[vtk-developers] Antialiasing broken in Qt5

David Lonie david.lonie at kitware.com
Thu May 14 10:21:24 EDT 2015


I setup a Qt5 build, and this is indeed a problem.

It looks like we'll need to do some more work to get VTK to play nice with
Qt5, at least on X11 (possibly other windowing systems as well). The root
cause of the multisampling problem is that Qt5 no longer provides things
like Q_WS_X11 and QX11Info, and the section of QVTKWidget::SetRenderWindow
that initializes the GLX visual is inside a "#ifdef Q_WS_X11" block, and
thus never gets called. It appears that all of the visual configuration
(double buffering, stencil, MSAA, alpha planes, etc) are currently not
being used when build against Qt5 on (at least) X11 as a result.

For now, the only workaround I see is to stick with Qt4 until this can be
addressed. I've filed a bug here:

http://www.vtk.org/Bug/view.php?id=15469

Dave

On Tue, May 12, 2015 at 8:32 AM, David Lonie <david.lonie at kitware.com>
wrote:

> Bumping -- can someone with a Qt5 build around do a quick test to see if
> multisampling works in a QVTKWidget? Has anyone been working on Qt5 support
> that might have an idea what's happening?
>
> On Thu, May 7, 2015 at 9:17 AM, David Lonie <david.lonie at kitware.com>
> wrote:
>
>> On Thu, May 7, 2015 at 8:31 AM, Christoph Kolb <c.kolb at dkfz-heidelberg.de
>> > wrote:
>>
>>>  your fix works for me in the RGrid example and also in SimpleView with
>>> Qt4.
>>> But not in Qt5.
>>> If you run the SimpleView example with Qt5, multisampling is off again
>>> which is inexplicable to me because in my understanding the QVTKWidget was
>>> simply painting the GL buffer rendered by a vtkRenderWindow which should
>>> already be antialiased... Is that wrong?
>>>
>>
>> Hmm, I'm not super familiar with the Qt layer in VTK. Perhaps someone
>> else on the list might know?
>>
>> Looking at the QVTKWidget implementation, I don't see why the Qt version
>> would make a difference regarding MSAA. Let's see if someone on the list
>> has any ideas, and I'll ask around to see what I can find out.
>>
>> Dave
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20150514/2a3a6218/attachment.html>


More information about the vtk-developers mailing list