[vtkusers] [QVTKRenderWindowInteractor.py] GL_MULTISAMPLE disabled by default?

Francois Bertel francois.bertel at kitware.com
Tue Nov 18 12:31:01 EST 2008


1. in VTK, multisampling is only implemented on X11
(vtkXOpenGLRenderWindow) and works only on cards supporting
multisampling
2. Multisampling is set with renWin->MultiSamples(n) with n>1. It asks
vtk to create an OpenGL context with a multisample buffer. If it find
one, multisampling rasterisation is enabled by default (ref: OpenGL
specifications).

If you say that qt or wx don't have multisampling it is probably
because the creation of the OpenGL context (in qt or wx side) does not
ask for a  multisample buffer, not because there is no call to
glEnable(GL_MULTISAMPLE).


On Tue, Nov 18, 2008 at 12:17 PM, Maik Beckmann
<beckmann.maik at googlemail.com> wrote:
> Hello Again,
>
> The reason for my previous mail
>  - http://www.vtk.org/pipermail/vtkusers/2008-November/098400.html
> was my struggle to understand how vtk uses opengl to solve the following
> problem:
> Using PyQt4 with QVTKRenderWindowInteractor.py (part of vtk) gives me no anti-
> aliasing.
>
> The attached python script draws the same scene as the C++ source at the email
> mentioned above.  At the very top one can choose the GUI toolkit to use:
> {{{
> GUI='qt' # no antialiasing
> #GUI='vtk' # antialiasing
> #GUI='tk' # antialiasing
> #GUI='wx' # no antialiasing (wx is presented just for completeness)
> }}}
> As the comments state only native vtk and tk interactors give anti-aliasing.
>
> Francois pointed me to MultiSamples and my impression is, that
> glEnable(GL_MULTISAMPLE) wasn't called in case of PyQt4 and wx (Qt4-C++ with
> QVTKWidget works fine, btw.) .
>
> I will investigate further, but I'm thankful for any hints.
>
> Thanks,
>  -- Maik
>
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>



-- 
François Bertel, PhD  | Kitware Inc. Suite 204
1 (518) 371 3971 x113 | 28 Corporate Drive
                      | Clifton Park NY 12065, USA



More information about the vtkusers mailing list