matrem
09-20-2009, 04:12 AM
Hi,
I can't get multisampled default framebuffer with glXChooseFBConfig, whereas with glXChooseVisual I can.
my attrib list (used with glXChooseFBConfig) follow :
int attlist[] =
{
GLX_FBCONFIG_ID, GLX_DONT_CARE,
GLX_BUFFER_SIZE, 0, //not in indexed color mode
GLX_LEVEL, 0,
GLX_DOUBLEBUFFER, True,
GLX_STEREO, False,
GLX_AUX_BUFFERS, 0,
GLX_RED_SIZE, static_cast<int>(_config.colorBuffer.r),
GLX_GREEN_SIZE, static_cast<int>(_config.colorBuffer.g),
GLX_BLUE_SIZE, static_cast<int>(_config.colorBuffer.b),
GLX_ALPHA_SIZE, static_cast<int>(_config.colorBuffer.a),
GLX_DEPTH_SIZE, static_cast<int>(_config.depthBuffer),
GLX_STENCIL_SIZE, static_cast<int>(_config.stencilBuffer),
GLX_ACCUM_RED_SIZE, 0,
GLX_ACCUM_GREEN_SIZE, 0,
GLX_ACCUM_BLUE_SIZE, 0,
GLX_ACCUM_ALPHA_SIZE, 0,
GLX_RENDER_TYPE, GLX_RGBA_BIT,
GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT,
GLX_X_RENDERABLE, True,
GLX_X_VISUAL_TYPE, GLX_TRUE_COLOR,
GLX_CONFIG_CAVEAT, GLX_NONE,
GLX_TRANSPARENT_TYPE, GLX_NONE,
GLX_SAMPLE_BUFFERS, (_config.samples > 1 ? 1 : 0),
GLX_SAMPLES, (_config.samples > 1 ? static_cast<int>(_config.samples) : 0),
None
};
And with GLX_SAMPLE_BUFFERS == 0 && GLX_SAMPLES == 0 I have only these two configs (when I look at glxinfo I see many more possible configs, and some of them multisampled) :
------------------------------------------------------
Double buffer 1
Stereo 0
Caveat none
X renderable 1
Frame buffer level 0
Color buffer size 32
Red buffer size 8
Blue buffer size 8
Green buffer size 8
Alpha buffer size 8
Aux buffers 4
Depth buffer size 24
Stencil buffer size 8
Red Accum buffer size 16
Blue accum buffer size 16
Green accum buffer size 16
Alpha accum buffer size 16
Render mode RGBA
Drawable type available window pixmap pbuffer
Visual type available true_color direct_color pseudo_color static_color gray_scale static_gray
Transparent type none
Sample buffers 0
Samples per fragment 0
------------------------------------------------------
------------------------------------------------------
Double buffer 1
Stereo 0
Caveat none
X renderable 1
Frame buffer level 0
Color buffer size 32
Red buffer size 8
Blue buffer size 8
Green buffer size 8
Alpha buffer size 8
Aux buffers 4
Depth buffer size 24
Stencil buffer size 8
Red Accum buffer size 16
Blue accum buffer size 16
Green accum buffer size 16
Alpha accum buffer size 16
Render mode RGBA
Drawable type available window pixmap pbuffer
Visual type available true_color direct_color pseudo_color static_color gray_scale static_gray
Transparent type none
Sample buffers 0
Samples per fragment 0
------------------------------------------------------
With glXChooseVisual I use this attrib list :
int attlist[] =
{
GLX_USE_GL,
GLX_BUFFER_SIZE, static_cast<int>(colorBufferSize),
GLX_RGBA,
GLX_DOUBLEBUFFER,
GLX_RED_SIZE, static_cast<int>(_config.colorBuffer.r),
GLX_GREEN_SIZE, static_cast<int>(_config.colorBuffer.g),
GLX_BLUE_SIZE, static_cast<int>(_config.colorBuffer.b),
GLX_ALPHA_SIZE, static_cast<int>(_config.colorBuffer.a),
GLX_ACCUM_RED_SIZE, 0,
GLX_ACCUM_GREEN_SIZE, 0,
GLX_ACCUM_BLUE_SIZE, 0,
GLX_ACCUM_ALPHA_SIZE, 0,
GLX_DEPTH_SIZE, static_cast<int>(_config.depthBuffer),
GLX_STENCIL_SIZE, static_cast<int>(_config.stencilBuffer),
GLX_SAMPLE_BUFFERS, (_config.samples > 1 ? 1 : 0),
GLX_SAMPLES, (_config.samples > 1 ? static_cast<int>(_config.samples) : 0),
None
};
I'm on a geforce 9800gt with 190.38 driver (glx 1.4), on kubuntu 9.04.
Does anyone have the same problem?
I can't get multisampled default framebuffer with glXChooseFBConfig, whereas with glXChooseVisual I can.
my attrib list (used with glXChooseFBConfig) follow :
int attlist[] =
{
GLX_FBCONFIG_ID, GLX_DONT_CARE,
GLX_BUFFER_SIZE, 0, //not in indexed color mode
GLX_LEVEL, 0,
GLX_DOUBLEBUFFER, True,
GLX_STEREO, False,
GLX_AUX_BUFFERS, 0,
GLX_RED_SIZE, static_cast<int>(_config.colorBuffer.r),
GLX_GREEN_SIZE, static_cast<int>(_config.colorBuffer.g),
GLX_BLUE_SIZE, static_cast<int>(_config.colorBuffer.b),
GLX_ALPHA_SIZE, static_cast<int>(_config.colorBuffer.a),
GLX_DEPTH_SIZE, static_cast<int>(_config.depthBuffer),
GLX_STENCIL_SIZE, static_cast<int>(_config.stencilBuffer),
GLX_ACCUM_RED_SIZE, 0,
GLX_ACCUM_GREEN_SIZE, 0,
GLX_ACCUM_BLUE_SIZE, 0,
GLX_ACCUM_ALPHA_SIZE, 0,
GLX_RENDER_TYPE, GLX_RGBA_BIT,
GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT,
GLX_X_RENDERABLE, True,
GLX_X_VISUAL_TYPE, GLX_TRUE_COLOR,
GLX_CONFIG_CAVEAT, GLX_NONE,
GLX_TRANSPARENT_TYPE, GLX_NONE,
GLX_SAMPLE_BUFFERS, (_config.samples > 1 ? 1 : 0),
GLX_SAMPLES, (_config.samples > 1 ? static_cast<int>(_config.samples) : 0),
None
};
And with GLX_SAMPLE_BUFFERS == 0 && GLX_SAMPLES == 0 I have only these two configs (when I look at glxinfo I see many more possible configs, and some of them multisampled) :
------------------------------------------------------
Double buffer 1
Stereo 0
Caveat none
X renderable 1
Frame buffer level 0
Color buffer size 32
Red buffer size 8
Blue buffer size 8
Green buffer size 8
Alpha buffer size 8
Aux buffers 4
Depth buffer size 24
Stencil buffer size 8
Red Accum buffer size 16
Blue accum buffer size 16
Green accum buffer size 16
Alpha accum buffer size 16
Render mode RGBA
Drawable type available window pixmap pbuffer
Visual type available true_color direct_color pseudo_color static_color gray_scale static_gray
Transparent type none
Sample buffers 0
Samples per fragment 0
------------------------------------------------------
------------------------------------------------------
Double buffer 1
Stereo 0
Caveat none
X renderable 1
Frame buffer level 0
Color buffer size 32
Red buffer size 8
Blue buffer size 8
Green buffer size 8
Alpha buffer size 8
Aux buffers 4
Depth buffer size 24
Stencil buffer size 8
Red Accum buffer size 16
Blue accum buffer size 16
Green accum buffer size 16
Alpha accum buffer size 16
Render mode RGBA
Drawable type available window pixmap pbuffer
Visual type available true_color direct_color pseudo_color static_color gray_scale static_gray
Transparent type none
Sample buffers 0
Samples per fragment 0
------------------------------------------------------
With glXChooseVisual I use this attrib list :
int attlist[] =
{
GLX_USE_GL,
GLX_BUFFER_SIZE, static_cast<int>(colorBufferSize),
GLX_RGBA,
GLX_DOUBLEBUFFER,
GLX_RED_SIZE, static_cast<int>(_config.colorBuffer.r),
GLX_GREEN_SIZE, static_cast<int>(_config.colorBuffer.g),
GLX_BLUE_SIZE, static_cast<int>(_config.colorBuffer.b),
GLX_ALPHA_SIZE, static_cast<int>(_config.colorBuffer.a),
GLX_ACCUM_RED_SIZE, 0,
GLX_ACCUM_GREEN_SIZE, 0,
GLX_ACCUM_BLUE_SIZE, 0,
GLX_ACCUM_ALPHA_SIZE, 0,
GLX_DEPTH_SIZE, static_cast<int>(_config.depthBuffer),
GLX_STENCIL_SIZE, static_cast<int>(_config.stencilBuffer),
GLX_SAMPLE_BUFFERS, (_config.samples > 1 ? 1 : 0),
GLX_SAMPLES, (_config.samples > 1 ? static_cast<int>(_config.samples) : 0),
None
};
I'm on a geforce 9800gt with 190.38 driver (glx 1.4), on kubuntu 9.04.
Does anyone have the same problem?