JOGL PBuffer and GLJPanel pipeline problems

Hi,
I spend the last day looking for some answer but I only found a similar problem in another post (http://www.mail-archive.com/java2d-interest@capra.eng.sun.com/msg03962.html).

Recently I updated my system from Ubuntu Dapper to Edgy and from ATI 8.26.x driver version to 8.35.5.

fglrxinfo
display: :0.0 screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: ATI MOBILITY RADEON 9600/9700 Series
OpenGL version string: 2.0.6400 (8.35.5)
Also I have JDK6 and the last release of JOGL (jogl-1.1.0-pre-20070404-linux-i586).
The fgl_glxgears program runs ok

Until now, using JDK6, the old 8.26.x drivers for ATI and JOGL 1.0.0 all was ok in my little application. Now I use JDK6, ATI 8.35.5 and JOGL 1.1.0 (last night build).

I have two problems:

First)
In some part of my code I try to create a PBuffer, first checking with “canCreateGLPbuffer” and then using “GLPbuffer pbuffer = GLDrawableFactory.getFactory().createGLPbuffer(capabilities, null, 1,1, null);”

Until now it works fine but now I recive this:
javax.media.opengl.GLException: pbuffer creation error: glXCreatePbuffer() failed
at com.sun.opengl.impl.x11.X11PbufferGLDrawable.createPbuffer(X11PbufferGLDrawable.java:162)
at com.sun.opengl.impl.x11.X11PbufferGLDrawable.(X11PbufferGLDrawable.java:73)
at com.sun.opengl.impl.x11.X11GLDrawableFactory$3.run(X11GLDrawableFactory.java:320)
at com.sun.opengl.impl.x11.X11GLDrawableFactory.maybeDoSingleThreadedWorkaround(X11GLDrawableFactory.java:670)
at com.sun.opengl.impl.x11.X11GLDrawableFactory.createGLPbuffer(X11GLDrawableFactory.java:327)

Second)
Also (and this I didn’t test it in the previous configuration) when I try to execute any JOGL app enabling the opengl pipeline I receive another error.
When I execute demo.gears I get:

java Gears
INIT GL IS: com.sun.opengl.impl.GLImpl
Chosen GLCapabilities: GLCapabilities [DoubleBuffered: true, Stereo: false, HardwareAccelerated: true, DepthBits: 24, StencilBits: 0, Red: 8, Green: 8, Blue: 8, Alpha: 8, Red Accum: 0, Green Accum: 0, Blue Accum: 0, Alpha Accum: 0, Multisample: false ]
GL_VENDOR: ATI Technologies Inc.
GL_RENDERER: ATI MOBILITY RADEON 9600/9700 Series
GL_VERSION: 2.0.6400 (8.35.5)

That’s ok, my vendor is ATI, but when I execute demo.jgears I get:

java JGears
java.lang.IllegalArgumentException: input == null!
at javax.imageio.ImageIO.read(ImageIO.java:1322)
at JGears.(JGears.java:42)
at JGears.main(JGears.java:109)
INIT GL IS: com.sun.opengl.impl.GLImpl
Chosen GLCapabilities: GLCapabilities [DoubleBuffered: false, Stereo: false, HardwareAccelerated: true, DepthBits: 24, StencilBits: 0, Red: 8, Green: 8, Blue: 8, Alpha: 8, Red Accum: 0, Green Accum: 0, Blue Accum: 0, Alpha Accum: 0, Multisample: false ]
GL_VENDOR: Mesa project: www.mesa3d.org
GL_RENDERER: Mesa GLX Indirect
GL_VERSION: 1.2 (1.5 Mesa 6.5.1)

It runs slowly but runs.
What is the problem here?? My vendor is not Mesa.

And finally it I execute with:

java -Dsun.java2d.opengl=true JGears
or
java -Dsun.java2d.opengl=true -Dsun.java2d.opengl.fbobject=false JGears

the result is:

exception in QueueFlusher:
javax.media.opengl.GLException: context creation error: couldn’t find a suitable frame buffer configuration
at com.sun.opengl.impl.x11.X11ExternalGLDrawable$Context.create(X11ExternalGLDrawable.java:180)
at com.sun.opengl.impl.x11.X11ExternalGLDrawable$Context.makeCurrentImpl(X11ExternalGLDrawable.java:123)
at com.sun.opengl.impl.GLContextImpl.makeCurrent(GLContextImpl.java:134)
at com.sun.opengl.impl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:182)
at javax.media.opengl.GLJPanel$2.run(GLJPanel.java:629)
at sun.java2d.opengl.OGLRenderQueue$QueueFlusher.run(OGLRenderQueue.java:203)

