Hack: Force OpenGL anti-aliasing in Processing

I've previously mentioned the problem of anti-aliasing not working properly in OpenGL, which is particularly bothersome for MacOS users who can't use a graphics card control panel to override application settings to force AA. Mike Creighton posted source for a hack on the Processing forums that modifies PGraphicsOpenGL to force AA. I've created a simple version of this hack and made a replacement for the opengl.jar that comes with Processing.

This hack should work for Processing 0124 on Mac and PC. Simply download the opengl.jar below and drop it into the "libraries\opengl\library" subfolder of your Processing application directory. Make sure to make a backup of the original opengl.jar first in case this doesn't work for you. Once replaced, the new PGraphicsOpenGL class should always initialize with 4x supersampling. Please leave comments on this post to let me know if it works for you.

Downloads