2 * (C) Copyright IBM Corporation 2004
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the "Software"),
7 * to deal in the Software without restriction, including without limitation
8 * on the rights to use, copy, modify, merge, publish, distribute, sub
9 * license, and/or sell copies of the Software, and to permit persons to whom
10 * the Software is furnished to do so, subject to the following conditions:
12 * The above copyright notice and this permission notice (including the next
13 * paragraph) shall be included in all copies or substantial portions of the
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
19 * IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
27 * Implementation of pbuffer related functions.
29 * \author Ian Romanick <idr@us.ibm.com>
33 #include "glxclient.h"
34 #include <X11/extensions/extutil.h>
35 #include <X11/extensions/Xext.h>
38 #include "glxextensions.h"
40 #ifdef GLX_USE_APPLEGL
42 #include "apple_glx_drawable.h"
43 #include "glx_error.h"
46 #define WARN_ONCE_GLX_1_3(a, b) { \
47 static int warned=1; \
49 warn_GLX_1_3((a), b ); \
55 * Emit a warning when clients use GLX 1.3 functions on pre-1.3 systems.
58 warn_GLX_1_3(Display
* dpy
, const char *function_name
)
60 __GLXdisplayPrivate
*priv
= __glXInitialize(dpy
);
62 if (priv
->minorVersion
< 3) {
64 "WARNING: Application calling GLX 1.3 function \"%s\" "
65 "when GLX 1.3 is not supported! This is an application bug!\n",
70 #ifndef GLX_USE_APPLEGL
72 * Change a drawable's attribute.
74 * This function is used to implement \c glXSelectEvent and
75 * \c glXSelectEventSGIX.
78 * This function dynamically determines whether to use the SGIX_pbuffer
79 * version of the protocol or the GLX 1.3 version of the protocol.
82 * This function needs to be modified to work with direct-rendering drivers.
85 ChangeDrawableAttribute(Display
* dpy
, GLXDrawable drawable
,
86 const CARD32
* attribs
, size_t num_attribs
)
88 __GLXdisplayPrivate
*priv
= __glXInitialize(dpy
);
92 if ((dpy
== NULL
) || (drawable
== 0)) {
96 opcode
= __glXSetupForCommand(dpy
);
102 if ((priv
->majorVersion
> 1) || (priv
->minorVersion
>= 3)) {
103 xGLXChangeDrawableAttributesReq
*req
;
105 GetReqExtra(GLXChangeDrawableAttributes
, 8 + (8 * num_attribs
), req
);
106 output
= (CARD32
*) (req
+ 1);
108 req
->reqType
= opcode
;
109 req
->glxCode
= X_GLXChangeDrawableAttributes
;
110 req
->drawable
= drawable
;
111 req
->numAttribs
= (CARD32
) num_attribs
;
114 xGLXVendorPrivateWithReplyReq
*vpreq
;
116 GetReqExtra(GLXVendorPrivateWithReply
, 4 + (8 * num_attribs
), vpreq
);
117 output
= (CARD32
*) (vpreq
+ 1);
119 vpreq
->reqType
= opcode
;
120 vpreq
->glxCode
= X_GLXVendorPrivateWithReply
;
121 vpreq
->vendorCode
= X_GLXvop_ChangeDrawableAttributesSGIX
;
123 output
[0] = (CARD32
) drawable
;
127 (void) memcpy(output
, attribs
, sizeof(CARD32
) * 2 * num_attribs
);
136 #ifdef GLX_DIRECT_RENDERING
138 determineTextureTarget(const int *attribs
, int numAttribs
)
143 for (i
= 0; i
< numAttribs
; i
++) {
144 if (attribs
[2 * i
] == GLX_TEXTURE_TARGET_EXT
) {
145 switch (attribs
[2 * i
+ 1]) {
146 case GLX_TEXTURE_2D_EXT
:
147 target
= GL_TEXTURE_2D
;
149 case GLX_TEXTURE_RECTANGLE_EXT
:
150 target
= GL_TEXTURE_RECTANGLE_ARB
;
160 determineTextureFormat(const int *attribs
, int numAttribs
)
164 for (i
= 0; i
< numAttribs
; i
++) {
165 if (attribs
[2 * i
] == GLX_TEXTURE_FORMAT_EXT
)
166 return attribs
[2 * i
+ 1];
173 CreateDRIDrawable(Display
*dpy
, const __GLcontextModes
*fbconfig
,
174 XID drawable
, XID glxdrawable
,
175 const int *attrib_list
, size_t num_attribs
)
177 __GLXdisplayPrivate
*const priv
= __glXInitialize(dpy
);
178 __GLXDRIdrawable
*pdraw
;
179 __GLXscreenConfigs
*psc
;
181 psc
= &priv
->screenConfigs
[fbconfig
->screen
];
182 if (psc
->driScreen
== NULL
)
185 pdraw
= psc
->driScreen
->createDrawable(psc
, drawable
,
186 glxdrawable
, fbconfig
);
188 fprintf(stderr
, "failed to create drawable\n");
192 if (__glxHashInsert(psc
->drawHash
, glxdrawable
, pdraw
)) {
193 (*pdraw
->destroyDrawable
) (pdraw
);
194 return; /* FIXME: Check what we're supposed to do here... */
197 pdraw
->textureTarget
= determineTextureTarget(attrib_list
, num_attribs
);
198 pdraw
->textureFormat
= determineTextureFormat(attrib_list
, num_attribs
);
202 DestroyDRIDrawable(Display
*dpy
, GLXDrawable drawable
, int destroy_xdrawable
)
205 __GLXdisplayPrivate
*const priv
= __glXInitialize(dpy
);
206 __GLXDRIdrawable
*pdraw
= GetGLXDRIDrawable(dpy
, drawable
, &screen
);
207 __GLXscreenConfigs
*psc
= &priv
->screenConfigs
[screen
];
210 if (destroy_xdrawable
)
211 XFreePixmap(psc
->dpy
, pdraw
->xDrawable
);
212 (*pdraw
->destroyDrawable
) (pdraw
);
213 __glxHashDelete(psc
->drawHash
, drawable
);
220 CreateDRIDrawable(Display
*dpy
, const __GLcontextModes
* fbconfig
,
221 XID drawable
, XID glxdrawable
,
222 const int *attrib_list
, size_t num_attribs
)
227 DestroyDRIDrawable(Display
*dpy
, GLXDrawable drawable
, int destroy_xdrawable
)
234 * Get a drawable's attribute.
236 * This function is used to implement \c glXGetSelectedEvent and
237 * \c glXGetSelectedEventSGIX.
240 * This function dynamically determines whether to use the SGIX_pbuffer
241 * version of the protocol or the GLX 1.3 version of the protocol.
244 * The number of attributes returned is likely to be small, probably less than
245 * 10. Given that, this routine should try to use an array on the stack to
246 * capture the reply rather than always calling Xmalloc.
249 * This function needs to be modified to work with direct-rendering drivers.
252 GetDrawableAttribute(Display
* dpy
, GLXDrawable drawable
,
253 int attribute
, unsigned int *value
)
255 __GLXdisplayPrivate
*priv
;
256 xGLXGetDrawableAttributesReply reply
;
261 unsigned int num_attributes
;
262 GLboolean use_glx_1_3
;
264 if ((dpy
== NULL
) || (drawable
== 0)) {
268 priv
= __glXInitialize(dpy
);
269 use_glx_1_3
= ((priv
->majorVersion
> 1) || (priv
->minorVersion
>= 3));
274 opcode
= __glXSetupForCommand(dpy
);
281 xGLXGetDrawableAttributesReq
*req
;
283 GetReqExtra(GLXGetDrawableAttributes
, 4, req
);
284 req
->reqType
= opcode
;
285 req
->glxCode
= X_GLXGetDrawableAttributes
;
286 req
->drawable
= drawable
;
289 xGLXVendorPrivateWithReplyReq
*vpreq
;
291 GetReqExtra(GLXVendorPrivateWithReply
, 4, vpreq
);
292 data
= (CARD32
*) (vpreq
+ 1);
293 data
[0] = (CARD32
) drawable
;
295 vpreq
->reqType
= opcode
;
296 vpreq
->glxCode
= X_GLXVendorPrivateWithReply
;
297 vpreq
->vendorCode
= X_GLXvop_GetDrawableAttributesSGIX
;
300 _XReply(dpy
, (xReply
*) & reply
, 0, False
);
302 if (reply
.type
== X_Error
) {
308 length
= reply
.length
;
310 num_attributes
= (use_glx_1_3
) ? reply
.numAttribs
: length
/ 2;
311 data
= (CARD32
*) Xmalloc(length
* sizeof(CARD32
));
313 /* Throw data on the floor */
314 _XEatData(dpy
, length
);
317 _XRead(dpy
, (char *) data
, length
* sizeof(CARD32
));
319 /* Search the set of returned attributes for the attribute requested by
322 for (i
= 0; i
< num_attributes
; i
++) {
323 if (data
[i
* 2] == attribute
) {
324 *value
= data
[(i
* 2) + 1];
329 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
331 __GLXDRIdrawable
*pdraw
= GetGLXDRIDrawable(dpy
, drawable
, NULL
);
333 if (pdraw
!= NULL
&& !pdraw
->textureTarget
)
334 pdraw
->textureTarget
=
335 determineTextureTarget((const int *) data
, num_attributes
);
336 if (pdraw
!= NULL
&& !pdraw
->textureFormat
)
337 pdraw
->textureFormat
=
338 determineTextureFormat((const int *) data
, num_attributes
);
353 * Create a non-pbuffer GLX drawable.
356 * This function needs to be modified to work with direct-rendering drivers.
359 CreateDrawable(Display
* dpy
, const __GLcontextModes
* fbconfig
,
360 Drawable drawable
, const int *attrib_list
, CARD8 glxCode
)
362 xGLXCreateWindowReq
*req
;
369 while (attrib_list
[i
* 2] != None
)
373 opcode
= __glXSetupForCommand(dpy
);
378 GetReqExtra(GLXCreateWindow
, 8 * i
, req
);
379 data
= (CARD32
*) (req
+ 1);
381 req
->reqType
= opcode
;
382 req
->glxCode
= glxCode
;
383 req
->screen
= (CARD32
) fbconfig
->screen
;
384 req
->fbconfig
= fbconfig
->fbconfigID
;
385 req
->window
= (CARD32
) drawable
;
386 req
->glxwindow
= (GLXWindow
) XAllocID(dpy
);
387 req
->numAttribs
= (CARD32
) i
;
390 memcpy(data
, attrib_list
, 8 * i
);
395 CreateDRIDrawable(dpy
, fbconfig
, drawable
, req
->glxwindow
, attrib_list
, i
);
397 return (GLXDrawable
) req
->glxwindow
;
402 * Destroy a non-pbuffer GLX drawable.
405 DestroyDrawable(Display
* dpy
, GLXDrawable drawable
, CARD32 glxCode
)
407 xGLXDestroyPbufferReq
*req
;
410 if ((dpy
== NULL
) || (drawable
== 0)) {
415 opcode
= __glXSetupForCommand(dpy
);
421 GetReqExtra(GLXDestroyPbuffer
, 4, req
);
422 req
->reqType
= opcode
;
423 req
->glxCode
= glxCode
;
424 req
->pbuffer
= (GLXPbuffer
) drawable
;
429 DestroyDRIDrawable(dpy
, drawable
, GL_FALSE
);
438 * This function is used to implement \c glXCreatePbuffer and
439 * \c glXCreateGLXPbufferSGIX.
442 * This function dynamically determines whether to use the SGIX_pbuffer
443 * version of the protocol or the GLX 1.3 version of the protocol.
446 * This function needs to be modified to work with direct-rendering drivers.
449 CreatePbuffer(Display
* dpy
, const __GLcontextModes
* fbconfig
,
450 unsigned int width
, unsigned int height
,
451 const int *attrib_list
, GLboolean size_in_attribs
)
453 __GLXdisplayPrivate
*priv
= __glXInitialize(dpy
);
462 while (attrib_list
[i
* 2])
466 opcode
= __glXSetupForCommand(dpy
);
473 if ((priv
->majorVersion
> 1) || (priv
->minorVersion
>= 3)) {
474 xGLXCreatePbufferReq
*req
;
475 unsigned int extra
= (size_in_attribs
) ? 0 : 2;
477 GetReqExtra(GLXCreatePbuffer
, (8 * (i
+ extra
)), req
);
478 data
= (CARD32
*) (req
+ 1);
480 req
->reqType
= opcode
;
481 req
->glxCode
= X_GLXCreatePbuffer
;
482 req
->screen
= (CARD32
) fbconfig
->screen
;
483 req
->fbconfig
= fbconfig
->fbconfigID
;
484 req
->pbuffer
= (GLXPbuffer
) id
;
485 req
->numAttribs
= (CARD32
) (i
+ extra
);
487 if (!size_in_attribs
) {
488 data
[(2 * i
) + 0] = GLX_PBUFFER_WIDTH
;
489 data
[(2 * i
) + 1] = width
;
490 data
[(2 * i
) + 2] = GLX_PBUFFER_HEIGHT
;
491 data
[(2 * i
) + 3] = height
;
496 xGLXVendorPrivateReq
*vpreq
;
498 GetReqExtra(GLXVendorPrivate
, 20 + (8 * i
), vpreq
);
499 data
= (CARD32
*) (vpreq
+ 1);
501 vpreq
->reqType
= opcode
;
502 vpreq
->glxCode
= X_GLXVendorPrivate
;
503 vpreq
->vendorCode
= X_GLXvop_CreateGLXPbufferSGIX
;
505 data
[0] = (CARD32
) fbconfig
->screen
;
506 data
[1] = (CARD32
) fbconfig
->fbconfigID
;
507 data
[2] = (CARD32
) id
;
508 data
[3] = (CARD32
) width
;
509 data
[4] = (CARD32
) height
;
513 (void) memcpy(data
, attrib_list
, sizeof(CARD32
) * 2 * i
);
518 pixmap
= XCreatePixmap(dpy
, RootWindow(dpy
, fbconfig
->screen
),
519 width
, height
, fbconfig
->rgbBits
);
521 CreateDRIDrawable(dpy
, fbconfig
, pixmap
, id
, attrib_list
, i
);
529 * This function is used to implement \c glXDestroyPbuffer and
530 * \c glXDestroyGLXPbufferSGIX.
533 * This function dynamically determines whether to use the SGIX_pbuffer
534 * version of the protocol or the GLX 1.3 version of the protocol.
537 DestroyPbuffer(Display
* dpy
, GLXDrawable drawable
)
539 __GLXdisplayPrivate
*priv
= __glXInitialize(dpy
);
542 if ((dpy
== NULL
) || (drawable
== 0)) {
546 opcode
= __glXSetupForCommand(dpy
);
552 if ((priv
->majorVersion
> 1) || (priv
->minorVersion
>= 3)) {
553 xGLXDestroyPbufferReq
*req
;
555 GetReq(GLXDestroyPbuffer
, req
);
556 req
->reqType
= opcode
;
557 req
->glxCode
= X_GLXDestroyPbuffer
;
558 req
->pbuffer
= (GLXPbuffer
) drawable
;
561 xGLXVendorPrivateWithReplyReq
*vpreq
;
564 GetReqExtra(GLXVendorPrivateWithReply
, 4, vpreq
);
565 data
= (CARD32
*) (vpreq
+ 1);
567 data
[0] = (CARD32
) drawable
;
569 vpreq
->reqType
= opcode
;
570 vpreq
->glxCode
= X_GLXVendorPrivateWithReply
;
571 vpreq
->vendorCode
= X_GLXvop_DestroyGLXPbufferSGIX
;
577 DestroyDRIDrawable(dpy
, drawable
, GL_TRUE
);
583 * Create a new pbuffer.
585 PUBLIC GLXPbufferSGIX
586 glXCreateGLXPbufferSGIX(Display
* dpy
, GLXFBConfigSGIX config
,
587 unsigned int width
, unsigned int height
,
590 return (GLXPbufferSGIX
) CreatePbuffer(dpy
, (__GLcontextModes
*) config
,
592 attrib_list
, GL_FALSE
);
595 #endif /* GLX_USE_APPLEGL */
598 * Create a new pbuffer.
601 glXCreatePbuffer(Display
* dpy
, GLXFBConfig config
, const int *attrib_list
)
603 int i
, width
, height
;
604 #ifdef GLX_USE_APPLEGL
612 WARN_ONCE_GLX_1_3(dpy
, __func__
);
614 #ifdef GLX_USE_APPLEGL
615 for (i
= 0; attrib_list
[i
]; ++i
) {
616 switch (attrib_list
[i
]) {
617 case GLX_PBUFFER_WIDTH
:
618 width
= attrib_list
[i
+ 1];
622 case GLX_PBUFFER_HEIGHT
:
623 height
= attrib_list
[i
+ 1];
627 case GLX_LARGEST_PBUFFER
:
628 /* This is a hint we should probably handle, but how? */
632 case GLX_PRESERVED_CONTENTS
:
633 /* The contents are always preserved with AppleSGLX with CGL. */
642 if (apple_glx_pbuffer_create(dpy
, config
, width
, height
, &errorcode
,
645 * apple_glx_pbuffer_create only sets the errorcode to core X11
648 __glXSendError(dpy
, errorcode
, 0, X_GLXCreatePbuffer
, true);
655 for (i
= 0; attrib_list
[i
* 2]; i
++) {
656 switch (attrib_list
[i
* 2]) {
657 case GLX_PBUFFER_WIDTH
:
658 width
= attrib_list
[i
* 2 + 1];
660 case GLX_PBUFFER_HEIGHT
:
661 height
= attrib_list
[i
* 2 + 1];
666 return (GLXPbuffer
) CreatePbuffer(dpy
, (__GLcontextModes
*) config
,
667 width
, height
, attrib_list
, GL_TRUE
);
673 * Destroy an existing pbuffer.
676 glXDestroyPbuffer(Display
* dpy
, GLXPbuffer pbuf
)
678 #ifdef GLX_USE_APPLEGL
679 if (apple_glx_pbuffer_destroy(dpy
, pbuf
)) {
680 __glXSendError(dpy
, GLXBadPbuffer
, pbuf
, X_GLXDestroyPbuffer
, false);
683 DestroyPbuffer(dpy
, pbuf
);
689 * Query an attribute of a drawable.
692 glXQueryDrawable(Display
* dpy
, GLXDrawable drawable
,
693 int attribute
, unsigned int *value
)
695 WARN_ONCE_GLX_1_3(dpy
, __func__
);
696 #ifdef GLX_USE_APPLEGL
699 unsigned int width
, height
, bd
, depth
;
701 if (apple_glx_pixmap_query(drawable
, attribute
, value
))
704 if (apple_glx_pbuffer_query(drawable
, attribute
, value
))
708 * The OpenGL spec states that we should report GLXBadDrawable if
709 * the drawable is invalid, however doing so would require that we
710 * use XSetErrorHandler(), which is known to not be thread safe.
711 * If we use a round-trip call to validate the drawable, there could
712 * be a race, so instead we just opt in favor of letting the
713 * XGetGeometry request fail with a GetGeometry request X error
714 * rather than GLXBadDrawable, in what is hoped to be a rare
715 * case of an invalid drawable. In practice most and possibly all
716 * X11 apps using GLX shouldn't notice a difference.
719 (dpy
, drawable
, &root
, &x
, &y
, &width
, &height
, &bd
, &depth
)) {
731 GetDrawableAttribute(dpy
, drawable
, attribute
, value
);
736 #ifndef GLX_USE_APPLEGL
738 * Query an attribute of a pbuffer.
741 glXQueryGLXPbufferSGIX(Display
* dpy
, GLXPbufferSGIX drawable
,
742 int attribute
, unsigned int *value
)
744 return GetDrawableAttribute(dpy
, drawable
, attribute
, value
);
749 * Select the event mask for a drawable.
752 glXSelectEvent(Display
* dpy
, GLXDrawable drawable
, unsigned long mask
)
754 #ifdef GLX_USE_APPLEGL
755 XWindowAttributes xwattr
;
757 if (apple_glx_pbuffer_set_event_mask(drawable
, mask
))
761 * The spec allows a window, but currently there are no valid
762 * events for a window, so do nothing.
764 if (XGetWindowAttributes(dpy
, drawable
, &xwattr
))
766 /* The drawable seems to be invalid. Report an error. */
768 __glXSendError(dpy
, GLXBadDrawable
, drawable
,
769 X_GLXChangeDrawableAttributes
, false);
773 attribs
[0] = (CARD32
) GLX_EVENT_MASK
;
774 attribs
[1] = (CARD32
) mask
;
776 ChangeDrawableAttribute(dpy
, drawable
, attribs
, 1);
782 * Get the selected event mask for a drawable.
785 glXGetSelectedEvent(Display
* dpy
, GLXDrawable drawable
, unsigned long *mask
)
787 #ifdef GLX_USE_APPLEGL
788 XWindowAttributes xwattr
;
790 if (apple_glx_pbuffer_get_event_mask(drawable
, mask
))
794 * The spec allows a window, but currently there are no valid
795 * events for a window, so do nothing, but set the mask to 0.
797 if (XGetWindowAttributes(dpy
, drawable
, &xwattr
)) {
798 /* The window is valid, so set the mask to 0. */
802 /* The drawable seems to be invalid. Report an error. */
804 __glXSendError(dpy
, GLXBadDrawable
, drawable
, X_GLXGetDrawableAttributes
,
810 /* The non-sense with value is required because on LP64 platforms
811 * sizeof(unsigned int) != sizeof(unsigned long). On little-endian
812 * we could just type-cast the pointer, but why?
815 GetDrawableAttribute(dpy
, drawable
, GLX_EVENT_MASK_SGIX
, &value
);
822 glXCreatePixmap(Display
* dpy
, GLXFBConfig config
, Pixmap pixmap
,
823 const int *attrib_list
)
825 WARN_ONCE_GLX_1_3(dpy
, __func__
);
827 #ifdef GLX_USE_APPLEGL
828 const __GLcontextModes
*modes
= (const __GLcontextModes
*) config
;
830 if (apple_glx_pixmap_create(dpy
, modes
->screen
, pixmap
, modes
))
835 return CreateDrawable(dpy
, (__GLcontextModes
*) config
,
836 (Drawable
) pixmap
, attrib_list
, X_GLXCreatePixmap
);
842 glXCreateWindow(Display
* dpy
, GLXFBConfig config
, Window win
,
843 const int *attrib_list
)
845 WARN_ONCE_GLX_1_3(dpy
, __func__
);
846 #ifdef GLX_USE_APPLEGL
847 XWindowAttributes xwattr
;
848 XVisualInfo
*visinfo
;
850 (void) attrib_list
; /*unused according to GLX 1.4 */
852 XGetWindowAttributes(dpy
, win
, &xwattr
);
854 visinfo
= glXGetVisualFromFBConfig(dpy
, config
);
856 if (NULL
== visinfo
) {
857 __glXSendError(dpy
, GLXBadFBConfig
, 0, X_GLXCreateWindow
, false);
861 if (visinfo
->visualid
!= XVisualIDFromVisual(xwattr
.visual
)) {
862 __glXSendError(dpy
, BadMatch
, 0, X_GLXCreateWindow
, true);
870 return CreateDrawable(dpy
, (__GLcontextModes
*) config
,
871 (Drawable
) win
, attrib_list
, X_GLXCreateWindow
);
877 glXDestroyPixmap(Display
* dpy
, GLXPixmap pixmap
)
879 WARN_ONCE_GLX_1_3(dpy
, __func__
);
880 #ifdef GLX_USE_APPLEGL
881 if (apple_glx_pixmap_destroy(dpy
, pixmap
))
882 __glXSendError(dpy
, GLXBadPixmap
, pixmap
, X_GLXDestroyPixmap
, false);
884 DestroyDrawable(dpy
, (GLXDrawable
) pixmap
, X_GLXDestroyPixmap
);
890 glXDestroyWindow(Display
* dpy
, GLXWindow win
)
892 WARN_ONCE_GLX_1_3(dpy
, __func__
);
893 #ifndef GLX_USE_APPLEGL
894 DestroyDrawable(dpy
, (GLXDrawable
) win
, X_GLXDestroyWindow
);
898 #ifndef GLX_USE_APPLEGL
900 GLX_ALIAS_VOID(glXDestroyGLXPbufferSGIX
,
901 (Display
* dpy
, GLXPbufferSGIX pbuf
),
902 (dpy
, pbuf
), glXDestroyPbuffer
)
905 GLX_ALIAS_VOID(glXSelectEventSGIX
,
906 (Display
* dpy
, GLXDrawable drawable
,
907 unsigned long mask
), (dpy
, drawable
, mask
), glXSelectEvent
)
910 GLX_ALIAS_VOID(glXGetSelectedEventSGIX
,
911 (Display
* dpy
, GLXDrawable drawable
,
912 unsigned long *mask
), (dpy
, drawable
, mask
),