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 struct glx_display
*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 struct glx_display
*priv
= __glXInitialize(dpy
);
89 __GLXDRIdrawable
*pdraw
;
94 if ((dpy
== NULL
) || (drawable
== 0)) {
98 pdraw
= GetGLXDRIDrawable(dpy
, drawable
);
100 opcode
= __glXSetupForCommand(dpy
);
106 if ((priv
->majorVersion
> 1) || (priv
->minorVersion
>= 3)) {
107 xGLXChangeDrawableAttributesReq
*req
;
109 GetReqExtra(GLXChangeDrawableAttributes
, 8 + (8 * num_attribs
), req
);
110 output
= (CARD32
*) (req
+ 1);
112 req
->reqType
= opcode
;
113 req
->glxCode
= X_GLXChangeDrawableAttributes
;
114 req
->drawable
= drawable
;
115 req
->numAttribs
= (CARD32
) num_attribs
;
118 xGLXVendorPrivateWithReplyReq
*vpreq
;
120 GetReqExtra(GLXVendorPrivateWithReply
, 4 + (8 * num_attribs
), vpreq
);
121 output
= (CARD32
*) (vpreq
+ 1);
123 vpreq
->reqType
= opcode
;
124 vpreq
->glxCode
= X_GLXVendorPrivateWithReply
;
125 vpreq
->vendorCode
= X_GLXvop_ChangeDrawableAttributesSGIX
;
127 output
[0] = (CARD32
) drawable
;
131 (void) memcpy(output
, attribs
, sizeof(CARD32
) * 2 * num_attribs
);
136 for (i
= 0; i
< num_attribs
; i
++) {
137 switch(attribs
[i
* 2]) {
139 /* Keep a local copy for masking out DRI2 proto events as needed */
140 pdraw
->eventMask
= attribs
[i
* 2 + 1];
149 #ifdef GLX_DIRECT_RENDERING
151 determineTextureTarget(const int *attribs
, int numAttribs
)
156 for (i
= 0; i
< numAttribs
; i
++) {
157 if (attribs
[2 * i
] == GLX_TEXTURE_TARGET_EXT
) {
158 switch (attribs
[2 * i
+ 1]) {
159 case GLX_TEXTURE_2D_EXT
:
160 target
= GL_TEXTURE_2D
;
162 case GLX_TEXTURE_RECTANGLE_EXT
:
163 target
= GL_TEXTURE_RECTANGLE_ARB
;
173 determineTextureFormat(const int *attribs
, int numAttribs
)
177 for (i
= 0; i
< numAttribs
; i
++) {
178 if (attribs
[2 * i
] == GLX_TEXTURE_FORMAT_EXT
)
179 return attribs
[2 * i
+ 1];
186 CreateDRIDrawable(Display
*dpy
, struct glx_config
*config
,
187 XID drawable
, XID glxdrawable
,
188 const int *attrib_list
, size_t num_attribs
)
190 struct glx_display
*const priv
= __glXInitialize(dpy
);
191 __GLXDRIdrawable
*pdraw
;
192 struct glx_screen
*psc
;
194 psc
= priv
->screens
[config
->screen
];
195 if (psc
->driScreen
== NULL
)
198 pdraw
= psc
->driScreen
->createDrawable(psc
, drawable
,
199 glxdrawable
, config
);
201 fprintf(stderr
, "failed to create drawable\n");
205 if (__glxHashInsert(priv
->drawHash
, glxdrawable
, pdraw
)) {
206 (*pdraw
->destroyDrawable
) (pdraw
);
207 return; /* FIXME: Check what we're supposed to do here... */
210 pdraw
->textureTarget
= determineTextureTarget(attrib_list
, num_attribs
);
211 pdraw
->textureFormat
= determineTextureFormat(attrib_list
, num_attribs
);
215 DestroyDRIDrawable(Display
*dpy
, GLXDrawable drawable
, int destroy_xdrawable
)
217 struct glx_display
*const priv
= __glXInitialize(dpy
);
218 __GLXDRIdrawable
*pdraw
= GetGLXDRIDrawable(dpy
, drawable
);
221 if (destroy_xdrawable
)
222 XFreePixmap(pdraw
->psc
->dpy
, pdraw
->xDrawable
);
223 (*pdraw
->destroyDrawable
) (pdraw
);
224 __glxHashDelete(priv
->drawHash
, drawable
);
231 CreateDRIDrawable(Display
*dpy
, const struct glx_config
* fbconfig
,
232 XID drawable
, XID glxdrawable
,
233 const int *attrib_list
, size_t num_attribs
)
238 DestroyDRIDrawable(Display
*dpy
, GLXDrawable drawable
, int destroy_xdrawable
)
245 * Get a drawable's attribute.
247 * This function is used to implement \c glXGetSelectedEvent and
248 * \c glXGetSelectedEventSGIX.
251 * This function dynamically determines whether to use the SGIX_pbuffer
252 * version of the protocol or the GLX 1.3 version of the protocol.
255 * The number of attributes returned is likely to be small, probably less than
256 * 10. Given that, this routine should try to use an array on the stack to
257 * capture the reply rather than always calling Xmalloc.
260 * This function needs to be modified to work with direct-rendering drivers.
263 GetDrawableAttribute(Display
* dpy
, GLXDrawable drawable
,
264 int attribute
, unsigned int *value
)
266 struct glx_display
*priv
;
267 xGLXGetDrawableAttributesReply reply
;
272 unsigned int num_attributes
;
273 GLboolean use_glx_1_3
;
275 if ((dpy
== NULL
) || (drawable
== 0)) {
279 priv
= __glXInitialize(dpy
);
280 use_glx_1_3
= ((priv
->majorVersion
> 1) || (priv
->minorVersion
>= 3));
285 opcode
= __glXSetupForCommand(dpy
);
292 xGLXGetDrawableAttributesReq
*req
;
294 GetReqExtra(GLXGetDrawableAttributes
, 4, req
);
295 req
->reqType
= opcode
;
296 req
->glxCode
= X_GLXGetDrawableAttributes
;
297 req
->drawable
= drawable
;
300 xGLXVendorPrivateWithReplyReq
*vpreq
;
302 GetReqExtra(GLXVendorPrivateWithReply
, 4, vpreq
);
303 data
= (CARD32
*) (vpreq
+ 1);
304 data
[0] = (CARD32
) drawable
;
306 vpreq
->reqType
= opcode
;
307 vpreq
->glxCode
= X_GLXVendorPrivateWithReply
;
308 vpreq
->vendorCode
= X_GLXvop_GetDrawableAttributesSGIX
;
311 _XReply(dpy
, (xReply
*) & reply
, 0, False
);
313 if (reply
.type
== X_Error
) {
319 length
= reply
.length
;
321 num_attributes
= (use_glx_1_3
) ? reply
.numAttribs
: length
/ 2;
322 data
= (CARD32
*) Xmalloc(length
* sizeof(CARD32
));
324 /* Throw data on the floor */
325 _XEatData(dpy
, length
);
328 _XRead(dpy
, (char *) data
, length
* sizeof(CARD32
));
330 /* Search the set of returned attributes for the attribute requested by
333 for (i
= 0; i
< num_attributes
; i
++) {
334 if (data
[i
* 2] == attribute
) {
335 *value
= data
[(i
* 2) + 1];
340 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
342 __GLXDRIdrawable
*pdraw
= GetGLXDRIDrawable(dpy
, drawable
);
344 if (pdraw
!= NULL
&& !pdraw
->textureTarget
)
345 pdraw
->textureTarget
=
346 determineTextureTarget((const int *) data
, num_attributes
);
347 if (pdraw
!= NULL
&& !pdraw
->textureFormat
)
348 pdraw
->textureFormat
=
349 determineTextureFormat((const int *) data
, num_attributes
);
364 * Create a non-pbuffer GLX drawable.
367 * This function needs to be modified to work with direct-rendering drivers.
370 CreateDrawable(Display
*dpy
, struct glx_config
*config
,
371 Drawable drawable
, const int *attrib_list
, CARD8 glxCode
)
373 xGLXCreateWindowReq
*req
;
380 while (attrib_list
[i
* 2] != None
)
384 opcode
= __glXSetupForCommand(dpy
);
389 GetReqExtra(GLXCreateWindow
, 8 * i
, req
);
390 data
= (CARD32
*) (req
+ 1);
392 req
->reqType
= opcode
;
393 req
->glxCode
= glxCode
;
394 req
->screen
= config
->screen
;
395 req
->fbconfig
= config
->fbconfigID
;
396 req
->window
= drawable
;
397 req
->glxwindow
= XAllocID(dpy
);
401 memcpy(data
, attrib_list
, 8 * i
);
406 CreateDRIDrawable(dpy
, config
, drawable
, req
->glxwindow
, attrib_list
, i
);
408 return req
->glxwindow
;
413 * Destroy a non-pbuffer GLX drawable.
416 DestroyDrawable(Display
* dpy
, GLXDrawable drawable
, CARD32 glxCode
)
418 xGLXDestroyPbufferReq
*req
;
421 if ((dpy
== NULL
) || (drawable
== 0)) {
426 opcode
= __glXSetupForCommand(dpy
);
432 GetReqExtra(GLXDestroyPbuffer
, 4, req
);
433 req
->reqType
= opcode
;
434 req
->glxCode
= glxCode
;
435 req
->pbuffer
= (GLXPbuffer
) drawable
;
440 DestroyDRIDrawable(dpy
, drawable
, GL_FALSE
);
449 * This function is used to implement \c glXCreatePbuffer and
450 * \c glXCreateGLXPbufferSGIX.
453 * This function dynamically determines whether to use the SGIX_pbuffer
454 * version of the protocol or the GLX 1.3 version of the protocol.
457 * This function needs to be modified to work with direct-rendering drivers.
460 CreatePbuffer(Display
* dpy
, struct glx_config
*config
,
461 unsigned int width
, unsigned int height
,
462 const int *attrib_list
, GLboolean size_in_attribs
)
464 struct glx_display
*priv
= __glXInitialize(dpy
);
473 while (attrib_list
[i
* 2])
477 opcode
= __glXSetupForCommand(dpy
);
484 if ((priv
->majorVersion
> 1) || (priv
->minorVersion
>= 3)) {
485 xGLXCreatePbufferReq
*req
;
486 unsigned int extra
= (size_in_attribs
) ? 0 : 2;
488 GetReqExtra(GLXCreatePbuffer
, (8 * (i
+ extra
)), req
);
489 data
= (CARD32
*) (req
+ 1);
491 req
->reqType
= opcode
;
492 req
->glxCode
= X_GLXCreatePbuffer
;
493 req
->screen
= config
->screen
;
494 req
->fbconfig
= config
->fbconfigID
;
496 req
->numAttribs
= i
+ extra
;
498 if (!size_in_attribs
) {
499 data
[(2 * i
) + 0] = GLX_PBUFFER_WIDTH
;
500 data
[(2 * i
) + 1] = width
;
501 data
[(2 * i
) + 2] = GLX_PBUFFER_HEIGHT
;
502 data
[(2 * i
) + 3] = height
;
507 xGLXVendorPrivateReq
*vpreq
;
509 GetReqExtra(GLXVendorPrivate
, 20 + (8 * i
), vpreq
);
510 data
= (CARD32
*) (vpreq
+ 1);
512 vpreq
->reqType
= opcode
;
513 vpreq
->glxCode
= X_GLXVendorPrivate
;
514 vpreq
->vendorCode
= X_GLXvop_CreateGLXPbufferSGIX
;
516 data
[0] = config
->screen
;
517 data
[1] = config
->fbconfigID
;
524 (void) memcpy(data
, attrib_list
, sizeof(CARD32
) * 2 * i
);
529 pixmap
= XCreatePixmap(dpy
, RootWindow(dpy
, config
->screen
),
530 width
, height
, config
->rgbBits
);
532 CreateDRIDrawable(dpy
, config
, pixmap
, id
, attrib_list
, i
);
540 * This function is used to implement \c glXDestroyPbuffer and
541 * \c glXDestroyGLXPbufferSGIX.
544 * This function dynamically determines whether to use the SGIX_pbuffer
545 * version of the protocol or the GLX 1.3 version of the protocol.
548 DestroyPbuffer(Display
* dpy
, GLXDrawable drawable
)
550 struct glx_display
*priv
= __glXInitialize(dpy
);
553 if ((dpy
== NULL
) || (drawable
== 0)) {
557 opcode
= __glXSetupForCommand(dpy
);
563 if ((priv
->majorVersion
> 1) || (priv
->minorVersion
>= 3)) {
564 xGLXDestroyPbufferReq
*req
;
566 GetReq(GLXDestroyPbuffer
, req
);
567 req
->reqType
= opcode
;
568 req
->glxCode
= X_GLXDestroyPbuffer
;
569 req
->pbuffer
= (GLXPbuffer
) drawable
;
572 xGLXVendorPrivateWithReplyReq
*vpreq
;
575 GetReqExtra(GLXVendorPrivateWithReply
, 4, vpreq
);
576 data
= (CARD32
*) (vpreq
+ 1);
578 data
[0] = (CARD32
) drawable
;
580 vpreq
->reqType
= opcode
;
581 vpreq
->glxCode
= X_GLXVendorPrivateWithReply
;
582 vpreq
->vendorCode
= X_GLXvop_DestroyGLXPbufferSGIX
;
588 DestroyDRIDrawable(dpy
, drawable
, GL_TRUE
);
594 * Create a new pbuffer.
596 _X_EXPORT GLXPbufferSGIX
597 glXCreateGLXPbufferSGIX(Display
* dpy
, GLXFBConfigSGIX config
,
598 unsigned int width
, unsigned int height
,
601 return (GLXPbufferSGIX
) CreatePbuffer(dpy
, (struct glx_config
*) config
,
603 attrib_list
, GL_FALSE
);
606 #endif /* GLX_USE_APPLEGL */
609 * Create a new pbuffer.
612 glXCreatePbuffer(Display
* dpy
, GLXFBConfig config
, const int *attrib_list
)
614 int i
, width
, height
;
615 #ifdef GLX_USE_APPLEGL
623 WARN_ONCE_GLX_1_3(dpy
, __func__
);
625 #ifdef GLX_USE_APPLEGL
626 for (i
= 0; attrib_list
[i
]; ++i
) {
627 switch (attrib_list
[i
]) {
628 case GLX_PBUFFER_WIDTH
:
629 width
= attrib_list
[i
+ 1];
633 case GLX_PBUFFER_HEIGHT
:
634 height
= attrib_list
[i
+ 1];
638 case GLX_LARGEST_PBUFFER
:
639 /* This is a hint we should probably handle, but how? */
643 case GLX_PRESERVED_CONTENTS
:
644 /* The contents are always preserved with AppleSGLX with CGL. */
653 if (apple_glx_pbuffer_create(dpy
, config
, width
, height
, &errorcode
,
656 * apple_glx_pbuffer_create only sets the errorcode to core X11
659 __glXSendError(dpy
, errorcode
, 0, X_GLXCreatePbuffer
, true);
666 for (i
= 0; attrib_list
[i
* 2]; i
++) {
667 switch (attrib_list
[i
* 2]) {
668 case GLX_PBUFFER_WIDTH
:
669 width
= attrib_list
[i
* 2 + 1];
671 case GLX_PBUFFER_HEIGHT
:
672 height
= attrib_list
[i
* 2 + 1];
677 return (GLXPbuffer
) CreatePbuffer(dpy
, (struct glx_config
*) config
,
678 width
, height
, attrib_list
, GL_TRUE
);
684 * Destroy an existing pbuffer.
687 glXDestroyPbuffer(Display
* dpy
, GLXPbuffer pbuf
)
689 #ifdef GLX_USE_APPLEGL
690 if (apple_glx_pbuffer_destroy(dpy
, pbuf
)) {
691 __glXSendError(dpy
, GLXBadPbuffer
, pbuf
, X_GLXDestroyPbuffer
, false);
694 DestroyPbuffer(dpy
, pbuf
);
700 * Query an attribute of a drawable.
703 glXQueryDrawable(Display
* dpy
, GLXDrawable drawable
,
704 int attribute
, unsigned int *value
)
706 WARN_ONCE_GLX_1_3(dpy
, __func__
);
707 #ifdef GLX_USE_APPLEGL
710 unsigned int width
, height
, bd
, depth
;
712 if (apple_glx_pixmap_query(drawable
, attribute
, value
))
715 if (apple_glx_pbuffer_query(drawable
, attribute
, value
))
719 * The OpenGL spec states that we should report GLXBadDrawable if
720 * the drawable is invalid, however doing so would require that we
721 * use XSetErrorHandler(), which is known to not be thread safe.
722 * If we use a round-trip call to validate the drawable, there could
723 * be a race, so instead we just opt in favor of letting the
724 * XGetGeometry request fail with a GetGeometry request X error
725 * rather than GLXBadDrawable, in what is hoped to be a rare
726 * case of an invalid drawable. In practice most and possibly all
727 * X11 apps using GLX shouldn't notice a difference.
730 (dpy
, drawable
, &root
, &x
, &y
, &width
, &height
, &bd
, &depth
)) {
742 GetDrawableAttribute(dpy
, drawable
, attribute
, value
);
747 #ifndef GLX_USE_APPLEGL
749 * Query an attribute of a pbuffer.
752 glXQueryGLXPbufferSGIX(Display
* dpy
, GLXPbufferSGIX drawable
,
753 int attribute
, unsigned int *value
)
755 return GetDrawableAttribute(dpy
, drawable
, attribute
, value
);
760 * Select the event mask for a drawable.
763 glXSelectEvent(Display
* dpy
, GLXDrawable drawable
, unsigned long mask
)
765 #ifdef GLX_USE_APPLEGL
766 XWindowAttributes xwattr
;
768 if (apple_glx_pbuffer_set_event_mask(drawable
, mask
))
772 * The spec allows a window, but currently there are no valid
773 * events for a window, so do nothing.
775 if (XGetWindowAttributes(dpy
, drawable
, &xwattr
))
777 /* The drawable seems to be invalid. Report an error. */
779 __glXSendError(dpy
, GLXBadDrawable
, drawable
,
780 X_GLXChangeDrawableAttributes
, false);
784 attribs
[0] = (CARD32
) GLX_EVENT_MASK
;
785 attribs
[1] = (CARD32
) mask
;
787 ChangeDrawableAttribute(dpy
, drawable
, attribs
, 1);
793 * Get the selected event mask for a drawable.
796 glXGetSelectedEvent(Display
* dpy
, GLXDrawable drawable
, unsigned long *mask
)
798 #ifdef GLX_USE_APPLEGL
799 XWindowAttributes xwattr
;
801 if (apple_glx_pbuffer_get_event_mask(drawable
, mask
))
805 * The spec allows a window, but currently there are no valid
806 * events for a window, so do nothing, but set the mask to 0.
808 if (XGetWindowAttributes(dpy
, drawable
, &xwattr
)) {
809 /* The window is valid, so set the mask to 0. */
813 /* The drawable seems to be invalid. Report an error. */
815 __glXSendError(dpy
, GLXBadDrawable
, drawable
, X_GLXGetDrawableAttributes
,
821 /* The non-sense with value is required because on LP64 platforms
822 * sizeof(unsigned int) != sizeof(unsigned long). On little-endian
823 * we could just type-cast the pointer, but why?
826 GetDrawableAttribute(dpy
, drawable
, GLX_EVENT_MASK_SGIX
, &value
);
833 glXCreatePixmap(Display
* dpy
, GLXFBConfig config
, Pixmap pixmap
,
834 const int *attrib_list
)
836 WARN_ONCE_GLX_1_3(dpy
, __func__
);
838 #ifdef GLX_USE_APPLEGL
839 const struct glx_config
*modes
= (const __GLcontextModes
*) config
;
841 if (apple_glx_pixmap_create(dpy
, modes
->screen
, pixmap
, modes
))
846 return CreateDrawable(dpy
, (struct glx_config
*) config
,
847 (Drawable
) pixmap
, attrib_list
, X_GLXCreatePixmap
);
853 glXCreateWindow(Display
* dpy
, GLXFBConfig config
, Window win
,
854 const int *attrib_list
)
856 WARN_ONCE_GLX_1_3(dpy
, __func__
);
857 #ifdef GLX_USE_APPLEGL
858 XWindowAttributes xwattr
;
859 XVisualInfo
*visinfo
;
861 (void) attrib_list
; /*unused according to GLX 1.4 */
863 XGetWindowAttributes(dpy
, win
, &xwattr
);
865 visinfo
= glXGetVisualFromFBConfig(dpy
, config
);
867 if (NULL
== visinfo
) {
868 __glXSendError(dpy
, GLXBadFBConfig
, 0, X_GLXCreateWindow
, false);
872 if (visinfo
->visualid
!= XVisualIDFromVisual(xwattr
.visual
)) {
873 __glXSendError(dpy
, BadMatch
, 0, X_GLXCreateWindow
, true);
881 return CreateDrawable(dpy
, (struct glx_config
*) config
,
882 (Drawable
) win
, attrib_list
, X_GLXCreateWindow
);
888 glXDestroyPixmap(Display
* dpy
, GLXPixmap pixmap
)
890 WARN_ONCE_GLX_1_3(dpy
, __func__
);
891 #ifdef GLX_USE_APPLEGL
892 if (apple_glx_pixmap_destroy(dpy
, pixmap
))
893 __glXSendError(dpy
, GLXBadPixmap
, pixmap
, X_GLXDestroyPixmap
, false);
895 DestroyDrawable(dpy
, (GLXDrawable
) pixmap
, X_GLXDestroyPixmap
);
901 glXDestroyWindow(Display
* dpy
, GLXWindow win
)
903 WARN_ONCE_GLX_1_3(dpy
, __func__
);
904 #ifndef GLX_USE_APPLEGL
905 DestroyDrawable(dpy
, (GLXDrawable
) win
, X_GLXDestroyWindow
);
909 #ifndef GLX_USE_APPLEGL
911 GLX_ALIAS_VOID(glXDestroyGLXPbufferSGIX
,
912 (Display
* dpy
, GLXPbufferSGIX pbuf
),
913 (dpy
, pbuf
), glXDestroyPbuffer
)
916 GLX_ALIAS_VOID(glXSelectEventSGIX
,
917 (Display
* dpy
, GLXDrawable drawable
,
918 unsigned long mask
), (dpy
, drawable
, mask
), glXSelectEvent
)
921 GLX_ALIAS_VOID(glXGetSelectedEventSGIX
,
922 (Display
* dpy
, GLXDrawable drawable
,
923 unsigned long *mask
), (dpy
, drawable
, mask
),