Lines Matching refs:dpy
58 warn_GLX_1_3(Display * dpy, const char *function_name) in warn_GLX_1_3() argument
60 struct glx_display *priv = __glXInitialize(dpy); in warn_GLX_1_3()
82 ChangeDrawableAttribute(Display * dpy, GLXDrawable drawable, in ChangeDrawableAttribute() argument
85 struct glx_display *priv = __glXInitialize(dpy); in ChangeDrawableAttribute()
93 if ((dpy == NULL) || (drawable == 0)) { in ChangeDrawableAttribute()
97 opcode = __glXSetupForCommand(dpy); in ChangeDrawableAttribute()
101 LockDisplay(dpy); in ChangeDrawableAttribute()
131 UnlockDisplay(dpy); in ChangeDrawableAttribute()
135 pdraw = GetGLXDRIDrawable(dpy, drawable); in ChangeDrawableAttribute()
191 CreateDRIDrawable(Display *dpy, struct glx_config *config, in CreateDRIDrawable() argument
195 struct glx_display *const priv = __glXInitialize(dpy); in CreateDRIDrawable()
222 DestroyDRIDrawable(Display *dpy, GLXDrawable drawable, int destroy_xdrawable) in DestroyDRIDrawable() argument
224 struct glx_display *const priv = __glXInitialize(dpy); in DestroyDRIDrawable()
225 __GLXDRIdrawable *pdraw = GetGLXDRIDrawable(dpy, drawable); in DestroyDRIDrawable()
233 XFreePixmap(priv->dpy, xid); in DestroyDRIDrawable()
240 CreateDRIDrawable(Display *dpy, const struct glx_config * fbconfig, in CreateDRIDrawable() argument
248 DestroyDRIDrawable(Display *dpy, GLXDrawable drawable, int destroy_xdrawable) in DestroyDRIDrawable() argument
270 GetDrawableAttribute(Display * dpy, GLXDrawable drawable, in GetDrawableAttribute() argument
282 if ((dpy == NULL) || (drawable == 0)) { in GetDrawableAttribute()
286 priv = __glXInitialize(dpy); in GetDrawableAttribute()
292 opcode = __glXSetupForCommand(dpy); in GetDrawableAttribute()
296 LockDisplay(dpy); in GetDrawableAttribute()
318 _XReply(dpy, (xReply *) & reply, 0, False); in GetDrawableAttribute()
321 UnlockDisplay(dpy); in GetDrawableAttribute()
332 _XEatData(dpy, length); in GetDrawableAttribute()
335 _XRead(dpy, (char *) data, length * sizeof(CARD32)); in GetDrawableAttribute()
349 __GLXDRIdrawable *pdraw = GetGLXDRIDrawable(dpy, drawable); in GetDrawableAttribute()
364 UnlockDisplay(dpy); in GetDrawableAttribute()
371 protocolDestroyDrawable(Display *dpy, GLXDrawable drawable, CARD32 glxCode) in protocolDestroyDrawable() argument
376 opcode = __glXSetupForCommand(dpy); in protocolDestroyDrawable()
380 LockDisplay(dpy); in protocolDestroyDrawable()
387 UnlockDisplay(dpy); in protocolDestroyDrawable()
395 CreateDrawable(Display *dpy, struct glx_config *config, in CreateDrawable() argument
411 opcode = __glXSetupForCommand(dpy); in CreateDrawable()
419 LockDisplay(dpy); in CreateDrawable()
428 req->glxwindow = xid = XAllocID(dpy); in CreateDrawable()
434 UnlockDisplay(dpy); in CreateDrawable()
437 if (InitGLXDrawable(dpy, glxDraw, drawable, xid)) { in CreateDrawable()
442 if (!CreateDRIDrawable(dpy, config, drawable, xid, attrib_list, i)) { in CreateDrawable()
447 protocolDestroyDrawable(dpy, xid, glxCode); in CreateDrawable()
459 DestroyDrawable(Display * dpy, GLXDrawable drawable, CARD32 glxCode) in DestroyDrawable() argument
461 if ((dpy == NULL) || (drawable == 0)) { in DestroyDrawable()
465 protocolDestroyDrawable(dpy, drawable, glxCode); in DestroyDrawable()
467 DestroyGLXDrawable(dpy, drawable); in DestroyDrawable()
468 DestroyDRIDrawable(dpy, drawable, GL_FALSE); in DestroyDrawable()
485 CreatePbuffer(Display * dpy, struct glx_config *config, in CreatePbuffer() argument
489 struct glx_display *priv = __glXInitialize(dpy); in CreatePbuffer()
503 opcode = __glXSetupForCommand(dpy); in CreatePbuffer()
507 LockDisplay(dpy); in CreatePbuffer()
508 id = XAllocID(dpy); in CreatePbuffer()
554 UnlockDisplay(dpy); in CreatePbuffer()
557 pixmap = XCreatePixmap(dpy, RootWindow(dpy, config->screen), in CreatePbuffer()
560 if (!CreateDRIDrawable(dpy, config, pixmap, id, attrib_list, i)) { in CreatePbuffer()
562 XFreePixmap(dpy, pixmap); in CreatePbuffer()
563 protocolDestroyDrawable(dpy, id, o); in CreatePbuffer()
581 DestroyPbuffer(Display * dpy, GLXDrawable drawable) in DestroyPbuffer() argument
583 struct glx_display *priv = __glXInitialize(dpy); in DestroyPbuffer()
586 if ((dpy == NULL) || (drawable == 0)) { in DestroyPbuffer()
590 opcode = __glXSetupForCommand(dpy); in DestroyPbuffer()
594 LockDisplay(dpy); in DestroyPbuffer()
618 UnlockDisplay(dpy); in DestroyPbuffer()
621 DestroyDRIDrawable(dpy, drawable, GL_TRUE); in DestroyPbuffer()
630 glXCreateGLXPbufferSGIX(Display * dpy, GLXFBConfigSGIX config, in glXCreateGLXPbufferSGIX() argument
634 return (GLXPbufferSGIX) CreatePbuffer(dpy, (struct glx_config *) config, in glXCreateGLXPbufferSGIX()
645 glXCreatePbuffer(Display * dpy, GLXFBConfig config, const int *attrib_list) in glXCreatePbuffer() argument
656 WARN_ONCE_GLX_1_3(dpy, __func__); in glXCreatePbuffer()
686 if (apple_glx_pbuffer_create(dpy, config, width, height, &errorcode, in glXCreatePbuffer()
692 __glXSendError(dpy, errorcode, 0, X_GLXCreatePbuffer, true); in glXCreatePbuffer()
710 return (GLXPbuffer) CreatePbuffer(dpy, (struct glx_config *) config, in glXCreatePbuffer()
720 glXDestroyPbuffer(Display * dpy, GLXPbuffer pbuf) in glXDestroyPbuffer() argument
723 if (apple_glx_pbuffer_destroy(dpy, pbuf)) { in glXDestroyPbuffer()
724 __glXSendError(dpy, GLXBadPbuffer, pbuf, X_GLXDestroyPbuffer, false); in glXDestroyPbuffer()
727 DestroyPbuffer(dpy, pbuf); in glXDestroyPbuffer()
736 glXQueryDrawable(Display * dpy, GLXDrawable drawable, in glXQueryDrawable() argument
739 WARN_ONCE_GLX_1_3(dpy, __func__); in glXQueryDrawable()
763 (dpy, drawable, &root, &x, &y, &width, &height, &bd, &depth)) { in glXQueryDrawable()
775 GetDrawableAttribute(dpy, drawable, attribute, value); in glXQueryDrawable()
785 glXQueryGLXPbufferSGIX(Display * dpy, GLXPbufferSGIX drawable, in glXQueryGLXPbufferSGIX() argument
788 return GetDrawableAttribute(dpy, drawable, attribute, value); in glXQueryGLXPbufferSGIX()
796 glXSelectEvent(Display * dpy, GLXDrawable drawable, unsigned long mask) in glXSelectEvent() argument
808 if (XGetWindowAttributes(dpy, drawable, &xwattr)) in glXSelectEvent()
812 __glXSendError(dpy, GLXBadDrawable, drawable, in glXSelectEvent()
820 ChangeDrawableAttribute(dpy, drawable, attribs, 1); in glXSelectEvent()
829 glXGetSelectedEvent(Display * dpy, GLXDrawable drawable, unsigned long *mask) in glXGetSelectedEvent() argument
841 if (XGetWindowAttributes(dpy, drawable, &xwattr)) { in glXGetSelectedEvent()
848 __glXSendError(dpy, GLXBadDrawable, drawable, X_GLXGetDrawableAttributes, in glXGetSelectedEvent()
859 GetDrawableAttribute(dpy, drawable, GLX_EVENT_MASK_SGIX, &value); in glXGetSelectedEvent()
866 glXCreatePixmap(Display * dpy, GLXFBConfig config, Pixmap pixmap, in glXCreatePixmap() argument
869 WARN_ONCE_GLX_1_3(dpy, __func__); in glXCreatePixmap()
874 if (apple_glx_pixmap_create(dpy, modes->screen, pixmap, modes)) in glXCreatePixmap()
879 return CreateDrawable(dpy, (struct glx_config *) config, in glXCreatePixmap()
886 glXCreateWindow(Display * dpy, GLXFBConfig config, Window win, in glXCreateWindow() argument
889 WARN_ONCE_GLX_1_3(dpy, __func__); in glXCreateWindow()
896 XGetWindowAttributes(dpy, win, &xwattr); in glXCreateWindow()
898 visinfo = glXGetVisualFromFBConfig(dpy, config); in glXCreateWindow()
901 __glXSendError(dpy, GLXBadFBConfig, 0, X_GLXCreateWindow, false); in glXCreateWindow()
906 __glXSendError(dpy, BadMatch, 0, X_GLXCreateWindow, true); in glXCreateWindow()
914 return CreateDrawable(dpy, (struct glx_config *) config, in glXCreateWindow()
921 glXDestroyPixmap(Display * dpy, GLXPixmap pixmap) in glXDestroyPixmap() argument
923 WARN_ONCE_GLX_1_3(dpy, __func__); in glXDestroyPixmap()
925 if (apple_glx_pixmap_destroy(dpy, pixmap)) in glXDestroyPixmap()
926 __glXSendError(dpy, GLXBadPixmap, pixmap, X_GLXDestroyPixmap, false); in glXDestroyPixmap()
928 DestroyDrawable(dpy, (GLXDrawable) pixmap, X_GLXDestroyPixmap); in glXDestroyPixmap()
934 glXDestroyWindow(Display * dpy, GLXWindow win) in glXDestroyWindow() argument
936 WARN_ONCE_GLX_1_3(dpy, __func__); in glXDestroyWindow()
938 DestroyDrawable(dpy, (GLXDrawable) win, X_GLXDestroyWindow); in glXDestroyWindow()
945 (Display * dpy, GLXPbufferSGIX pbuf),
946 (dpy, pbuf), glXDestroyPbuffer)
950 (Display * dpy, GLXDrawable drawable,
951 unsigned long mask), (dpy, drawable, mask), glXSelectEvent)
955 (Display * dpy, GLXDrawable drawable,
956 unsigned long *mask), (dpy, drawable, mask),