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.
This commit is contained in:
parent
866d271aa8
commit
001de0ac4e
|
@ -453,19 +453,28 @@ _gl_context_modes_destroy( __GLcontextModes * modes )
|
|||
*/
|
||||
|
||||
__GLcontextModes *
|
||||
_gl_context_modes_find_visual( __GLcontextModes * modes, int vid )
|
||||
_gl_context_modes_find_visual(__GLcontextModes *modes, int vid)
|
||||
{
|
||||
while ( modes != NULL ) {
|
||||
if ( modes->visualID == vid ) {
|
||||
break;
|
||||
}
|
||||
__GLcontextModes *m;
|
||||
|
||||
modes = modes->next;
|
||||
}
|
||||
for (m = modes; m != NULL; m = m->next)
|
||||
if (m->visualID == vid)
|
||||
return m;
|
||||
|
||||
return modes;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
__GLcontextModes *
|
||||
_gl_context_modes_find_fbconfig(__GLcontextModes *modes, int fbid)
|
||||
{
|
||||
__GLcontextModes *m;
|
||||
|
||||
for (m = modes; m != NULL; m = m->next)
|
||||
if (m->fbconfigID == fbid)
|
||||
return m;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if two context-modes are the same. This is intended to be used
|
||||
|
|
|
@ -44,8 +44,10 @@ extern int _gl_get_context_mode_data( const __GLcontextModes *mode,
|
|||
extern __GLcontextModes * _gl_context_modes_create( unsigned count,
|
||||
size_t minimum_size );
|
||||
extern void _gl_context_modes_destroy( __GLcontextModes * modes );
|
||||
extern __GLcontextModes * _gl_context_modes_find_visual(
|
||||
__GLcontextModes * modes, int vid );
|
||||
extern __GLcontextModes *
|
||||
_gl_context_modes_find_visual(__GLcontextModes *modes, int vid);
|
||||
extern __GLcontextModes *
|
||||
_gl_context_modes_find_fbconfig(__GLcontextModes *modes, int fbid);
|
||||
extern GLboolean _gl_context_modes_are_same( const __GLcontextModes * a,
|
||||
const __GLcontextModes * b );
|
||||
|
||||
|
|
|
@ -232,15 +232,6 @@ struct __GLXcontextRec {
|
|||
*/
|
||||
XID share_xid;
|
||||
|
||||
/**
|
||||
* Visual id.
|
||||
*
|
||||
* \deprecated
|
||||
* This filed has been largely been replaced by the \c mode field, but
|
||||
* the work is not quite done.
|
||||
*/
|
||||
VisualID vid;
|
||||
|
||||
/**
|
||||
* Screen number.
|
||||
*/
|
||||
|
@ -367,18 +358,6 @@ struct __GLXcontextRec {
|
|||
*/
|
||||
XID hwContextID;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \c GLXFBConfigID used to create this context. May be \c None. This
|
||||
* field has been replaced by the \c mode field.
|
||||
*
|
||||
* \since Internal API version 20030317.
|
||||
*
|
||||
* \deprecated
|
||||
* This filed has been largely been replaced by the \c mode field, but
|
||||
* the work is not quite done.
|
||||
*/
|
||||
GLXFBConfigID fbconfigID;
|
||||
|
||||
/**
|
||||
* The current read-drawable for this context. Will be None if this
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue