[prev in list] [next in list] [prev in thread] [next in thread] 

List:       vtk-developers
Subject:    Re: [vtk-developers] Anti-aliasing / multi sampling in QVTKWidget2 ?
From:       Christoph Kolb <c.kolb () dkfz-heidelberg ! de>
Date:       2015-01-14 14:55:16
Message-ID: 54B68354.9010903 () dkfz-heidelberg ! de
[Download RAW message or body]

Hi Marcus,

we have created a gerrit topic with the proposed changes:
http://review.source.kitware.com/#/c/18864/

It works for Qt4 and Qt5 (tested in linux)

Thank you!
Christoph

On 01/13/2015 04:36 PM, Marcus D. Hanwell wrote:
> Hi Thomas,
> 
> What version of Qt did you test that with? If that approach works it
> sounds reasonable to me, and I would be happy to help get such a patch
> through the review process.
> 
> Thanks,
> 
> Marcus
> 
> On Tue, Jan 13, 2015 at 4:08 AM, Kilgus, Thomas
> <t.kilgus@dkfz-heidelberg.de> wrote:
> > Hey Marcus,
> > 
> > thanks for your answer. We figured out that, what is needed to make it work \
> > again: QGLFormat newform = this->format();
> > newform.setSampleBuffers(true);
> > newform.setSamples(8);
> > this->setFormat(newform);
> > 
> > Wouldn't it make sense to add this code to the constructor of the QVTKWidget2 in \
> > order to achieve the same behavior as QVTKWidget? Alternatively, a note in the \
> > documentation would be nice. Let me know if we can contribute anything like this. \
> >  Regards,
> > Thomas
> > 
> > 
> > -----Ursprüngliche Nachricht-----
> > Von: Marcus D. Hanwell [mailto:marcus.hanwell@kitware.com]
> > Gesendet: Montag, 12. Januar 2015 15:36
> > An: Kilgus, Thomas
> > Cc: vtk-developers@vtk.org
> > Betreff: Re: [vtk-developers] Anti-aliasing / multi sampling in QVTKWidget2 ?
> > 
> > On Mon, Jan 12, 2015 at 5:24 AM, Kilgus, Thomas <t.kilgus@dkfz-heidelberg.de> \
> > wrote:
> > > Dear List,
> > > 
> > > we recently switched from QVTKWidget to QVTKWidget2 and now by default
> > > anti-aliasing is disabled.
> > > 
> > > We managed to track the issue down with this VTK example:
> > > 
> > > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Qt/RenderWindowUISingleInheri
> > > tance
> > > 
> > > Just render the sphere in wireframe mode. If you run the example with
> > > a QVTKWidget, lines are smooth and with QVTKWidget2 they are stepped.
> > > SetMultiSamples(8) should do the job, but this does not have any
> > > effect (and is the default value).
> > > 
> > > Any ideas on this?
> > > 
> > As QVTKWidget reuses Qt's QGLWidget you must use the Qt API for any OpenGL \
> > context settings. Multisampling is one of the things that must be done as the \
> > context is created, and so cannot be done by VTK. 
> > I can't remember the API off the top of my head, but I know Qt has API in 4 at \
> > least for antialiasing. Qt 5 does not, but the new QOpenGLWidget does - QGLWidget \
> > lost a number of features that seem to have been reintroduced in this class in \
> > the 5.4 release. 
> > Hope that helps clear this up a little.
> > 
> > Marcus
> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at \
> http://www.kitware.com/opensource/opensource.html 
> Search the list archives at: http://markmail.org/search/?q=vtk-developers
> 
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtk-developers
> 

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at \
http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtk-developers


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic