From 001de0ac4e9ccd5c440dca4a2994deca668a2d9f Mon Sep 17 00:00:00 2001 From: Kristian Høgsberg Date: Tue, 6 Nov 2007 13:32:04 -0500 Subject: Remove a couple of "deprecated" fields from __GLXcontextRec. The __GLXcontextRec struct is internal to the libGL implementation. No point in "deprecating", just get rid of it. --- src/glx/x11/glxcmds.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/glx/x11/glxcmds.c') diff --git a/src/glx/x11/glxcmds.c b/src/glx/x11/glxcmds.c index 80d46f6b23..848ba3bba1 100644 --- a/src/glx/x11/glxcmds.c +++ b/src/glx/x11/glxcmds.c @@ -420,8 +420,6 @@ CreateContext(Display *dpy, XVisualInfo *vis, gc->isDirect = GL_TRUE; gc->screen = mode->screen; gc->psc = psc; - gc->vid = mode->visualID; - gc->fbconfigID = mode->fbconfigID; gc->mode = mode; } else { @@ -1515,13 +1513,15 @@ static int __glXQueryContextInfo(Display *dpy, GLXContext ctx) ctx->share_xid = *pProp++; break; case GLX_VISUAL_ID_EXT: - ctx->vid = *pProp++; + ctx->mode = + _gl_context_modes_find_visual(ctx->psc->visuals, *pProp++); break; case GLX_SCREEN: ctx->screen = *pProp++; break; case GLX_FBCONFIG_ID: - ctx->fbconfigID = *pProp++; + ctx->mode = + _gl_context_modes_find_fbconfig(ctx->psc->configs, *pProp++); break; case GLX_RENDER_TYPE: ctx->renderType = *pProp++; @@ -1546,7 +1546,7 @@ glXQueryContext(Display *dpy, GLXContext ctx, int attribute, int *value) int retVal; /* get the information from the server if we don't have it already */ - if (!ctx->isDirect && (ctx->vid == None)) { + if (!ctx->isDirect && (ctx->mode == NULL)) { retVal = __glXQueryContextInfo(dpy, ctx); if (Success != retVal) return retVal; } @@ -1555,13 +1555,13 @@ glXQueryContext(Display *dpy, GLXContext ctx, int attribute, int *value) *value = (int)(ctx->share_xid); break; case GLX_VISUAL_ID_EXT: - *value = (int)(ctx->vid); + *value = ctx->mode ? ctx->mode->visualID : None; break; case GLX_SCREEN: *value = (int)(ctx->screen); break; case GLX_FBCONFIG_ID: - *value = (int)(ctx->fbconfigID); + *value = ctx->mode ? ctx->mode->fbconfigID : None; break; case GLX_RENDER_TYPE: *value = (int)(ctx->renderType); -- cgit v1.2.3