[vtk-developers] OS X MultiSamples

David Gobbi david.gobbi at gmail.com
Mon Aug 5 18:41:22 EDT 2013


Hi All,

For a long time, it has been a minor annoyance that VTK doesn't do
antialiased rendering on my Mac.  However, I now have a project that
requires it, so I dug into the code and I _think_ that I have a
solution.  I added the following attributes in
vtkCocoaRenderWindow::CreateGLContext():

      NSOpenGLPFASampleBuffers,
      (NSOpenGLPixelFormatAttribute)(this->MultiSamples != 0),
      NSOpenGLPFASamples,
      (NSOpenGLPixelFormatAttribute)(this->MultiSamples),

Sample buffers supported in OS X since 10.2.  Is this safe on all OS X
machines?  Is it possible that it could cause creation of the context
to fail if the gfx card does not support sample buffers?

The gerrit patch is here:
http://review.source.kitware.com/#/c/12201/

  David



More information about the vtk-developers mailing list