Lines Matching defs:glxc
98 __GLXcontext *glxc, *shareglxc;
145 glxc = calloc(1, sizeof(__GLXcontext));
146 if (!glxc) {
154 glxc->pFBConfig = glxLookupFBConfig( fbconfigId );
155 if (!glxc->pFBConfig) {
157 free( glxc );
160 visual = glxc->pFBConfig->associatedVisualId;
163 glxc->pFBConfig = NULL;
178 free( glxc );
193 free( glxc );
197 if ( glxc->pFBConfig == NULL ) {
198 glxc->pFBConfig = glxLookupFBConfigByVID( visual );
200 if ( glxc->pFBConfig == NULL ) {
204 free( glxc );
215 glxc->pScreen = pScreen;
216 glxc->pGlxScreen = pGlxScreen;
217 glxc->pVisual = pVisual;
218 glxc->pGlxVisual = pGlxVisual;
224 glxc->real_ids = (XID *)malloc(sizeof(XID) * num_be_screens);
225 if (!glxc->real_ids) {
228 glxc->real_vids = (XID *)malloc(sizeof(XID) * num_be_screens);
229 if (!glxc->real_vids) {
239 if (glxc->pFBConfig) {
240 __GLXFBConfig *beFBConfig = glxLookupBackEndFBConfig( glxc->pFBConfig->id,
253 free( glxc->real_ids );
254 free( glxc->real_vids );
255 free( glxc );
260 glxc->real_ids[screen-from_screen] = XAllocID(GetBackEndDisplay(cl,screen));
264 if (glxc->pFBConfig) {
270 int renderType = glxc->pFBConfig->renderType;
291 be_new_req->context = (unsigned int)glxc->real_ids[screen-from_screen];
299 glxc->real_vids[screen-from_screen] = be_fbconfigId;
314 ext_req->context = (unsigned int)glxc->real_ids[screen-from_screen];
321 glxc->real_vids[screen-from_screen] = be_fbconfigId;
331 be_req->context = (unsigned int)glxc->real_ids[screen-from_screen];
337 glxc->real_vids[screen-from_screen] = be_vid;
346 if (!AddResource(gcId, __glXContextRes, (pointer)glxc)) {
347 free( glxc->real_ids );
348 free( glxc->real_vids );
349 free( glxc );
358 glxc->id = gcId;
359 glxc->share_id = shareList;
360 glxc->idExists = GL_TRUE;
361 glxc->isCurrent = GL_FALSE;
508 __GLXcontext *glxc;
513 dixLookupResourceByType((pointer*) &glxc, gcId, __glXContextRes,
515 if (glxc) {
524 from_screen = to_screen = glxc->pScreen->myNum;
549 be_req->context = glxc->real_ids[s-from_screen];
568 static int AddCurrentContext(__GLXclientState *cl, __GLXcontext *glxc, DrawablePtr pDraw)
574 if (!glxc) return -1;
581 table[i] = glxc;
601 table[num] = glxc;
615 static void ChangeCurrentContext(__GLXclientState *cl, __GLXcontext *glxc,
619 table[tag-1] = glxc;
676 static void StopUsingContext(__GLXcontext *glxc)
678 if (glxc) {
679 if (glxc == __glXLastContext) {
683 glxc->isCurrent = GL_FALSE;
684 if (!glxc->idExists) {
685 __glXFreeContext(glxc);
690 static void StartUsingContext(__GLXclientState *cl, __GLXcontext *glxc)
692 glxc->isCurrent = GL_TRUE;
718 __GLXcontext *glxc, *prevglxc;
761 dixLookupResourceByType((pointer*) &glxc, contextId, __glXContextRes,
763 if (!glxc) {
767 if ((glxc != prevglxc) && glxc->isCurrent) {
773 glxc = 0;
787 new_reply.writeVid = (glxc->pFBConfig ? glxc->pFBConfig->id : vid);
793 if ((vid != glxc->pVisual->vid) ||
794 (pWin->drawable.pScreen != glxc->pScreen)) {
819 if (pGlxPixmap->pScreen != glxc->pScreen ||
820 pGlxPixmap->pGlxVisual != glxc->pGlxVisual) {
826 new_reply.writeVid = (glxc->pFBConfig ? glxc->pFBConfig->id :
846 if (pGlxWindow->pScreen != glxc->pScreen ||
847 pGlxWindow->pGlxFBConfig != glxc->pFBConfig) {
864 if (pGlxPbuffer->pScreen != glxc->pScreen ||
865 pGlxPbuffer->pFBConfig != glxc->pFBConfig) {
899 new_reply.readVid = (glxc->pFBConfig ? glxc->pFBConfig->id : vid);
905 if ((vid != glxc->pVisual->vid) ||
906 (pReadWin->drawable.pScreen != glxc->pScreen)) {
930 if (pReadGlxPixmap->pScreen != glxc->pScreen ||
931 pReadGlxPixmap->pGlxVisual != glxc->pGlxVisual) {
937 new_reply.readVid = (glxc->pFBConfig ? glxc->pFBConfig->id :
954 if (pGlxReadWindow->pScreen != glxc->pScreen ||
955 pGlxReadWindow->pGlxFBConfig != glxc->pFBConfig) {
971 if (pGlxReadPbuffer->pScreen != glxc->pScreen ||
972 pGlxReadPbuffer->pFBConfig != glxc->pFBConfig) {
1055 ChangeCurrentContext(cl, glxc, tag);
1056 ChangeCurrentContext(cl, glxc, tag);
1059 tag = AddCurrentContext(cl, glxc, pDraw);
1061 if (glxc) {
1063 glxc->pGlxPixmap = pGlxPixmap;
1064 glxc->pGlxReadPixmap = pReadGlxPixmap;
1065 glxc->pGlxWindow = pGlxWindow;
1066 glxc->pGlxReadWindow = pGlxReadWindow;
1067 glxc->pGlxPbuffer = pGlxPbuffer;
1068 glxc->pGlxReadPbuffer = pGlxReadPbuffer;
1094 StartUsingContext(cl, glxc);
1175 be_req->context = (unsigned int)(glxc ? glxc->real_ids[s-from_screen] : 0);
1227 be_new_req->context = (unsigned int)(glxc ? glxc->real_ids[s-from_screen] : 0);
1257 ext_req->context = (unsigned int)(glxc ? glxc->real_ids[s-from_screen] : 0);
1319 __GLXcontext *glxc;
1324 dixLookupResourceByType((pointer*) &glxc, req->context, __glXContextRes,
1326 if (!glxc) {
1377 __GLXcontext *glxc = NULL;
1380 glxc = __glXLookupContextByTag(cl, req->contextTag);
1381 if (glxc) {
1382 from_screen = to_screen = glxc->pScreen->myNum;
1401 be_req->contextTag = (glxc ? GetCurrentBackEndTag(cl,req->contextTag,s) : 0);
1418 __GLXcontext *glxc = NULL;
1421 glxc = __glXLookupContextByTag(cl, req->contextTag);
1422 if (glxc) {
1423 from_screen = to_screen = glxc->pScreen->myNum;
1444 be_req->contextTag = (glxc ? GetCurrentBackEndTag(cl,req->contextTag,s) : 0);
1949 __GLXcontext *glxc = NULL;
2012 glxc = __glXLookupContextByTag(cl, tag);
2013 if (!glxc) {
2110 __GLXcontext *glxc = NULL;
2159 glxc = __glXLookupContextByTag(cl, tag);
2160 if (!glxc) {
2190 __GLXcontext *glxc;
2203 glxc = __glXLookupContextByTag(cl, req->contextTag);
2204 if (!glxc) {
2207 from_screen = to_screen = glxc->pScreen->myNum;
2247 __GLXcontext *glxc;
2259 glxc = __glXLookupContextByTag(cl, req->contextTag);
2260 if (!glxc) {
2263 from_screen = to_screen = glxc->pScreen->myNum;
2629 __GLXcontext *glxc = NULL;
2640 glxc = __glXLookupContextByTag(cl, req->contextTag);
2641 if (glxc) {
2642 from_screen = to_screen = glxc->pScreen->myNum;
2684 be_req->contextTag = (glxc ? GetCurrentBackEndTag(cl,req->contextTag,s) : 0);
3590 __GLXcontext *glxc;
3599 glxc = __glXLookupContextByTag(cl, contextTag);
3600 if (!glxc) {
3604 from_screen = to_screen = glxc->pScreen->myNum;