I have been happily using Jogl 1.0 for my Java terrain analysis software for 8 months now without problems. I have just tried using the 1.1 beta 5 release with the same Java code that has previously worked. Jogl 1.1 now seems to throw my application into software rendering rather than hardware acceleration as it used to. I am currently testing it with an ATI Radeon 9800 XT.
It would seem to be that this is due to the GLCapabilities I select. If I create a new GLCapabilities object, it defaults to 24 bit colour, hardware acceleration. This works fine and uses the ATI hardware. However, my application needs 32 bit colour (uses the alpha channel). If I force 32 bit colour (as I always used to), Jogl does not complain, but rendering is in software only.
I understand that there are some API changes to the GLCapabilities in the 1.1 release, but as far as I can see from the documentation, this should not cause the problem I describe. Can anyone help me by suggesting the best way to set the GLCapabilities I require on a platform that I know supports them? For the record, this is the code I am currently using to set the capabilities:
GLCapabilities desiredCaps = new GLCapabilities();
// Specific desired capabilities.
desiredCaps.setHardwareAccelerated(true);
desiredCaps.setDepthBits(32);
desiredCaps.setDoubleBuffered(true);
desiredCaps.setRedBits(8); // 32-bit RGBA colour.
desiredCaps.setGreenBits(8);
desiredCaps.setBlueBits(8);
desiredCaps.setAlphaBits(8);
desiredCaps.setStencilBits(0); // No stencil buffer required.
desiredCaps.setAccumRedBits(0); // No accumulation buffer required.
desiredCaps.setAccumGreenBits(0);
desiredCaps.setAccumBlueBits(0);
desiredCaps.setAccumAlphaBits(0);
desiredCaps.setStereo(false);
glComponent = GLDrawableFactory.getFactory().createGLCanvas(desiredCaps);
Thanks very much,
Jo.