const __GLcontextModes * const fbconfig,
GLXContext shareList,
Bool allowDirect, GLXContextID contextID,
- Bool use_glx_1_3, int renderType)
+ unsigned code, int renderType)
{
GLXContext gc;
#ifdef GLX_DIRECT_RENDERING
#endif
LockDisplay(dpy);
- if (fbconfig == NULL) {
+ switch (code) {
+ case X_GLXCreateContext: {
xGLXCreateContextReq *req;
/* Send the glXCreateContext request */
req->screen = vis->screen;
req->shareList = shareList ? shareList->xid : None;
req->isDirect = GC_IS_DIRECT(gc);
+ break;
}
- else if (use_glx_1_3) {
+
+ case X_GLXCreateNewContext: {
xGLXCreateNewContextReq *req;
/* Send the glXCreateNewContext request */
req->renderType = renderType;
req->shareList = shareList ? shareList->xid : None;
req->isDirect = GC_IS_DIRECT(gc);
+ break;
}
- else {
+
+ case X_GLXvop_CreateContextWithConfigSGIX: {
xGLXVendorPrivateWithReplyReq *vpreq;
xGLXCreateContextWithConfigSGIXReq *req;
req->renderType = renderType;
req->shareList = shareList ? shareList->xid : None;
req->isDirect = GC_IS_DIRECT(gc);
+ break;
+ }
+
+ default:
+ /* What to do here? This case is the sign of an internal error. It
+ * should never be reachable.
+ */
+ break;
}
UnlockDisplay(dpy);
GLXContext shareList, Bool allowDirect)
{
return CreateContext(dpy, vis, NULL, shareList, allowDirect, None,
- False, 0);
+ X_GLXCreateContext, 0);
}
_X_HIDDEN void
return NULL;
}
- ctx = CreateContext(dpy, NULL, NULL, NULL, False, contextID, False, 0);
+ ctx = CreateContext(dpy, NULL, NULL, NULL, False, contextID,
+ X_GLXCreateContext, 0);
if (NULL != ctx) {
if (Success != __glXQueryContextInfo(dpy, ctx)) {
return NULL;
int renderType, GLXContext shareList, Bool allowDirect)
{
return CreateContext(dpy, NULL, (__GLcontextModes *) config, shareList,
- allowDirect, None, True, renderType);
+ allowDirect, None, X_GLXCreateNewContext, renderType);
}
if ((psc != NULL)
&& __glXExtensionBitIsEnabled(psc, SGIX_fbconfig_bit)) {
gc = CreateContext(dpy, NULL, (__GLcontextModes *) config, shareList,
- allowDirect, None, False, renderType);
+ allowDirect, None,
+ X_GLXvop_CreateContextWithConfigSGIX, renderType);
}
return gc;