Anti-aliasing on iOS

I’m new to oF and haven’t had much chance to play around with all the options available for iOS development. But is it possible to anti-alias shapes drawn with oF on iOS devices?

I know it’s possible on iOS4 (on iPhone 3GS+) using OpenGL but I’ve found it quite complicated to set up. Is there an easy way to enable anti-aliasing (multisampling) universally to all objects drawn in oF somehow? Perhaps using ofEnableSmoothing() or is it more complicated than that?

Thanks loads!

Hi Paul,

It looks like anti-aliasing was added in this commit: and that ofAppiPhoneWindow()->enableAntiAliasing(samples); may be the right call to enable anti-aliasing.

I haven’t tried it myself yet, but that should give you some direction.


P.S. - Great to have you hear Paul. :slight_smile:

Great, I’ll investigate that method. Thanks loads Seth!

UPDATE: That did the trick, shapes looking all smooth now. The code from this example works a treat:

ofAppiPhoneWindow * iOSWindow = new ofAppiPhoneWindow();  
ofSetupOpenGL(iOSWindow, 480, 320, OF_FULLSCREEN);  
ofRunApp(new testApp);  

Excellent! I missed that example, good to know it’s there. :smiley:

Thanks for letting us know what worked.