Enabling FSAA

I thought it seemed fairly obvious, but perhaps i’ve missed something, or perhaps i’ve stumbled onto a bug…

Attempting to use FSAA, I added these lines to my capabilities code:


glCaps.setSampleBuffers(true); //this line causes the error
glCaps.setNumSamples(2); //this line by itself causes no problem

but now it throws an error, saying “unknown pixel format attribute 8” on the first redraw; which i presume means something went wrong with picking the capabilities. Anyone know more about this?

My guess was a glitch in the new jogl release? change of a static constant value somewhere or something?

What OS, graphics card, etc.? Could you post a stack trace? I don’t see that error string anywhere in the current JOGL sources. Maybe it’s coming from your OpenGL implementation.

OS = W2K, sp4
driver = newest Nvidia release (downloaded yesterday)
graphics card = MSI GF6600
jogl = jsr231 - have tried beta1, beta2, and the current nightly; all 3 produce this

Here is yon stack trace:

Exception in thread “Timer-0” javax.media.opengl.GLException: javax.media.opengl.GLException: Unknown pixel format attribute 8
at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:205)
at javax.media.opengl.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:234)
at javax.media.opengl.GLCanvas.display(GLCanvas.java:127)
at com.sun.opengl.utils.Animator.display(Animator.java:144)
at com.sun.opengl.utils.FPSAnimator$1.run(FPSAnimator.java:76)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
Caused by: javax.media.opengl.GLException: Unknown pixel format attribute 8
at com.sun.opengl.impl.windows.WindowsGLDrawable.iattributes2GLCapabilities(WindowsGLDrawable.java:583)
at com.sun.opengl.impl.windows.WindowsGLDrawable.choosePixelFormat(WindowsGLDrawable.java:198)
at com.sun.opengl.impl.windows.WindowsOnscreenGLDrawable.lockSurface(WindowsOnscreenGLDrawable.java:167)
at com.sun.opengl.impl.windows.WindowsOnscreenGLContext.makeCurrentImpl(WindowsOnscreenGLContext.java:58)
at com.sun.opengl.impl.GLContextImpl.makeCurrent(GLContextImpl.java:74)
at com.sun.opengl.impl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:117)
at javax.media.opengl.GLCanvas$DisplayOnEventDispatchThreadAction.run(GLCanvas.java:276)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Exception in thread “AWT-EventQueue-0” javax.media.opengl.GLException: Unknown pixel format attribute 8
at com.sun.opengl.impl.windows.WindowsGLDrawable.iattributes2GLCapabilities(WindowsGLDrawable.java:583)
at com.sun.opengl.impl.windows.WindowsGLDrawable.choosePixelFormat(WindowsGLDrawable.java:198)
at com.sun.opengl.impl.windows.WindowsOnscreenGLDrawable.lockSurface(WindowsOnscreenGLDrawable.java:167)
at com.sun.opengl.impl.windows.WindowsOnscreenGLContext.makeCurrentImpl(WindowsOnscreenGLContext.java:58)
at com.sun.opengl.impl.GLContextImpl.makeCurrent(GLContextImpl.java:74)
at com.sun.opengl.impl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:117)
at javax.media.opengl.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:236)
at javax.media.opengl.GLCanvas.display(GLCanvas.java:127)
at javax.media.opengl.GLCanvas.paint(GLCanvas.java:139)
at sun.awt.RepaintArea.paintComponent(RepaintArea.java:248)
at sun.awt.RepaintArea.paint(RepaintArea.java:224)
at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:254)
at java.awt.Component.dispatchEventImpl(Component.java:4031)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

My guess was a bad static value somewhere (either on the jogl side or the windows/nvidia native side) for the “multisample buffers enable” attribute; but i would have figured a bug of that magnitude would be mentioned somewhere other than in my stack traces…

Sorry about that. This code was recently refactored and it looks like a bug was introduced. I’ve checked in a fix; could you please try tomorrow’s nightly build from the JOGL home page and see if it fixes the problem? Please double-check to make sure the date of the build is 1/20 as we’ve had some build breakage recently. Thanks.

sweet. thanks a lot for the prompt fix; i’ll try the new build tomorrow and let ya know how it goes.

the nightly build date still says 1/18; so i guess i’ll wait for a rebuild

There was a problem with last night’s build. We may push one manually today, but otherwise please just keep looking for the next updated build.