Anti-aliasing in OSX not working


I’ve read how people use the setGlutDisplayString method to enable anti-aliasing but I’ve been unable to make this work. My main function looks like this:

int main(){
    ofAppGlutWindow window;
    window.setGlutDisplayString("rgb alpha double samples depth");
    ofSetupOpenGL(&window, 1024, 768, OF_FULLSCREEN);
    ofRunApp(new testApp());

I’ve tried many versions of the second line and all seem to give the same result. For example:

  • rgb double samples>=4 depth
  • rgb double depth alpha samples
  • rgba double samples>=4
  • rgba double depth alpha samples=4

etc, etc… yet in all versions my ofCircle look like the following (new users can’t post images so I had to break up the URL a little bit):


I’m in OSX 10.9, Xcode 5.11, Openframeworks v0.8.1.


antialiasing is enabled by default since some versions ago so you shouldn’t need to do anything to enable it


have you tried this? worked for me

ofAppGlutWindow window; // create a window
// set width, height, mode (OF_WINDOW or OF_FULLSCREEN)
window.setGlutDisplayString("rgba double samples>=4 depth");
ofSetupOpenGL(&window, 1024, 768, OF_WINDOW);
ofRunApp(new ofApp()); // start the app


@atanyimebutnow thanks. I tried that but the results were exactly the same (well, technically I changed ofApp() to testApp() since my code uses a different class name but that shouldn’t be the problem).

Here’s a link to the project. It’s a modified example from the book “Mastering openFrameworks: Creative Coding Demystified”. I added a very small rotation to the fbo and the edges get blurred a little but still no real anti-alias.

If anyone running OSX has the time to run this and maybe post a screenshot of one of the edges I would really appreciate it.


if you are using an fbo, then you need to enable antialiasing in the fbo itself, like:


where 4 is the number of samples, the bigger that number the better the antialiasing


Ahh there it is. Thanks! The difference is astonishing.