Lines Matching refs:cx
67 static GLboolean __glXFreeContext(__GLXcontext * cx);
73 * and cx here will be NULL. Otherwise we really free the context.
76 ContextGone(__GLXcontext * cx, XID id)
78 if (!cx)
81 if (!cx->currentClient)
82 __glXFreeContext(cx);
137 __glXAddContext(__GLXcontext * cx)
141 if (!AddResource(cx->id, __glXContextRes, (void *)cx)) {
145 cx->next = glxAllContexts;
146 glxAllContexts = cx;
151 __glXRemoveFromContextList(__GLXcontext * cx)
155 if (cx == glxAllContexts)
156 glxAllContexts = cx->next;
160 if (c == cx)
171 __glXFreeContext(__GLXcontext * cx)
173 if (cx->idExists || cx->currentClient)
176 __glXRemoveFromContextList(cx);
178 free(cx->feedbackBuf);
179 free(cx->selectBuf);
180 free(cx->largeCmdBuf);
181 if (cx == lastGLContext) {
190 cx->destroy(cx);
193 cx->next = glxPendingDestroyContexts;
194 glxPendingDestroyContexts = cx;
589 __GLXcontext *cx;
595 cx = __glXLookupContextByTag(cl, tag);
596 if (!cx) {
603 if (cx->largeCmdRequestsSoFar != 0 && stuff->glxCode != X_GLXRenderLarge) {
609 if (!cx->isDirect) {
610 if (cx->drawPriv == NULL) {
621 if (cx->wait && (*cx->wait) (cx, cl, error))
624 if (cx == lastGLContext) {
626 return cx;
630 if (!cx->isDirect) {
636 (*cx->loseCurrent) (cx);
637 lastGLContext = cx;
638 if (!(*cx->makeCurrent) (cx)) {
641 cl->client->errorValue = cx->id;
646 return cx;
667 __GLXcontext *cx, *next;
677 for (cx = glxPendingDestroyContexts; cx != NULL; cx = next) {
678 next = cx->next;
680 cx->destroy(cx);