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 ChangeDrawableAttribute(Display
* dpy
, GLXDrawable drawable
,
83 const CARD32
* attribs
, size_t num_attribs
)
85 struct glx_display
*priv
= __glXInitialize(dpy
);
86 #ifdef GLX_DIRECT_RENDERING
87 __GLXDRIdrawable
*pdraw
;
93 if ((dpy
== NULL
) || (drawable
== 0)) {
97 opcode
= __glXSetupForCommand(dpy
);
103 if ((priv
->majorVersion
> 1) || (priv
->minorVersion
>= 3)) {
104 xGLXChangeDrawableAttributesReq
*req
;
106 GetReqExtra(GLXChangeDrawableAttributes
, 8 * num_attribs
, req
);
107 output
= (CARD32
*) (req
+ 1);
109 req
->reqType
= opcode
;
110 req
->glxCode
= X_GLXChangeDrawableAttributes
;
111 req
->drawable
= drawable
;
112 req
->numAttribs
= (CARD32
) num_attribs
;
115 xGLXVendorPrivateWithReplyReq
*vpreq
;
117 GetReqExtra(GLXVendorPrivateWithReply
, 8 + (8 * num_attribs
), vpreq
);
118 output
= (CARD32
*) (vpreq
+ 1);
120 vpreq
->reqType
= opcode
;
121 vpreq
->glxCode
= X_GLXVendorPrivateWithReply
;
122 vpreq
->vendorCode
= X_GLXvop_ChangeDrawableAttributesSGIX
;
124 output
[0] = (CARD32
) drawable
;
125 output
[1] = num_attribs
;
129 (void) memcpy(output
, attribs
, sizeof(CARD32
) * 2 * num_attribs
);
134 #ifdef GLX_DIRECT_RENDERING
135 pdraw
= GetGLXDRIDrawable(dpy
, drawable
);
140 for (i
= 0; i
< num_attribs
; i
++) {
141 switch(attribs
[i
* 2]) {
143 /* Keep a local copy for masking out DRI2 proto events as needed */
144 pdraw
->eventMask
= attribs
[i
* 2 + 1];
154 #ifdef GLX_DIRECT_RENDERING
156 determineTextureTarget(const int *attribs
, int numAttribs
)
161 for (i
= 0; i
< numAttribs
; i
++) {
162 if (attribs
[2 * i
] == GLX_TEXTURE_TARGET_EXT
) {
163 switch (attribs
[2 * i
+ 1]) {
164 case GLX_TEXTURE_2D_EXT
:
165 target
= GL_TEXTURE_2D
;
167 case GLX_TEXTURE_RECTANGLE_EXT
:
168 target
= GL_TEXTURE_RECTANGLE_ARB
;
178 determineTextureFormat(const int *attribs
, int numAttribs
)
182 for (i
= 0; i
< numAttribs
; i
++) {
183 if (attribs
[2 * i
] == GLX_TEXTURE_FORMAT_EXT
)
184 return attribs
[2 * i
+ 1];
191 CreateDRIDrawable(Display
*dpy
, struct glx_config
*config
,
192 XID drawable
, XID glxdrawable
,
193 const int *attrib_list
, size_t num_attribs
)
195 struct glx_display
*const priv
= __glXInitialize(dpy
);
196 __GLXDRIdrawable
*pdraw
;
197 struct glx_screen
*psc
;
199 psc
= priv
->screens
[config
->screen
];
200 if (psc
->driScreen
== NULL
)
203 pdraw
= psc
->driScreen
->createDrawable(psc
, drawable
,
204 glxdrawable
, config
);
206 fprintf(stderr
, "failed to create drawable\n");
210 if (__glxHashInsert(priv
->drawHash
, glxdrawable
, pdraw
)) {
211 (*pdraw
->destroyDrawable
) (pdraw
);
212 return; /* FIXME: Check what we're supposed to do here... */
215 pdraw
->textureTarget
= determineTextureTarget(attrib_list
, num_attribs
);
216 pdraw
->textureFormat
= determineTextureFormat(attrib_list
, num_attribs
);
220 DestroyDRIDrawable(Display
*dpy
, GLXDrawable drawable
, int destroy_xdrawable
)
222 struct glx_display
*const priv
= __glXInitialize(dpy
);
223 __GLXDRIdrawable
*pdraw
= GetGLXDRIDrawable(dpy
, drawable
);
227 xid
= pdraw
->xDrawable
;
228 (*pdraw
->destroyDrawable
) (pdraw
);
229 __glxHashDelete(priv
->drawHash
, drawable
);
230 if (destroy_xdrawable
)
231 XFreePixmap(priv
->dpy
, xid
);
238 CreateDRIDrawable(Display
*dpy
, const struct glx_config
* fbconfig
,
239 XID drawable
, XID glxdrawable
,
240 const int *attrib_list
, size_t num_attribs
)
245 DestroyDRIDrawable(Display
*dpy
, GLXDrawable drawable
, int destroy_xdrawable
)
252 * Get a drawable's attribute.
254 * This function is used to implement \c glXGetSelectedEvent and
255 * \c glXGetSelectedEventSGIX.
258 * This function dynamically determines whether to use the SGIX_pbuffer
259 * version of the protocol or the GLX 1.3 version of the protocol.
262 * The number of attributes returned is likely to be small, probably less than
263 * 10. Given that, this routine should try to use an array on the stack to
264 * capture the reply rather than always calling Xmalloc.
267 GetDrawableAttribute(Display
* dpy
, GLXDrawable drawable
,
268 int attribute
, unsigned int *value
)
270 struct glx_display
*priv
;
271 xGLXGetDrawableAttributesReply reply
;
276 unsigned int num_attributes
;
277 GLboolean use_glx_1_3
;
279 if ((dpy
== NULL
) || (drawable
== 0)) {
283 priv
= __glXInitialize(dpy
);
284 use_glx_1_3
= ((priv
->majorVersion
> 1) || (priv
->minorVersion
>= 3));
289 opcode
= __glXSetupForCommand(dpy
);
296 xGLXGetDrawableAttributesReq
*req
;
298 GetReq(GLXGetDrawableAttributes
, req
);
299 req
->reqType
= opcode
;
300 req
->glxCode
= X_GLXGetDrawableAttributes
;
301 req
->drawable
= drawable
;
304 xGLXVendorPrivateWithReplyReq
*vpreq
;
306 GetReqExtra(GLXVendorPrivateWithReply
, 4, vpreq
);
307 data
= (CARD32
*) (vpreq
+ 1);
308 data
[0] = (CARD32
) drawable
;
310 vpreq
->reqType
= opcode
;
311 vpreq
->glxCode
= X_GLXVendorPrivateWithReply
;
312 vpreq
->vendorCode
= X_GLXvop_GetDrawableAttributesSGIX
;
315 _XReply(dpy
, (xReply
*) & reply
, 0, False
);
317 if (reply
.type
== X_Error
) {
323 length
= reply
.length
;
325 num_attributes
= (use_glx_1_3
) ? reply
.numAttribs
: length
/ 2;
326 data
= (CARD32
*) Xmalloc(length
* sizeof(CARD32
));
328 /* Throw data on the floor */
329 _XEatData(dpy
, length
);
332 _XRead(dpy
, (char *) data
, length
* sizeof(CARD32
));
334 /* Search the set of returned attributes for the attribute requested by
337 for (i
= 0; i
< num_attributes
; i
++) {
338 if (data
[i
* 2] == attribute
) {
339 *value
= data
[(i
* 2) + 1];
344 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
346 __GLXDRIdrawable
*pdraw
= GetGLXDRIDrawable(dpy
, drawable
);
348 if (pdraw
!= NULL
&& !pdraw
->textureTarget
)
349 pdraw
->textureTarget
=
350 determineTextureTarget((const int *) data
, num_attributes
);
351 if (pdraw
!= NULL
&& !pdraw
->textureFormat
)
352 pdraw
->textureFormat
=
353 determineTextureFormat((const int *) data
, num_attributes
);
368 * Create a non-pbuffer GLX drawable.
371 CreateDrawable(Display
*dpy
, struct glx_config
*config
,
372 Drawable drawable
, const int *attrib_list
, CARD8 glxCode
)
374 xGLXCreateWindowReq
*req
;
381 while (attrib_list
[i
* 2] != None
)
385 opcode
= __glXSetupForCommand(dpy
);
390 GetReqExtra(GLXCreateWindow
, 8 * i
, req
);
391 data
= (CARD32
*) (req
+ 1);
393 req
->reqType
= opcode
;
394 req
->glxCode
= glxCode
;
395 req
->screen
= config
->screen
;
396 req
->fbconfig
= config
->fbconfigID
;
397 req
->window
= drawable
;
398 req
->glxwindow
= XAllocID(dpy
);
402 memcpy(data
, attrib_list
, 8 * i
);
407 CreateDRIDrawable(dpy
, config
, drawable
, req
->glxwindow
, attrib_list
, i
);
409 return req
->glxwindow
;
414 * Destroy a non-pbuffer GLX drawable.
417 DestroyDrawable(Display
* dpy
, GLXDrawable drawable
, CARD32 glxCode
)
419 xGLXDestroyPbufferReq
*req
;
422 if ((dpy
== NULL
) || (drawable
== 0)) {
427 opcode
= __glXSetupForCommand(dpy
);
433 GetReq(GLXDestroyPbuffer
, req
);
434 req
->reqType
= opcode
;
435 req
->glxCode
= glxCode
;
436 req
->pbuffer
= (GLXPbuffer
) drawable
;
441 DestroyDRIDrawable(dpy
, drawable
, GL_FALSE
);
450 * This function is used to implement \c glXCreatePbuffer and
451 * \c glXCreateGLXPbufferSGIX.
454 * This function dynamically determines whether to use the SGIX_pbuffer
455 * version of the protocol or the GLX 1.3 version of the protocol.
458 CreatePbuffer(Display
* dpy
, struct glx_config
*config
,
459 unsigned int width
, unsigned int height
,
460 const int *attrib_list
, GLboolean size_in_attribs
)
462 struct glx_display
*priv
= __glXInitialize(dpy
);
471 while (attrib_list
[i
* 2])
475 opcode
= __glXSetupForCommand(dpy
);
482 if ((priv
->majorVersion
> 1) || (priv
->minorVersion
>= 3)) {
483 xGLXCreatePbufferReq
*req
;
484 unsigned int extra
= (size_in_attribs
) ? 0 : 2;
486 GetReqExtra(GLXCreatePbuffer
, (8 * (i
+ extra
)), req
);
487 data
= (CARD32
*) (req
+ 1);
489 req
->reqType
= opcode
;
490 req
->glxCode
= X_GLXCreatePbuffer
;
491 req
->screen
= config
->screen
;
492 req
->fbconfig
= config
->fbconfigID
;
494 req
->numAttribs
= i
+ extra
;
496 if (!size_in_attribs
) {
497 data
[(2 * i
) + 0] = GLX_PBUFFER_WIDTH
;
498 data
[(2 * i
) + 1] = width
;
499 data
[(2 * i
) + 2] = GLX_PBUFFER_HEIGHT
;
500 data
[(2 * i
) + 3] = height
;
505 xGLXVendorPrivateReq
*vpreq
;
507 GetReqExtra(GLXVendorPrivate
, 20 + (8 * i
), vpreq
);
508 data
= (CARD32
*) (vpreq
+ 1);
510 vpreq
->reqType
= opcode
;
511 vpreq
->glxCode
= X_GLXVendorPrivate
;
512 vpreq
->vendorCode
= X_GLXvop_CreateGLXPbufferSGIX
;
514 data
[0] = config
->screen
;
515 data
[1] = config
->fbconfigID
;
522 (void) memcpy(data
, attrib_list
, sizeof(CARD32
) * 2 * i
);
527 pixmap
= XCreatePixmap(dpy
, RootWindow(dpy
, config
->screen
),
528 width
, height
, config
->rgbBits
);
530 CreateDRIDrawable(dpy
, config
, pixmap
, id
, attrib_list
, i
);
538 * This function is used to implement \c glXDestroyPbuffer and
539 * \c glXDestroyGLXPbufferSGIX.
542 * This function dynamically determines whether to use the SGIX_pbuffer
543 * version of the protocol or the GLX 1.3 version of the protocol.
546 DestroyPbuffer(Display
* dpy
, GLXDrawable drawable
)
548 struct glx_display
*priv
= __glXInitialize(dpy
);
551 if ((dpy
== NULL
) || (drawable
== 0)) {
555 opcode
= __glXSetupForCommand(dpy
);
561 if ((priv
->majorVersion
> 1) || (priv
->minorVersion
>= 3)) {
562 xGLXDestroyPbufferReq
*req
;
564 GetReq(GLXDestroyPbuffer
, req
);
565 req
->reqType
= opcode
;
566 req
->glxCode
= X_GLXDestroyPbuffer
;
567 req
->pbuffer
= (GLXPbuffer
) drawable
;
570 xGLXVendorPrivateWithReplyReq
*vpreq
;
573 GetReqExtra(GLXVendorPrivateWithReply
, 4, vpreq
);
574 data
= (CARD32
*) (vpreq
+ 1);
576 data
[0] = (CARD32
) drawable
;
578 vpreq
->reqType
= opcode
;
579 vpreq
->glxCode
= X_GLXVendorPrivateWithReply
;
580 vpreq
->vendorCode
= X_GLXvop_DestroyGLXPbufferSGIX
;
586 DestroyDRIDrawable(dpy
, drawable
, GL_TRUE
);
592 * Create a new pbuffer.
594 _X_EXPORT GLXPbufferSGIX
595 glXCreateGLXPbufferSGIX(Display
* dpy
, GLXFBConfigSGIX config
,
596 unsigned int width
, unsigned int height
,
599 return (GLXPbufferSGIX
) CreatePbuffer(dpy
, (struct glx_config
*) config
,
601 attrib_list
, GL_FALSE
);
604 #endif /* GLX_USE_APPLEGL */
607 * Create a new pbuffer.
610 glXCreatePbuffer(Display
* dpy
, GLXFBConfig config
, const int *attrib_list
)
612 int i
, width
, height
;
613 #ifdef GLX_USE_APPLEGL
621 WARN_ONCE_GLX_1_3(dpy
, __func__
);
623 #ifdef GLX_USE_APPLEGL
624 for (i
= 0; attrib_list
[i
]; ++i
) {
625 switch (attrib_list
[i
]) {
626 case GLX_PBUFFER_WIDTH
:
627 width
= attrib_list
[i
+ 1];
631 case GLX_PBUFFER_HEIGHT
:
632 height
= attrib_list
[i
+ 1];
636 case GLX_LARGEST_PBUFFER
:
637 /* This is a hint we should probably handle, but how? */
641 case GLX_PRESERVED_CONTENTS
:
642 /* The contents are always preserved with AppleSGLX with CGL. */
651 if (apple_glx_pbuffer_create(dpy
, config
, width
, height
, &errorcode
,
654 * apple_glx_pbuffer_create only sets the errorcode to core X11
657 __glXSendError(dpy
, errorcode
, 0, X_GLXCreatePbuffer
, true);
664 for (i
= 0; attrib_list
[i
* 2]; i
++) {
665 switch (attrib_list
[i
* 2]) {
666 case GLX_PBUFFER_WIDTH
:
667 width
= attrib_list
[i
* 2 + 1];
669 case GLX_PBUFFER_HEIGHT
:
670 height
= attrib_list
[i
* 2 + 1];
675 return (GLXPbuffer
) CreatePbuffer(dpy
, (struct glx_config
*) config
,
676 width
, height
, attrib_list
, GL_TRUE
);
682 * Destroy an existing pbuffer.
685 glXDestroyPbuffer(Display
* dpy
, GLXPbuffer pbuf
)
687 #ifdef GLX_USE_APPLEGL
688 if (apple_glx_pbuffer_destroy(dpy
, pbuf
)) {
689 __glXSendError(dpy
, GLXBadPbuffer
, pbuf
, X_GLXDestroyPbuffer
, false);
692 DestroyPbuffer(dpy
, pbuf
);
698 * Query an attribute of a drawable.
701 glXQueryDrawable(Display
* dpy
, GLXDrawable drawable
,
702 int attribute
, unsigned int *value
)
704 WARN_ONCE_GLX_1_3(dpy
, __func__
);
705 #ifdef GLX_USE_APPLEGL
708 unsigned int width
, height
, bd
, depth
;
710 if (apple_glx_pixmap_query(drawable
, attribute
, value
))
713 if (apple_glx_pbuffer_query(drawable
, attribute
, value
))
717 * The OpenGL spec states that we should report GLXBadDrawable if
718 * the drawable is invalid, however doing so would require that we
719 * use XSetErrorHandler(), which is known to not be thread safe.
720 * If we use a round-trip call to validate the drawable, there could
721 * be a race, so instead we just opt in favor of letting the
722 * XGetGeometry request fail with a GetGeometry request X error
723 * rather than GLXBadDrawable, in what is hoped to be a rare
724 * case of an invalid drawable. In practice most and possibly all
725 * X11 apps using GLX shouldn't notice a difference.
728 (dpy
, drawable
, &root
, &x
, &y
, &width
, &height
, &bd
, &depth
)) {
740 GetDrawableAttribute(dpy
, drawable
, attribute
, value
);
745 #ifndef GLX_USE_APPLEGL
747 * Query an attribute of a pbuffer.
750 glXQueryGLXPbufferSGIX(Display
* dpy
, GLXPbufferSGIX drawable
,
751 int attribute
, unsigned int *value
)
753 return GetDrawableAttribute(dpy
, drawable
, attribute
, value
);
758 * Select the event mask for a drawable.
761 glXSelectEvent(Display
* dpy
, GLXDrawable drawable
, unsigned long mask
)
763 #ifdef GLX_USE_APPLEGL
764 XWindowAttributes xwattr
;
766 if (apple_glx_pbuffer_set_event_mask(drawable
, mask
))
770 * The spec allows a window, but currently there are no valid
771 * events for a window, so do nothing.
773 if (XGetWindowAttributes(dpy
, drawable
, &xwattr
))
775 /* The drawable seems to be invalid. Report an error. */
777 __glXSendError(dpy
, GLXBadDrawable
, drawable
,
778 X_GLXChangeDrawableAttributes
, false);
782 attribs
[0] = (CARD32
) GLX_EVENT_MASK
;
783 attribs
[1] = (CARD32
) mask
;
785 ChangeDrawableAttribute(dpy
, drawable
, attribs
, 1);
791 * Get the selected event mask for a drawable.
794 glXGetSelectedEvent(Display
* dpy
, GLXDrawable drawable
, unsigned long *mask
)
796 #ifdef GLX_USE_APPLEGL
797 XWindowAttributes xwattr
;
799 if (apple_glx_pbuffer_get_event_mask(drawable
, mask
))
803 * The spec allows a window, but currently there are no valid
804 * events for a window, so do nothing, but set the mask to 0.
806 if (XGetWindowAttributes(dpy
, drawable
, &xwattr
)) {
807 /* The window is valid, so set the mask to 0. */
811 /* The drawable seems to be invalid. Report an error. */
813 __glXSendError(dpy
, GLXBadDrawable
, drawable
, X_GLXGetDrawableAttributes
,
819 /* The non-sense with value is required because on LP64 platforms
820 * sizeof(unsigned int) != sizeof(unsigned long). On little-endian
821 * we could just type-cast the pointer, but why?
824 GetDrawableAttribute(dpy
, drawable
, GLX_EVENT_MASK_SGIX
, &value
);
831 glXCreatePixmap(Display
* dpy
, GLXFBConfig config
, Pixmap pixmap
,
832 const int *attrib_list
)
834 WARN_ONCE_GLX_1_3(dpy
, __func__
);
836 #ifdef GLX_USE_APPLEGL
837 const struct glx_config
*modes
= (const __GLcontextModes
*) config
;
839 if (apple_glx_pixmap_create(dpy
, modes
->screen
, pixmap
, modes
))
844 return CreateDrawable(dpy
, (struct glx_config
*) config
,
845 (Drawable
) pixmap
, attrib_list
, X_GLXCreatePixmap
);
851 glXCreateWindow(Display
* dpy
, GLXFBConfig config
, Window win
,
852 const int *attrib_list
)
854 WARN_ONCE_GLX_1_3(dpy
, __func__
);
855 #ifdef GLX_USE_APPLEGL
856 XWindowAttributes xwattr
;
857 XVisualInfo
*visinfo
;
859 (void) attrib_list
; /*unused according to GLX 1.4 */
861 XGetWindowAttributes(dpy
, win
, &xwattr
);
863 visinfo
= glXGetVisualFromFBConfig(dpy
, config
);
865 if (NULL
== visinfo
) {
866 __glXSendError(dpy
, GLXBadFBConfig
, 0, X_GLXCreateWindow
, false);
870 if (visinfo
->visualid
!= XVisualIDFromVisual(xwattr
.visual
)) {
871 __glXSendError(dpy
, BadMatch
, 0, X_GLXCreateWindow
, true);
879 return CreateDrawable(dpy
, (struct glx_config
*) config
,
880 (Drawable
) win
, attrib_list
, X_GLXCreateWindow
);
886 glXDestroyPixmap(Display
* dpy
, GLXPixmap pixmap
)
888 WARN_ONCE_GLX_1_3(dpy
, __func__
);
889 #ifdef GLX_USE_APPLEGL
890 if (apple_glx_pixmap_destroy(dpy
, pixmap
))
891 __glXSendError(dpy
, GLXBadPixmap
, pixmap
, X_GLXDestroyPixmap
, false);
893 DestroyDrawable(dpy
, (GLXDrawable
) pixmap
, X_GLXDestroyPixmap
);
899 glXDestroyWindow(Display
* dpy
, GLXWindow win
)
901 WARN_ONCE_GLX_1_3(dpy
, __func__
);
902 #ifndef GLX_USE_APPLEGL
903 DestroyDrawable(dpy
, (GLXDrawable
) win
, X_GLXDestroyWindow
);
907 #ifndef GLX_USE_APPLEGL
909 GLX_ALIAS_VOID(glXDestroyGLXPbufferSGIX
,
910 (Display
* dpy
, GLXPbufferSGIX pbuf
),
911 (dpy
, pbuf
), glXDestroyPbuffer
)
914 GLX_ALIAS_VOID(glXSelectEventSGIX
,
915 (Display
* dpy
, GLXDrawable drawable
,
916 unsigned long mask
), (dpy
, drawable
, mask
), glXSelectEvent
)
919 GLX_ALIAS_VOID(glXGetSelectedEventSGIX
,
920 (Display
* dpy
, GLXDrawable drawable
,
921 unsigned long *mask
), (dpy
, drawable
, mask
),