After reading this thread http://jogamp.762907.n3.nabble.com/Using-setNumSamples-doesn-t-work-tp1427769p1427769.html in the Jogamp forums I tested multisampling with my own framework as well as with the official multisample.java example found on github in the jogl-demos repository and I doesn't work at all.
To eliminate the possibility of driver issues I tried it on a "NVidia 8800M GTX" (Vista x32) and on an "ATI Mobility Radeon HD 4570" (Win7 x64). Same result - no antialiasing/multisampling at all.
Steps to Reproduce:
Try the "official" mutisampling.java example from jogl-demos on github. Doesn't multisample at all.
No mutisampling visible. Lines not at all smooth.
Lines should be smooth.
On my machine I am able to set 8 samples successfully but beyond that it is broken. The machine has an NVIDIA Quadro FX-5800 GPU and is running Windows 7 64-bit with Java 6 Update 21 (32-bit). The GPU is capable of 32X antialiasing so setting 8 samples is well below capacity.
When setting JOGL debug to ON I get a multitude of exceptions that don't manifest themselves with debug turned off. The most significant of these are documented in the thread referred to in the original bug report comment. Setting the number of samples works perfectly with JOGL 1.x on the same machine but is seriously broken with JOGL 2.x.
tried to find the cause; results so far (linux):
- capabilities are properly chosen
- context is created with correct FBConfig
- display used for rendering has the right FBConfig
X11GLXGraphicsConfiguration config = (X11GLXGraphicsConfiguration)drawable.getNativeWindow().getGraphicsConfiguration().getNativeGraphicsConfiguration();
long display = drawable.getNativeWindow().getDisplayHandle();
int foo = new int;
GLX.glXGetFBConfigAttrib(display, config.getFBConfig(), GLX.GLX_SAMPLES, foo, 0);
GLX.glXGetFBConfigAttrib(display, config.getFBConfig(), GLX.GLX_SAMPLE_BUFFERS, foo, 0);
also tested with jogl 1.1a ... worked
tested with over one year old jogl 2 build... didn't work. So the bug is already there since the beginning of jogl2.
wrong link in last comment.
I tried to use JOGL 2 on Linux with multisampling, I have no exception, no log but it has no effect, lines are not smooth.
Fixes the situation under X11/AWT.
NEWT/X11 always worked.
The generic Window issue is related to #397, which I will finish today.
*** This bug has been marked as a duplicate of bug 397 ***