+ if( !fb_cfgs ) do {
+ int fb_attrs[] = {
+ GLX_CONFIG_CAVEAT, GLX_SLOW_CONFIG,
+ GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT | GLX_PBUFFER_BIT | GLX_PIXMAP_BIT,
+ GLX_DOUBLEBUFFER, 1,
+ GLX_RENDER_TYPE, GLX_RGBA_BIT,
+ GLX_ACCUM_RED_SIZE, 1,
+ GLX_ACCUM_GREEN_SIZE, 1,
+ GLX_ACCUM_BLUE_SIZE, 1,
+ GLX_ACCUM_ALPHA_SIZE, 1,
+ GLX_RED_SIZE, 8,
+ GLX_GREEN_SIZE, 8,
+ GLX_BLUE_SIZE, 8,
+ GLX_ALPHA_SIZE, 8,
+ None
+ };
+ fb_cfgs = glXChooseFBConfig(display, scrnum, fb_attrs+2, &ncfgs);
+ if( fb_cfgs && ncfgs ) break;
+ fb_cfgs = glXChooseFBConfig(display, scrnum, fb_attrs+0, &ncfgs);
+ if( fb_cfgs && ncfgs ) break;
+ fb_attrs[5] = 0;
+ fb_cfgs = glXChooseFBConfig(display, scrnum, fb_attrs+2, &ncfgs);
+ if( fb_cfgs && ncfgs ) break;
+ fb_cfgs = glXChooseFBConfig(display, scrnum, fb_attrs+0, &ncfgs);
+ } while(0);
+ if( fb_cfgs && ncfgs ) {
+ for( int i=0; !vis_info && i<ncfgs; ++i )
+ vis_info = glXGetVisualFromFBConfig(display, cfg=fb_cfgs[i]);
+ }
+ if( vis_info ) {
+ vis = vis_info->visual;
+ depth = vis_info->depth;
+ }
+ else {
+ printf("%s\n", "BC_DisplayInfo::gl_fb_config failed");
+ cfg = 0;
+ }
+ return 0;