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.