Please, please help: Multisampling in linux

I’m desperately trying to get multisampling to work under linux but I can’t figure it out. I have a couple of questions:

  1. How should I initialize my window?
    • Can I use glut or glx or perhaps glew?
    • Can I run in windowed mode or do I need to
      run in full screen?
    • Do I need to alter any of Radeons driver
      settings outside my program?
  2. After initalizing, do I need to do anything
    else than calling glEnable(GL_MULTISAMPLE_ARB)?
  3. Can I enable disable it at my will (I’m using

Thanks a billion!

Open up /etc/X11/XF86Config-4
Look for the line:

Option “FSAAScale” “0”

Change it to 2, 4, or 6 for the number of multisamples you want.
Restart graphics.

You can enable multisampling in your app or outside it. Outside is usually done via environment variables or XF86Config options, and overrides the multisampling that the app requests. Windowed and full screen should work with either method.

Doing it from the app:

I haven’t tried it on ATI+Linux, but I have with NV+Linux. You can do it with either GLUT or GLX (glew doesn’t create contexts, so it won’t do it for you). With GLUT, pass GLUT_MULTISAMPLE to glutInitDisplayMode. I’m not sure how it chooses the number of samples to request.

With GLX, you need GLX 1.4 or GLX_ARB_multisample (see the ARB_multisample spec). Assuming the ARB extension, add GLX_SAMPLE_BUFFERS_ARB=1 and GLX_SAMPLES_ARB=n to the glXChooseVisual call.

Once you have a multisampled context, glEnable(GL_MULTISAMPLE) should be all you need.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.