FSAA on MacBook

hi,

the multisample demo is not working on my macbook (gfx: intel gma 950) under os x… the MultisampleChooser finds a GLCapabilities with numSamples = 4, but canvas.getChoosenGLCapabilities returns null and nothing is smooth :frowning:
are there known issues on fsaa on a mac? am i missing something?

Are you using the latest JOGL nightly build? Unless there’s a bug, GLCanvas.getChosenGLCapabilities() shouldn’t be returning null (once the canvas has been realized and GLEventListener.init() has been called).

The GLCapabilitiesChooser doesn’t report completely accurate information on Mac OS X due to how the OS defines its OpenGL capabilities. It’s phrased in terms of many capability bits which can be set, instead of as a list of available visuals or pixel formats as on other platforms. Enumerating all combinations of capability bits (not all of which are supported by the graphics card, BTW) is not feasible.

However, getChosenGLCapabilities() should be reporting accurate information. I’d like to understand why it’s returning null for you.

hi ken,
i switched to the lasest build (20070404) and also tried it on my windows system. although fsaa is working, getChosenGLCapabilities also returns null. i added a test, that is called on the first call to display and systen.out.println’s the canvas and the chosen capabilities:

// for the working fsaa window
javax.media.opengl.GLCanvas[canvas0,4,30,512x512]
null
// no aa window
javax.media.opengl.GLCanvas[canvas0,4,30,512x512]
GLCapabilities [DoubleBuffered: true, Stereo: false, HardwareAccelerated: true, DepthBits: 24, StencilBits: 0, Red: 8, Green: 8, Blue: 8, Alpha: 0, Red Accum: 16, Green Accum: 16, Blue Accum: 16, Alpha Accum: 16, Multisample: false ]

same results on mac with latest jogl libs, except that fsaa is not working.

the chooser:

    static class MultisampleChooser extends DefaultGLCapabilitiesChooser
    {
	public int chooseCapabilities(GLCapabilities desired,
		GLCapabilities[] available,
		int windowSystemRecommendedChoice)
	{
	    boolean anyHaveSampleBuffers = false;
	    for (int i = 0; i < available.length; i++)
	    {
		GLCapabilities caps = available[i];
		if (caps != null && caps.getSampleBuffers())
		{
		    anyHaveSampleBuffers = true;
		    System.out.println("num samples: " + caps.getNumSamples());
		    break;
		}
	    }
           ...

gives me

“num samples: 2” on windows and
“num samples: 4” on mac

If GLCapabilitiesChooser is so difficult on mac, how to get fsaa working? I still dont understand if it is suposed to work someway…

thx.

The issue with getChosenGLCapabilities() returning null on Windows for pixel formats supporting full-scene antialiasing was being caused by strange behavior of the Windows DescribePixelFormat call and has been worked around in JOGL. This fix should show up in nightly builds dated 4/8 and later.

I can’t reproduce the issue of getChosenGLCapabilities() returning null on the Mac.

You don’t really need the MultisampleChooser from the Multisample demo; it’s only intended to show how you might discover whether FSAA appears to be supported. I think that on Macs that support multisampling, if you just use the default GLCapabilitiesChooser then it should work. Please post if this doesn’t appear to be the case.

hi,

i had some problems with the netbeans debugger… getChosenGLCapabilities" doesn’t return null on my mac, sorry.

unfortunately i still have no fsaa :frowning: the unmodified multisample demo is not working. the MultisampleChooser seems to be working correctly. there are no "Warning: … " messages, but the GLCapabilites returned from getChosenGLCapabilities doesn’t support multisampling and i have these ugly lines in both windows.

os x: 10.4.9, lastest jogl builds, intel macbook

did you change somethinge in the “multisample-code”, should i try another (older) version? i really need to get this working :frowning:

I don’t get FSAA on the Intel Mac Mini in my office, which is also using Intel integrated graphics.

If you can find a full-scene antialiasing example in C/C++ which works on your Mac then please file an RFE with the JOGL Issue Tracker and attach it. Right now it looks to me like your machine just doesn’t support FSAA.

oh, i really thought it would support fsaa, but it definitely doesnt :frowning:
maybe you could just add some more documentation on the GLCapabilities, because it was confusing me, that it told me fsaa would be present.

never the less, jogl rocks!