Login  Register

Re: Antialiased polygons in JOGL 2.0 rc3

Posted by Demoscene Passivist on Nov 14, 2011; 8:55pm
URL: https://forum.jogamp.org/Antialiased-polygons-in-JOGL-2-0-rc3-tp3369689p3507956.html

I'm using build #510 of JOGL an MSAA works fine here (NEWT+AWT). Seems theres a driver/code issue on ur side and not a general JOGL MSAA problem.

Generally u only have to do this to enable MSAA in JOGL:
            
tGLCapabilities.setSampleBuffers(true);
tGLCapabilities.setNumSamples(getNumberOfSamplingBuffers());

For a more complete setup code (tested with build #510 and MSAA working) take a look at my repo on github and my AWT setup code

Also if hardware MSAA does not work on ur side for any reason u can not change I suggest u take a look at 'super sampling'. I implemented a JOGL2 version of this technique long ago while JOGLs MSAA support was actually broken temporarily. See this post  on my blog for code and further explanation.

If none of the above techniques work for u there is another alternative called "post-processing AA" wich has become very popular with the recent dawn of deferred renderers. So if wanna try out that u could take a look at my JOGL2 implementation of FXAA.