&dummy_err);
}
- if (gc == NULL)
- gc = indirect_create_context(psc, cfg, share, 0);
+ if (gc == NULL) {
+#ifdef GLX_USE_APPLEGL
+ gc = applegl_create_context(psc, cfg, share, 0);
+#else
+ gc = indirect_create_context_attribs(psc, cfg, share, num_attribs,
+ (const uint32_t *) attrib_list,
+ &dummy_err);
+#endif
+ }
gc->xid = xcb_generate_id(c);
gc->share_xid = (share != NULL) ? share->xid : 0;
* the protocol error and handle it. Part of handling the error is freeing
* the possibly non-NULL value returned by this function.
*/
-#ifdef XCB_GLX_CREATE_CONTEXT_ATTRIBS_ARB
cookie =
xcb_glx_create_context_attribs_arb_checked(c,
gc->xid,
(const uint32_t *)
attrib_list);
err = xcb_request_check(c, cookie);
-#else
- /* This is a hugely ugly hack to make things compile on systems that lack
- * the proper XCB version.
- */
- memset(&cookie, 0, sizeof(cookie));
-
- err = calloc(1, sizeof(*err));
- err->error_code = BadRequest;
- err->sequence = dpy->request;
- err->resource_id = gc->xid;
- err->minor_code = gc->majorOpcode;
- err->major_code = 34;
-#endif
if (err != NULL) {
gc->vtable->destroy(gc);
gc = NULL;