aboutsummaryrefslogtreecommitdiffstats
path: root/src/glx/glx_pbuffer.c
diff options
context:
space:
mode:
authorKristian Høgsberg <[email protected]>2010-07-28 10:07:52 -0400
committerKristian Høgsberg <[email protected]>2010-07-28 16:42:00 -0400
commit6ddf66e9230ee862ac341c4767cf6b3b2dd2552b (patch)
tree6405435e3fdf6a0ea01db80b379b2d42c35eb3f8 /src/glx/glx_pbuffer.c
parent4f9f066485d93cd6bb0e21fec0775ceed96d14de (diff)
glx: Rename __GLcontextModes to struct glx_config
With this rename, we use 'config' consitently to refer to GLX configurations instead of the modes/configs/visual mess before.
Diffstat (limited to 'src/glx/glx_pbuffer.c')
-rw-r--r--src/glx/glx_pbuffer.c60
1 files changed, 30 insertions, 30 deletions
diff --git a/src/glx/glx_pbuffer.c b/src/glx/glx_pbuffer.c
index 02809aacfa5..abe618ddb30 100644
--- a/src/glx/glx_pbuffer.c
+++ b/src/glx/glx_pbuffer.c
@@ -183,7 +183,7 @@ determineTextureFormat(const int *attribs, int numAttribs)
}
static void
-CreateDRIDrawable(Display *dpy, const __GLcontextModes *fbconfig,
+CreateDRIDrawable(Display *dpy, struct glx_config *config,
XID drawable, XID glxdrawable,
const int *attrib_list, size_t num_attribs)
{
@@ -191,12 +191,12 @@ CreateDRIDrawable(Display *dpy, const __GLcontextModes *fbconfig,
__GLXDRIdrawable *pdraw;
__GLXscreenConfigs *psc;
- psc = priv->screenConfigs[fbconfig->screen];
+ psc = priv->screenConfigs[config->screen];
if (psc->driScreen == NULL)
return;
pdraw = psc->driScreen->createDrawable(psc, drawable,
- glxdrawable, fbconfig);
+ glxdrawable, config);
if (pdraw == NULL) {
fprintf(stderr, "failed to create drawable\n");
return;
@@ -228,7 +228,7 @@ DestroyDRIDrawable(Display *dpy, GLXDrawable drawable, int destroy_xdrawable)
#else
static void
-CreateDRIDrawable(Display *dpy, const __GLcontextModes * fbconfig,
+CreateDRIDrawable(Display *dpy, const struct glx_config * fbconfig,
XID drawable, XID glxdrawable,
const int *attrib_list, size_t num_attribs)
{
@@ -367,7 +367,7 @@ GetDrawableAttribute(Display * dpy, GLXDrawable drawable,
* This function needs to be modified to work with direct-rendering drivers.
*/
static GLXDrawable
-CreateDrawable(Display * dpy, const __GLcontextModes * fbconfig,
+CreateDrawable(Display *dpy, struct glx_config *config,
Drawable drawable, const int *attrib_list, CARD8 glxCode)
{
xGLXCreateWindowReq *req;
@@ -391,11 +391,11 @@ CreateDrawable(Display * dpy, const __GLcontextModes * fbconfig,
req->reqType = opcode;
req->glxCode = glxCode;
- req->screen = (CARD32) fbconfig->screen;
- req->fbconfig = fbconfig->fbconfigID;
- req->window = (CARD32) drawable;
- req->glxwindow = (GLXWindow) XAllocID(dpy);
- req->numAttribs = (CARD32) i;
+ req->screen = config->screen;
+ req->fbconfig = config->fbconfigID;
+ req->window = drawable;
+ req->glxwindow = XAllocID(dpy);
+ req->numAttribs = i;
if (attrib_list)
memcpy(data, attrib_list, 8 * i);
@@ -403,9 +403,9 @@ CreateDrawable(Display * dpy, const __GLcontextModes * fbconfig,
UnlockDisplay(dpy);
SyncHandle();
- CreateDRIDrawable(dpy, fbconfig, drawable, req->glxwindow, attrib_list, i);
+ CreateDRIDrawable(dpy, config, drawable, req->glxwindow, attrib_list, i);
- return (GLXDrawable) req->glxwindow;
+ return req->glxwindow;
}
@@ -457,7 +457,7 @@ DestroyDrawable(Display * dpy, GLXDrawable drawable, CARD32 glxCode)
* This function needs to be modified to work with direct-rendering drivers.
*/
static GLXDrawable
-CreatePbuffer(Display * dpy, const __GLcontextModes * fbconfig,
+CreatePbuffer(Display * dpy, struct glx_config *config,
unsigned int width, unsigned int height,
const int *attrib_list, GLboolean size_in_attribs)
{
@@ -490,10 +490,10 @@ CreatePbuffer(Display * dpy, const __GLcontextModes * fbconfig,
req->reqType = opcode;
req->glxCode = X_GLXCreatePbuffer;
- req->screen = (CARD32) fbconfig->screen;
- req->fbconfig = fbconfig->fbconfigID;
- req->pbuffer = (GLXPbuffer) id;
- req->numAttribs = (CARD32) (i + extra);
+ req->screen = config->screen;
+ req->fbconfig = config->fbconfigID;
+ req->pbuffer = id;
+ req->numAttribs = i + extra;
if (!size_in_attribs) {
data[(2 * i) + 0] = GLX_PBUFFER_WIDTH;
@@ -513,11 +513,11 @@ CreatePbuffer(Display * dpy, const __GLcontextModes * fbconfig,
vpreq->glxCode = X_GLXVendorPrivate;
vpreq->vendorCode = X_GLXvop_CreateGLXPbufferSGIX;
- data[0] = (CARD32) fbconfig->screen;
- data[1] = (CARD32) fbconfig->fbconfigID;
- data[2] = (CARD32) id;
- data[3] = (CARD32) width;
- data[4] = (CARD32) height;
+ data[0] = config->screen;
+ data[1] = config->fbconfigID;
+ data[2] = id;
+ data[3] = width;
+ data[4] = height;
data += 5;
}
@@ -526,10 +526,10 @@ CreatePbuffer(Display * dpy, const __GLcontextModes * fbconfig,
UnlockDisplay(dpy);
SyncHandle();
- pixmap = XCreatePixmap(dpy, RootWindow(dpy, fbconfig->screen),
- width, height, fbconfig->rgbBits);
+ pixmap = XCreatePixmap(dpy, RootWindow(dpy, config->screen),
+ width, height, config->rgbBits);
- CreateDRIDrawable(dpy, fbconfig, pixmap, id, attrib_list, i);
+ CreateDRIDrawable(dpy, config, pixmap, id, attrib_list, i);
return id;
}
@@ -598,7 +598,7 @@ glXCreateGLXPbufferSGIX(Display * dpy, GLXFBConfigSGIX config,
unsigned int width, unsigned int height,
int *attrib_list)
{
- return (GLXPbufferSGIX) CreatePbuffer(dpy, (__GLcontextModes *) config,
+ return (GLXPbufferSGIX) CreatePbuffer(dpy, (struct glx_config *) config,
width, height,
attrib_list, GL_FALSE);
}
@@ -674,7 +674,7 @@ glXCreatePbuffer(Display * dpy, GLXFBConfig config, const int *attrib_list)
}
}
- return (GLXPbuffer) CreatePbuffer(dpy, (__GLcontextModes *) config,
+ return (GLXPbuffer) CreatePbuffer(dpy, (struct glx_config *) config,
width, height, attrib_list, GL_TRUE);
#endif
}
@@ -836,14 +836,14 @@ glXCreatePixmap(Display * dpy, GLXFBConfig config, Pixmap pixmap,
WARN_ONCE_GLX_1_3(dpy, __func__);
#ifdef GLX_USE_APPLEGL
- const __GLcontextModes *modes = (const __GLcontextModes *) config;
+ const struct glx_config *modes = (const __GLcontextModes *) config;
if (apple_glx_pixmap_create(dpy, modes->screen, pixmap, modes))
return None;
return pixmap;
#else
- return CreateDrawable(dpy, (__GLcontextModes *) config,
+ return CreateDrawable(dpy, (struct glx_config *) config,
(Drawable) pixmap, attrib_list, X_GLXCreatePixmap);
#endif
}
@@ -878,7 +878,7 @@ glXCreateWindow(Display * dpy, GLXFBConfig config, Window win,
return win;
#else
- return CreateDrawable(dpy, (__GLcontextModes *) config,
+ return CreateDrawable(dpy, (struct glx_config *) config,
(Drawable) win, attrib_list, X_GLXCreateWindow);
#endif
}