# Anti-aliasing / multi sampling with vtkGenericOpenGLRenderWindow

**URL:** https://discourse.vtk.org/t/anti-aliasing-multi-sampling-with-vtkgenericopenglrenderwindow/2463
**Category:** Support
**Created:** [January 20, 2020, 12:42pm UTC](https://discourse.vtk.org/t/anti-aliasing-multi-sampling-with-vtkgenericopenglrenderwindow/2463 "2020-01-20T12:42:57Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![michael23](https://discourse.vtk.org/user_avatar/discourse.vtk.org/michael23/32/837_2.png) [@michael23](https://discourse.vtk.org/u/michael23)
#### Post date: [January 20, 2020, 12:42pm UTC](https://discourse.vtk.org/t/anti-aliasing-multi-sampling-with-vtkgenericopenglrenderwindow/2463/1 "2020-01-20T12:42:57Z")

</div>

Hello,

I am using vtkGenericOpenGLRenderWindow and QVTKOpenGLNativeWidget for VTK rendering in Qt.

In order to get the right result when using the vtkSelectVisiblePoints filter, I had to set the number of multi samples to zero:

_vtkGenericOpenGLRenderWindow::SetGlobalMaximumNumberOfMultiSamples(0);_  
_QSurfaceFormat::setDefaultFormat(QVTKOpenGLNativeWidget::defaultFormat());_  
_auto defaultFormat = QVTKOpenGLNativeWidget::defaultFormat();_  
_defaultFormat.setSamples(0);_  
_QSurfaceFormat::setDefaultFormat(defaultFormat);_

Unfortunately, without using multi-samples, the quality of the actors is noticeably worse which I would like to avoid.

Can someone explain me why I have to disable multi-samples when using vtkSelectVisiblePoints and vtkGenericOpenGLRenderWindow (vtkRenderWindow does not require it) and if there is any fix for this?

Thank you.

---

<div class="post-metadata">

### Author: ![Michael](https://discourse.vtk.org/user_avatar/discourse.vtk.org/michael/32/16_2.png) [@Michael](https://discourse.vtk.org/u/Michael)
#### Post date: [February 18, 2020, 2:22pm UTC](https://discourse.vtk.org/t/anti-aliasing-multi-sampling-with-vtkgenericopenglrenderwindow/2463/2 "2020-02-18T14:22:36Z")

</div>

Hi,  
The issue has been fixed recently in VTK: [https://gitlab.kitware.com/vtk/vtk/merge\_requests/6356](https://gitlab.kitware.com/vtk/vtk/merge_requests/6356)  
You can use the master branch or wait for VTK 9.0 release.
