| 1556 | // Return the 2D X server visual that is attached to the 3D X server FB config. |
| 1557 | |
| 1558 | XVisualInfo *glXGetVisualFromFBConfig(Display *dpy, GLXFBConfig config_) |
| 1559 | { |
| 1560 | XVisualInfo *vis = NULL; |
| 1561 | VGLFBConfig config = (VGLFBConfig)config_; |
| 1562 | |
| 1563 | TRY(); |
| 1564 | |
| 1565 | if(IS_EXCLUDED(dpy)) |
| 1566 | return _glXGetVisualFromFBConfig(dpy, config_); |
| 1567 | |
| 1568 | ///////////////////////////////////////////////////////////////////////////// |
| 1569 | OPENTRACE(glXGetVisualFromFBConfig); PRARGD(dpy); PRARGC(config); |
| 1570 | STARTTRACE(); |
| 1571 | ///////////////////////////////////////////////////////////////////////////// |
| 1572 | |
| 1573 | if(!dpy || !VALID_CONFIG(config)) goto done; |
| 1574 | if(!config->visualID) goto done; |
| 1575 | vis = glxvisual::visualFromID(dpy, config->screen, config->visualID); |
| 1576 | if(!vis) goto done; |
| 1577 | VISHASH.add(dpy, vis, config); |
| 1578 | |
| 1579 | done: |
| 1580 | ///////////////////////////////////////////////////////////////////////////// |
| 1581 | STOPTRACE(); PRARGV(vis); CLOSETRACE(); |
| 1582 | ///////////////////////////////////////////////////////////////////////////// |
| 1583 | |
| 1584 | CATCH(); |
| 1585 | return vis; |
| 1586 | } |
| 1587 | |
| 1588 | |
| 1589 | XVisualInfo *glXGetVisualFromFBConfigSGIX(Display *dpy, GLXFBConfigSGIX config) |