Lines Matching refs:cx
112 static int ContextGone(__GLXcontext* cx, XID id)
114 cx->idExists = GL_FALSE;
115 if (!cx->isCurrent) {
116 __glXFreeContext(cx);
127 __GLXcontext *cx;
136 cx = cl->currentContexts[i];
137 if (cx) {
138 cx->isCurrent = GL_FALSE;
139 if (!cx->idExists) {
140 __glXFreeContext(cx);
225 GLboolean __glXFreeContext(__GLXcontext *cx)
227 if (cx->idExists || cx->isCurrent) return GL_FALSE;
229 free(cx->feedbackBuf);
230 free(cx->selectBuf);
231 free(cx->real_ids);
232 free(cx->real_vids);
234 if (cx->pGlxPixmap) {
238 cx->pGlxPixmap->refcnt--;
239 __glXFreeGLXPixmap( cx->pGlxPixmap );
240 cx->pGlxPixmap = 0;
243 if (cx->pGlxReadPixmap) {
247 cx->pGlxReadPixmap->refcnt--;
248 __glXFreeGLXPixmap( cx->pGlxReadPixmap );
249 cx->pGlxReadPixmap = 0;
252 if (cx->pGlxWindow) {
256 cx->pGlxWindow->refcnt--;
257 __glXFreeGLXWindow( cx->pGlxWindow );
258 cx->pGlxWindow = 0;
261 if (cx->pGlxReadWindow) {
265 cx->pGlxReadWindow->refcnt--;
266 __glXFreeGLXWindow( cx->pGlxReadWindow );
267 cx->pGlxReadWindow = 0;
270 free(cx);
272 if (cx == __glXLastContext) {