Need help to get alpha channel under Linux

Hi,

When I create and use a GLCanvas with a GLCapability having the alpha bits set to 8 , I get an error message “Error making context current”. I kwow this problem has been reported earlier, but not solved yet. I don’t know if somebody is working on it, but I have started to dive into the code to understand what’s wrong. Bug not found at this time.

I need this capability to do alpha blending in the framebuffer. Is there some developper working on this issue ?

If not, is there somebody (Guru preferred) that can help me find the bug ?

Thanks in advance.

Aye, this is why S-Type doesn’t run under Linux unless you use the debug rendering (ie, no fancy shadow-y goodness). :frowning:

The last I heard was from Ken Russell (via PM, but I hope he doesn’t mind):

[quote]This is probably related to poor selection of visual / pixel format. JOGL’s DefaultGLCapabilitiesChooser was an attempt to write a pure Java visual selection algorithm based solely on the reported GLCapabilities per visual. Unfortunately (at least on Windows) it appears that the driver knows more information than DescribePixelFormat returns, so it isn’t possible to completely replace ChoosePixelFormat. There are other known issues on X11. This is the most serious usability problem with JOGL at the moment and is what I’m spending the time I have to work on JOGL thinking about and working on.

I attempted one fix for this problem but unfortunately there was a design flaw that required it to be discarded. I hope to have some time over the next couple of weeks to try to fix it properly. If you’re interested in helping out please let me know and I can describe the problem more fully. You should probably start a new thread on the JOGL forums for this though so others can see what’s going on.
[/quote]
Dated 1st Dec, so I’m assuming that theres not been any progress.

Hi,

In my quest for the alpha framebuffer under Linux, I have found something that could be a problem. The GLDrawableFactory creates a GLCanvas without specifying a GraphicsConfiguration. When I list and print all the GraphicsConfigurations available with my display device, some correspond to visuals that have 8 alpha bits, and some have no alpha. I check this with glxinfo. Then the X11GLContext try to find a visual that matches the specified GLcaps, find one but there is little chance that this visual be the same as the one used to create the GLCanvas. The context cannot be made current.

Can a JOGL developper involved in this part tell me if I am on the right or wrong way, before I continue ?

Thanks.

Hi,

At last, I have solved this problem ! The strange thing I wrote above was the right one. The GLCanvas isn’t created with the same visual as the one choosen by the GLCapabilityChooser, hence the error. I have hardcoded the creation of the GLCanvas with the right visual, and it works.

Now I will clean all that , and I will post the patch as soon as possible. This will give interested people some time to wait for the next JOGL delivery.