Alpha channel in pbuffer not working :/

When I request for an alpha-channel in a pbuffer (SGIX extension), the choosevisual-thingy tells me that there are only 2 elements initialized and it later crashes at the context-creation. When not requesting for the alpha-channel, I get 8 elements.
I’m using an Nvidia TI4400 board with the latest drivers (people always say that).

If you anything about this, I’m willing to learn about it
Thnx in advance for your replies.

It is hard to give an answer if you do not post any code. How do you create a pbuffer with the choosevisual-thingy? If this is the error is the problem that you can not create a normal OpenGL window with an alpha channel. Run glxinfo and confirm that you have visuals with an alpha buffer. Perhaps are your desktop in 16 bit depth and alpha channels is only avilable in 24 bit color mode?

If the problem is with the pbuffer can you take a look at the sample code I posted some time ago. http://www.opengl.org/discussion_boards/ubb/Forum4/HTML/000589.html

If still no luck should you post some code.

Sorry for my lack on info. I’m in 16-bits mode, but still, the pbuffer should not be restricted by that, should it?
Here’s some code:

GLXContext pbcx;
GLXPbuffer pbuffer;
GLXFBConfig fbconfig;
int confAttr[] = { GLX_RENDER_TYPE_SGIX,
GLX_RGBA_BIT_SGIX,
GLX_DRAWABLE_TYPE_SGIX,
GLX_PBUFFER_BIT_SGIX,
GLX_RED_SIZE, 1,
GLX_GREEN_SIZE, 1,
GLX_BLUE_SIZE, 1,
/
GLX_ALPHA_SIZE, 1,*/
None},
pbAttr = { None},
elements;

if (!(fbconfig = glXChooseFBConfigSGIX(display, DefaultScreen(display), confAttr, &elements))) error();

if (!(pbuffer = glXCreateGLXPbufferSGIX(display, fbconfig[0], width, height, pbAttr))) error();

if (!(pbcx = glXCreateContextWithConfigSGIX(display, fbconfig[0], GLX_RGBA_TYPE_SGIX, 0, 1))) error();

I found this code somewhere in this forum I think.
When leaving out the alpha-request as in the example, ‘elements’ will be set to 8 and everything works. But when I do request for an alpha-channel, ‘elements’ will be set to 2 and the program later crashes at ‘glxCreateContextWithConfigSGIX’. The error is a simple seg fault.

No, I do not think that pbuffers is restricted to the current color depth of the desktop. I only wrote about that because you mentioned visuals. I did some testing and for me does it work on a 24 bit color desktop but not for 16 bit color depth. I got the same error that you got. I could not see anything wrong with the code so it is probably a driver bug. Send a bug report to nvidia if nobody can show something wrong in your code. They actually responded to a bug report I sent to them but if you do not get a reply will they hopefully not ignore the information also.

Requesting for something more specific should give fewer options so it is only natural that the list goes from 8 to only 2.

Phew, atleast I didn’t make something wrong
Thnx for the tip, I’ll send them a report.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.