Lines Matching refs:gc

258 glx_context_init(struct glx_context *gc,
261 gc->majorOpcode = __glXSetupForCommand(psc->display->dpy);
262 if (!gc->majorOpcode)
265 gc->screen = psc->scr;
266 gc->psc = psc;
267 gc->config = config;
268 gc->isDirect = GL_TRUE;
269 gc->currentContextTag = -1;
272 gc->renderType = GLX_DONT_CARE;
323 struct glx_context *gc;
344 gc = NULL;
346 gc = applegl_create_context(psc, config, shareList, renderType);
349 gc = psc->vtable->create_context(psc, config, shareList, renderType);
350 if (!gc)
351 gc = indirect_create_context(psc, config, shareList, renderType);
353 if (!gc)
363 req->reqType = gc->majorOpcode;
365 req->context = gc->xid = XAllocID(dpy);
369 req->isDirect = gc->isDirect;
378 req->reqType = gc->majorOpcode;
380 req->context = gc->xid = XAllocID(dpy);
385 req->isDirect = gc->isDirect;
398 req->reqType = gc->majorOpcode;
401 req->context = gc->xid = XAllocID(dpy);
406 req->isDirect = gc->isDirect;
420 gc->share_xid = shareList ? shareList->xid : None;
421 gc->imported = GL_FALSE;
430 int isDirect = __glXIsDirect(dpy, gc->xid, &error);
432 if (error != False || isDirect != gc->isDirect) {
433 gc->vtable->destroy(gc);
434 gc = NULL;
438 return (GLXContext) gc;
500 struct glx_context *gc = (struct glx_context *) ctx;
502 if (gc == NULL || gc->xid == None)
506 if (!gc->imported)
507 glx_send_destroy_context(dpy, gc->xid);
509 if (gc->currentDpy) {
512 * Note that we set gc->xid = None above. In MakeContextCurrent()
515 gc->xid = None;
517 gc->vtable->destroy(gc);
568 struct glx_context *gc = __glXGetCurrentContext();
570 if (gc->vtable->wait_gl)
571 gc->vtable->wait_gl(gc);
581 struct glx_context *gc = __glXGetCurrentContext();
583 if (gc->vtable->wait_x)
584 gc->vtable->wait_x(gc);
590 struct glx_context *gc = __glXGetCurrentContext();
592 Display *dpy = gc->currentDpy;
595 if (gc->isDirect) {
596 DRI_glXUseXFont(gc, font, first, count, listBase);
602 __glXFlushRenderBuffer(gc, gc->pc);
607 req->reqType = gc->majorOpcode;
609 req->contextTag = gc->currentContextTag;
631 struct glx_context *gc = __glXGetCurrentContext();
635 if(apple_glx_copy_context(gc->driContext, source->driContext, dest->driContext,
642 struct glx_context *gc = __glXGetCurrentContext();
652 if (gc->isDirect) {
661 if (source == gc && dpy == gc->currentDpy) {
662 tag = gc->currentContextTag;
686 struct glx_context *gc = (struct glx_context *) gc_user;
689 return gc ? gc->isDirect : False;
836 struct glx_context * gc = __glXGetCurrentContext();
837 if(gc != &dummyContext && apple_glx_is_current_drawable(dpy, gc->driContext, drawable)) {
838 apple_glx_swap_buffers(gc->driContext);
843 struct glx_context *gc;
848 gc = __glXGetCurrentContext();
855 Bool flush = gc != &dummyContext && drawable == gc->currentDrawable;
873 if ((gc != &dummyContext) && (dpy == gc->currentDpy) &&
874 ((drawable == gc->currentDrawable)
875 || (drawable == gc->currentReadable))) {
876 tag = gc->currentContextTag;
1399 struct glx_context *gc = __glXGetCurrentContext();
1400 if (gc == &dummyContext)
1402 return gc->currentDpy;
1573 struct glx_context *gc = (struct glx_context *) ctx;
1575 if (gc == NULL || gc->xid == None)
1587 if (gc->currentDpy) {
1588 gc->xid = None;
1590 gc->vtable->destroy(gc);
1655 struct glx_context *gc = __glXGetCurrentContext();
1657 return gc->currentReadable;
1740 struct glx_context *gc = __glXGetCurrentContext();
1742 struct glx_screen *psc = gc->psc;
1748 if (gc == &dummyContext) {
1757 if (gc->isDirect && psc && psc->driScreen &&
1760 GetGLXDRIDrawable(gc->currentDpy, gc->currentDrawable);
1770 dpy = gc->currentDpy;
1782 req->contextTag = gc->currentContextTag;
1802 struct glx_context *gc = __glXGetCurrentContext();
1807 if (gc != &dummyContext && gc->isDirect) {
1808 struct glx_screen *psc = gc->psc;
1811 GetGLXDRIDrawable(gc->currentDpy, gc->currentDrawable);
1832 struct glx_context *gc = __glXGetCurrentContext();
1834 if (gc != &dummyContext && gc->isDirect) {
1835 struct glx_screen *psc = gc->psc;
1838 GetGLXDRIDrawable(gc->currentDpy, gc->currentDrawable);
1887 struct glx_context *gc = __glXGetCurrentContext();
1888 struct glx_screen *psc = gc->psc;
1891 if (gc == &dummyContext)
1894 if (!gc->isDirect)
1897 if (!gc->currentDrawable)
1900 pdraw = GetGLXDRIDrawable(gc->currentDpy, gc->currentDrawable);
1919 struct glx_context *gc = __glXGetCurrentContext();
1921 struct glx_screen *psc = gc->psc;
1930 if (gc == &dummyContext)
1934 if (!gc->isDirect)
1937 if (!gc->currentDrawable)
1940 pdraw = GetGLXDRIDrawable(gc->currentDpy, gc->currentDrawable);
2033 GLXContext gc = NULL;
2045 gc = CreateContext(dpy, config->fbconfigID, config, shareList,
2050 return gc;
2199 struct glx_context *gc = __glXGetCurrentContext();
2205 if (gc == &dummyContext) /* no GLX for this */
2209 if (!pdraw || !gc->isDirect)
2356 struct glx_context *gc;
2382 gc = __glXGetCurrentContext();
2383 if ((gc != &dummyContext) && (dpy == gc->currentDpy) &&
2384 ((drawable == gc->currentDrawable) ||
2385 (drawable == gc->currentReadable))) {
2386 tag = gc->currentContextTag;
2421 struct glx_context *gc = __glXGetCurrentContext();
2454 req->contextTag = gc->currentContextTag;
2482 struct glx_context *gc = __glXGetCurrentContext();
2507 req->contextTag = gc->currentContextTag;
2740 struct glx_context *gc = (struct glx_context*)context;
2745 if (!gc || gc->xid == None || !gc->isDirect) {
2750 if (!gc->vtable->interop_query_device_info) {
2755 ret = gc->vtable->interop_query_device_info(gc, out);
2765 struct glx_context *gc = (struct glx_context*)context;
2770 if (!gc || gc->xid == None || !gc->isDirect) {
2775 if (!gc->vtable->interop_export_object) {
2780 ret = gc->vtable->interop_export_object(gc, in, out);