Only one more detail. I execute my NetBeans with the options -Dsun.java2d.opengl=true in the netbeans.conf file. Until now it words nice but now the slicers and other components are not well rendered.

Any help or ideas will be appreciated.
Thanks a lot in advice.

Did you remember to turn off the double-buffered property in the GLCapabilities you passed in during the pbuffer’s creation? Most cards, especially older cards, don’t work well when double-buffering is requested for pbuffers.

This looks like you don’t have jogl-demos-data.jar on your CLASSPATH.

The only thing that comes to mind here is an issue which has come up before with the JPackage “Sun compatibility” RPMs breaking hardware acceleration for JOGL applications. However I recall that this broke all JOGL apps, not just ones using off-screen rendering. Still, look at the Platform Notes / Linux section of the JOGL User’s Guide and see if it applies to your configuration.

Run with -Dsun.java2d.opengl=True instead. I suspect the Java 2D / OpenGL pipeline isn’t really being enabled on your setup.

I have just removed and reinstalled all drivers. glxinfo and fglrxinfo works right telling me my card vendor is ATI.

My code is:


            capabilities.setStencilBits(8);
            capabilities.setDoubleBuffered(false);
            GLPbuffer pbuffer = GLDrawableFactory.getFactory().createGLPbuffer(capabilities, null, 1,1, null);

and the result continues as:
Exception in thread "main" javax.media.opengl.GLException: javax.media.opengl.GLException: pbuffer creation error: glXCreatePbuffer() failed at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:271) at com.sun.opengl.impl.x11.X11GLDrawableFactory.maybeDoSingleThreadedWorkaround(X11GLDrawableFactory.java:668) at com.sun.opengl.impl.x11.X11GLDrawableFactory.createGLPbuffer(X11GLDrawableFactory.java:327)

On the other side, when I execute the demo.gears example (not taking in account the problem with jogl-demos-data.jar) the result is:
`

java Gears
GL_VENDOR: ATI Technologies Inc.
GL_RENDERER: ATI MOBILITY RADEON 9600/9700 Series
GL_VERSION: 2.0.6400 (8.35.5)
`

but when I execute demo.jgears I get:
`

java JGears
GL_VENDOR: Mesa project: www.mesa3d.org
GL_RENDERER: Mesa GLX Indirect
GL_VERSION: 1.2 (1.5 Mesa 6.5.1)
`

I read it but I don’t use jpackage, I have installed jdk and jogl by my hand and setting the PATH variable.

It is enable, I exectue:
`

java -Dsun.java2d.opengl=True JGears
OpenGL pipeline enabled for default config on screen 0
exception in QueueFlusher:
javax.media.opengl.GLException: context creation error: couldn’t find a suitable frame buffer configuration
at com.sun.opengl.impl.x11.X11ExternalGLDrawable$Context.create(X11ExternalGLDrawable.java:180)
at com.sun.opengl.impl.x11.X11ExternalGLDrawable$Context.makeCurrentImpl(X11ExternalGLDrawable.java:123)
at com.sun.opengl.impl.GLContextImpl.makeCurrent(GLContextImpl.java:134)
at com.sun.opengl.impl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:182)
at javax.media.opengl.GLJPanel$2.run(GLJPanel.java:629)
at sun.java2d.opengl.OGLRenderQueue$QueueFlusher.run(OGLRenderQueue.java:203)
exception in QueueFlusher:

`

I think it is not a system problem because the system and, all programs that need acceleration, works fine.
The extrange thing (for me) is the different output between, about graphics card, between demo.gears (with GLCanvas) and demo.jgears (with GLJPanel).

More ideas, please.

I’m sorry, but I don’t have any more suggestions at the moment. The JGears demo is working fine for me on Solaris/x86 with NVidia hardware and the latest drivers. I don’t know why JOGL’s off-screen rendering seems to be going through Mesa on your machine. The failure in the X11ExternalGLDrawable is also very confusing, though it may be related to this.