| 1959 | |
| 1960 | |
| 1961 | int glXQueryContextInfoEXT(Display *dpy, GLXContext ctx, int attribute, |
| 1962 | int *value) |
| 1963 | { |
| 1964 | int retval = 0; |
| 1965 | |
| 1966 | TRY(); |
| 1967 | |
| 1968 | if(IS_EXCLUDED(dpy)) |
| 1969 | return _glXQueryContextInfoEXT(dpy, ctx, attribute, value); |
| 1970 | |
| 1971 | ///////////////////////////////////////////////////////////////////////////// |
| 1972 | OPENTRACE(glXQueryContextInfoEXT); PRARGD(dpy); PRARGX(ctx); |
| 1973 | PRARGIX(attribute); STARTTRACE(); |
| 1974 | ///////////////////////////////////////////////////////////////////////////// |
| 1975 | |
| 1976 | VGLFBConfig config; |
| 1977 | |
| 1978 | if(fconfig.egl) THROW("glXQueryContextInfoEXT() requires the GLX back end"); |
| 1979 | |
| 1980 | if(ctx && attribute == GLX_SCREEN_EXT && value |
| 1981 | && (config = CTXHASH.findConfig(ctx)) != NULL) |
| 1982 | { |
| 1983 | *value = config->screen; |
| 1984 | retval = Success; |
| 1985 | } |
| 1986 | else if(ctx && attribute == GLX_VISUAL_ID_EXT && value |
| 1987 | && (config = CTXHASH.findConfig(ctx)) != NULL) |
| 1988 | { |
| 1989 | *value = config->visualID; |
| 1990 | retval = Success; |
| 1991 | } |
| 1992 | else retval = _glXQueryContextInfoEXT(DPY3D, ctx, attribute, value); |
| 1993 | |
| 1994 | ///////////////////////////////////////////////////////////////////////////// |
| 1995 | STOPTRACE(); if(value) PRARGIX(*value); CLOSETRACE(); |
| 1996 | ///////////////////////////////////////////////////////////////////////////// |
| 1997 | |
| 1998 | CATCH(); |
| 1999 | return retval; |
| 2000 | } |
| 2001 | |
| 2002 | |
| 2003 | // Hand off to the 3D X server without modification, except that 'draw' is |
no test coverage detected