Bug 410 - Multisampling doesn't work at all
Summary: Multisampling doesn't work at all
Status: VERIFIED DUPLICATE of bug 397
Alias: None
Product: Jogl
Classification: JogAmp
Component: core (show other bugs)
Version: 2
Hardware: All all
: P2 blocker
Assignee: Sven Gothel
URL:
Depends on:
Blocks:
 
Reported: 2010-09-08 07:01 CEST by Demoscene Passivist
Modified: 2010-11-22 17:57 CET (History)
4 users (show)

See Also:
Type: DEFECT
SCM Refs:
96af6c9bf2d683115996214cd895f9f9ef7ceea6 7262641429b542929efc699e392f410f1dee2187
Workaround: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Demoscene Passivist 2010-09-08 07:01:18 CEST
Overview:
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.

Actual Results:
No mutisampling visible. Lines not at all smooth.

Expected Results:
Lines should be smooth.
Comment 1 ozemale 2010-09-09 02:53:24 CEST
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.
Comment 2 Michael Bien 2010-09-09 08:35:46 CEST
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

validated with:
            X11GLXGraphicsConfiguration config = (X11GLXGraphicsConfiguration)drawable.getNativeWindow().getGraphicsConfiguration().getNativeGraphicsConfiguration();

            long display = drawable.getNativeWindow().getDisplayHandle();
            int[] foo = new int[1];
            GLX.glXGetFBConfigAttrib(display, config.getFBConfig(), GLX.GLX_SAMPLES, foo, 0);

            System.out.println("GLX_SAMPLES "+foo[0]);
            GLX.glXGetFBConfigAttrib(display, config.getFBConfig(), GLX.GLX_SAMPLE_BUFFERS, foo, 0);
            System.out.println("GLX_SAMPLE_BUFFERS "+foo[0]);

result:
GLX_SAMPLES 4
GLX_SAMPLE_BUFFERS 1

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.
(http://projectkenai.com/projects/netbeans-opengl-pack/downloads/directory/releases)
Comment 3 Michael Bien 2010-09-09 08:38:14 CEST
wrong link in last comment.
-> http://projectkenai.com/projects/netbeans-opengl-pack/downloads/directory/early-access
Comment 4 Julien Gouesse 2010-09-22 04:57:29 CEST
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.
Comment 5 Sven Gothel 2010-11-19 00:22:52 CET
https://github.com/sgothel/jogl/commit/96af6c9bf2d683115996214cd895f9f9ef7ceea6

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 ***