Clone of mesa.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

glx.h 17KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519
  1. /*
  2. * Mesa 3-D graphics library
  3. * Version: 6.5
  4. *
  5. * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
  6. *
  7. * Permission is hereby granted, free of charge, to any person obtaining a
  8. * copy of this software and associated documentation files (the "Software"),
  9. * to deal in the Software without restriction, including without limitation
  10. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  11. * and/or sell copies of the Software, and to permit persons to whom the
  12. * Software is furnished to do so, subject to the following conditions:
  13. *
  14. * The above copyright notice and this permission notice shall be included
  15. * in all copies or substantial portions of the Software.
  16. *
  17. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  18. * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  19. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  20. * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
  21. * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  22. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  23. */
  24. #ifndef GLX_H
  25. #define GLX_H
  26. #ifdef __VMS
  27. #include <GL/vms_x_fix.h>
  28. # ifdef __cplusplus
  29. /* VMS Xlib.h gives problems with C++.
  30. * this avoids a bunch of trivial warnings */
  31. #pragma message disable nosimpint
  32. #endif
  33. #endif
  34. #include <X11/Xlib.h>
  35. #include <X11/Xutil.h>
  36. #ifdef __VMS
  37. # ifdef __cplusplus
  38. #pragma message enable nosimpint
  39. #endif
  40. #endif
  41. #include <GL/gl.h>
  42. #if defined(USE_MGL_NAMESPACE)
  43. #include "glx_mangle.h"
  44. #endif
  45. #ifdef __cplusplus
  46. extern "C" {
  47. #endif
  48. #define GLX_VERSION_1_1 1
  49. #define GLX_VERSION_1_2 1
  50. #define GLX_VERSION_1_3 1
  51. #define GLX_VERSION_1_4 1
  52. #define GLX_EXTENSION_NAME "GLX"
  53. /*
  54. * Tokens for glXChooseVisual and glXGetConfig:
  55. */
  56. #define GLX_USE_GL 1
  57. #define GLX_BUFFER_SIZE 2
  58. #define GLX_LEVEL 3
  59. #define GLX_RGBA 4
  60. #define GLX_DOUBLEBUFFER 5
  61. #define GLX_STEREO 6
  62. #define GLX_AUX_BUFFERS 7
  63. #define GLX_RED_SIZE 8
  64. #define GLX_GREEN_SIZE 9
  65. #define GLX_BLUE_SIZE 10
  66. #define GLX_ALPHA_SIZE 11
  67. #define GLX_DEPTH_SIZE 12
  68. #define GLX_STENCIL_SIZE 13
  69. #define GLX_ACCUM_RED_SIZE 14
  70. #define GLX_ACCUM_GREEN_SIZE 15
  71. #define GLX_ACCUM_BLUE_SIZE 16
  72. #define GLX_ACCUM_ALPHA_SIZE 17
  73. /*
  74. * Error codes returned by glXGetConfig:
  75. */
  76. #define GLX_BAD_SCREEN 1
  77. #define GLX_BAD_ATTRIBUTE 2
  78. #define GLX_NO_EXTENSION 3
  79. #define GLX_BAD_VISUAL 4
  80. #define GLX_BAD_CONTEXT 5
  81. #define GLX_BAD_VALUE 6
  82. #define GLX_BAD_ENUM 7
  83. /*
  84. * GLX 1.1 and later:
  85. */
  86. #define GLX_VENDOR 1
  87. #define GLX_VERSION 2
  88. #define GLX_EXTENSIONS 3
  89. /*
  90. * GLX 1.3 and later:
  91. */
  92. #define GLX_CONFIG_CAVEAT 0x20
  93. #define GLX_DONT_CARE 0xFFFFFFFF
  94. #define GLX_X_VISUAL_TYPE 0x22
  95. #define GLX_TRANSPARENT_TYPE 0x23
  96. #define GLX_TRANSPARENT_INDEX_VALUE 0x24
  97. #define GLX_TRANSPARENT_RED_VALUE 0x25
  98. #define GLX_TRANSPARENT_GREEN_VALUE 0x26
  99. #define GLX_TRANSPARENT_BLUE_VALUE 0x27
  100. #define GLX_TRANSPARENT_ALPHA_VALUE 0x28
  101. #define GLX_WINDOW_BIT 0x00000001
  102. #define GLX_PIXMAP_BIT 0x00000002
  103. #define GLX_PBUFFER_BIT 0x00000004
  104. #define GLX_AUX_BUFFERS_BIT 0x00000010
  105. #define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001
  106. #define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002
  107. #define GLX_BACK_LEFT_BUFFER_BIT 0x00000004
  108. #define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008
  109. #define GLX_DEPTH_BUFFER_BIT 0x00000020
  110. #define GLX_STENCIL_BUFFER_BIT 0x00000040
  111. #define GLX_ACCUM_BUFFER_BIT 0x00000080
  112. #define GLX_NONE 0x8000
  113. #define GLX_SLOW_CONFIG 0x8001
  114. #define GLX_TRUE_COLOR 0x8002
  115. #define GLX_DIRECT_COLOR 0x8003
  116. #define GLX_PSEUDO_COLOR 0x8004
  117. #define GLX_STATIC_COLOR 0x8005
  118. #define GLX_GRAY_SCALE 0x8006
  119. #define GLX_STATIC_GRAY 0x8007
  120. #define GLX_TRANSPARENT_RGB 0x8008
  121. #define GLX_TRANSPARENT_INDEX 0x8009
  122. #define GLX_VISUAL_ID 0x800B
  123. #define GLX_SCREEN 0x800C
  124. #define GLX_NON_CONFORMANT_CONFIG 0x800D
  125. #define GLX_DRAWABLE_TYPE 0x8010
  126. #define GLX_RENDER_TYPE 0x8011
  127. #define GLX_X_RENDERABLE 0x8012
  128. #define GLX_FBCONFIG_ID 0x8013
  129. #define GLX_RGBA_TYPE 0x8014
  130. #define GLX_COLOR_INDEX_TYPE 0x8015
  131. #define GLX_MAX_PBUFFER_WIDTH 0x8016
  132. #define GLX_MAX_PBUFFER_HEIGHT 0x8017
  133. #define GLX_MAX_PBUFFER_PIXELS 0x8018
  134. #define GLX_PRESERVED_CONTENTS 0x801B
  135. #define GLX_LARGEST_PBUFFER 0x801C
  136. #define GLX_WIDTH 0x801D
  137. #define GLX_HEIGHT 0x801E
  138. #define GLX_EVENT_MASK 0x801F
  139. #define GLX_DAMAGED 0x8020
  140. #define GLX_SAVED 0x8021
  141. #define GLX_WINDOW 0x8022
  142. #define GLX_PBUFFER 0x8023
  143. #define GLX_PBUFFER_HEIGHT 0x8040
  144. #define GLX_PBUFFER_WIDTH 0x8041
  145. #define GLX_RGBA_BIT 0x00000001
  146. #define GLX_COLOR_INDEX_BIT 0x00000002
  147. #define GLX_PBUFFER_CLOBBER_MASK 0x08000000
  148. /*
  149. * GLX 1.4 and later:
  150. */
  151. #define GLX_SAMPLE_BUFFERS 0x186a0 /*100000*/
  152. #define GLX_SAMPLES 0x186a1 /*100001*/
  153. typedef struct __GLXcontextRec *GLXContext;
  154. typedef XID GLXPixmap;
  155. typedef XID GLXDrawable;
  156. /* GLX 1.3 and later */
  157. typedef struct __GLXFBConfigRec *GLXFBConfig;
  158. typedef XID GLXFBConfigID;
  159. typedef XID GLXContextID;
  160. typedef XID GLXWindow;
  161. typedef XID GLXPbuffer;
  162. extern XVisualInfo* glXChooseVisual( Display *dpy, int screen,
  163. int *attribList );
  164. extern GLXContext glXCreateContext( Display *dpy, XVisualInfo *vis,
  165. GLXContext shareList, Bool direct );
  166. extern void glXDestroyContext( Display *dpy, GLXContext ctx );
  167. extern Bool glXMakeCurrent( Display *dpy, GLXDrawable drawable,
  168. GLXContext ctx);
  169. extern void glXCopyContext( Display *dpy, GLXContext src, GLXContext dst,
  170. unsigned long mask );
  171. extern void glXSwapBuffers( Display *dpy, GLXDrawable drawable );
  172. extern GLXPixmap glXCreateGLXPixmap( Display *dpy, XVisualInfo *visual,
  173. Pixmap pixmap );
  174. extern void glXDestroyGLXPixmap( Display *dpy, GLXPixmap pixmap );
  175. extern Bool glXQueryExtension( Display *dpy, int *errorb, int *event );
  176. extern Bool glXQueryVersion( Display *dpy, int *maj, int *min );
  177. extern Bool glXIsDirect( Display *dpy, GLXContext ctx );
  178. extern int glXGetConfig( Display *dpy, XVisualInfo *visual,
  179. int attrib, int *value );
  180. extern GLXContext glXGetCurrentContext( void );
  181. extern GLXDrawable glXGetCurrentDrawable( void );
  182. extern void glXWaitGL( void );
  183. extern void glXWaitX( void );
  184. extern void glXUseXFont( Font font, int first, int count, int list );
  185. /* GLX 1.1 and later */
  186. extern const char *glXQueryExtensionsString( Display *dpy, int screen );
  187. extern const char *glXQueryServerString( Display *dpy, int screen, int name );
  188. extern const char *glXGetClientString( Display *dpy, int name );
  189. /* GLX 1.2 and later */
  190. extern Display *glXGetCurrentDisplay( void );
  191. /* GLX 1.3 and later */
  192. extern GLXFBConfig *glXChooseFBConfig( Display *dpy, int screen,
  193. const int *attribList, int *nitems );
  194. extern int glXGetFBConfigAttrib( Display *dpy, GLXFBConfig config,
  195. int attribute, int *value );
  196. extern GLXFBConfig *glXGetFBConfigs( Display *dpy, int screen,
  197. int *nelements );
  198. extern XVisualInfo *glXGetVisualFromFBConfig( Display *dpy,
  199. GLXFBConfig config );
  200. extern GLXWindow glXCreateWindow( Display *dpy, GLXFBConfig config,
  201. Window win, const int *attribList );
  202. extern void glXDestroyWindow( Display *dpy, GLXWindow window );
  203. extern GLXPixmap glXCreatePixmap( Display *dpy, GLXFBConfig config,
  204. Pixmap pixmap, const int *attribList );
  205. extern void glXDestroyPixmap( Display *dpy, GLXPixmap pixmap );
  206. extern GLXPbuffer glXCreatePbuffer( Display *dpy, GLXFBConfig config,
  207. const int *attribList );
  208. extern void glXDestroyPbuffer( Display *dpy, GLXPbuffer pbuf );
  209. extern void glXQueryDrawable( Display *dpy, GLXDrawable draw, int attribute,
  210. unsigned int *value );
  211. extern GLXContext glXCreateNewContext( Display *dpy, GLXFBConfig config,
  212. int renderType, GLXContext shareList,
  213. Bool direct );
  214. extern Bool glXMakeContextCurrent( Display *dpy, GLXDrawable draw,
  215. GLXDrawable read, GLXContext ctx );
  216. extern GLXDrawable glXGetCurrentReadDrawable( void );
  217. extern int glXQueryContext( Display *dpy, GLXContext ctx, int attribute,
  218. int *value );
  219. extern void glXSelectEvent( Display *dpy, GLXDrawable drawable,
  220. unsigned long mask );
  221. extern void glXGetSelectedEvent( Display *dpy, GLXDrawable drawable,
  222. unsigned long *mask );
  223. /* GLX 1.3 function pointer typedefs */
  224. typedef GLXFBConfig * (* PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements);
  225. typedef GLXFBConfig * (* PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements);
  226. typedef int (* PFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value);
  227. typedef XVisualInfo * (* PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config);
  228. typedef GLXWindow (* PFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list);
  229. typedef void (* PFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win);
  230. typedef GLXPixmap (* PFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list);
  231. typedef void (* PFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap);
  232. typedef GLXPbuffer (* PFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list);
  233. typedef void (* PFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf);
  234. typedef void (* PFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
  235. typedef GLXContext (* PFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
  236. typedef Bool (* PFNGLXMAKECONTEXTCURRENTPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
  237. typedef GLXDrawable (* PFNGLXGETCURRENTREADDRAWABLEPROC) (void);
  238. typedef Display * (* PFNGLXGETCURRENTDISPLAYPROC) (void);
  239. typedef int (* PFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value);
  240. typedef void (* PFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask);
  241. typedef void (* PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
  242. /*
  243. * ARB 2. GLX_ARB_get_proc_address
  244. */
  245. #ifndef GLX_ARB_get_proc_address
  246. #define GLX_ARB_get_proc_address 1
  247. typedef void (*__GLXextFuncPtr)(void);
  248. extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *);
  249. #endif /* GLX_ARB_get_proc_address */
  250. /* GLX 1.4 and later */
  251. extern void (*glXGetProcAddress(const GLubyte *procname))( void );
  252. /* GLX 1.4 function pointer typedefs */
  253. typedef __GLXextFuncPtr (* PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName);
  254. #ifndef GLX_GLXEXT_LEGACY
  255. #include <GL/glxext.h>
  256. #endif /* GLX_GLXEXT_LEGACY */
  257. /**
  258. ** The following aren't in glxext.h yet.
  259. **/
  260. /*
  261. * ???. GLX_NV_vertex_array_range
  262. */
  263. #ifndef GLX_NV_vertex_array_range
  264. #define GLX_NV_vertex_array_range
  265. extern void *glXAllocateMemoryNV(GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
  266. extern void glXFreeMemoryNV(GLvoid *pointer);
  267. typedef void * ( * PFNGLXALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
  268. typedef void ( * PFNGLXFREEMEMORYNVPROC) (GLvoid *pointer);
  269. #endif /* GLX_NV_vertex_array_range */
  270. /*
  271. * ???. GLX_MESA_allocate_memory
  272. */
  273. #ifndef GLX_MESA_allocate_memory
  274. #define GLX_MESA_allocate_memory 1
  275. extern void *glXAllocateMemoryMESA(Display *dpy, int scrn, size_t size, float readfreq, float writefreq, float priority);
  276. extern void glXFreeMemoryMESA(Display *dpy, int scrn, void *pointer);
  277. extern GLuint glXGetMemoryOffsetMESA(Display *dpy, int scrn, const void *pointer);
  278. typedef void * ( * PFNGLXALLOCATEMEMORYMESAPROC) (Display *dpy, int scrn, size_t size, float readfreq, float writefreq, float priority);
  279. typedef void ( * PFNGLXFREEMEMORYMESAPROC) (Display *dpy, int scrn, void *pointer);
  280. typedef GLuint (* PFNGLXGETMEMORYOFFSETMESAPROC) (Display *dpy, int scrn, const void *pointer);
  281. #endif /* GLX_MESA_allocate_memory */
  282. /*
  283. * ARB ?. GLX_ARB_render_texture
  284. * XXX This was never finalized!
  285. */
  286. #ifndef GLX_ARB_render_texture
  287. #define GLX_ARB_render_texture 1
  288. extern Bool glXBindTexImageARB(Display *dpy, GLXPbuffer pbuffer, int buffer);
  289. extern Bool glXReleaseTexImageARB(Display *dpy, GLXPbuffer pbuffer, int buffer);
  290. extern Bool glXDrawableAttribARB(Display *dpy, GLXDrawable draw, const int *attribList);
  291. #endif /* GLX_ARB_render_texture */
  292. /*
  293. * Remove this when glxext.h is updated.
  294. */
  295. #ifndef GLX_NV_float_buffer
  296. #define GLX_NV_float_buffer 1
  297. #define GLX_FLOAT_COMPONENTS_NV 0x20B0
  298. #endif /* GLX_NV_float_buffer */
  299. /*
  300. * #?. GLX_MESA_swap_frame_usage
  301. */
  302. #ifndef GLX_MESA_swap_frame_usage
  303. #define GLX_MESA_swap_frame_usage 1
  304. extern int glXGetFrameUsageMESA(Display *dpy, GLXDrawable drawable, float *usage);
  305. extern int glXBeginFrameTrackingMESA(Display *dpy, GLXDrawable drawable);
  306. extern int glXEndFrameTrackingMESA(Display *dpy, GLXDrawable drawable);
  307. extern int glXQueryFrameTrackingMESA(Display *dpy, GLXDrawable drawable, int64_t *swapCount, int64_t *missedFrames, float *lastMissedUsage);
  308. typedef int (*PFNGLXGETFRAMEUSAGEMESAPROC) (Display *dpy, GLXDrawable drawable, float *usage);
  309. typedef int (*PFNGLXBEGINFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable);
  310. typedef int (*PFNGLXENDFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable);
  311. typedef int (*PFNGLXQUERYFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable, int64_t *swapCount, int64_t *missedFrames, float *lastMissedUsage);
  312. #endif /* GLX_MESA_swap_frame_usage */
  313. /*
  314. * #?. GLX_MESA_swap_control
  315. */
  316. #ifndef GLX_MESA_swap_control
  317. #define GLX_MESA_swap_control 1
  318. extern int glXSwapIntervalMESA(unsigned int interval);
  319. extern int glXGetSwapIntervalMESA(void);
  320. typedef int (*PFNGLXSWAPINTERVALMESAPROC)(unsigned int interval);
  321. typedef int (*PFNGLXGETSWAPINTERVALMESAPROC)(void);
  322. #endif /* GLX_MESA_swap_control */
  323. /*
  324. * #?. GLX_EXT_texture_from_pixmap
  325. * XXX not finished?
  326. */
  327. #ifndef GLX_EXT_texture_from_pixmap
  328. #define GLX_EXT_texture_from_pixmap 1
  329. #define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0
  330. #define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1
  331. #define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2
  332. #define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3
  333. #define GLX_Y_INVERTED_EXT 0x20D4
  334. #define GLX_TEXTURE_FORMAT_EXT 0x20D5
  335. #define GLX_TEXTURE_TARGET_EXT 0x20D6
  336. #define GLX_MIPMAP_TEXTURE_EXT 0x20D7
  337. #define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8
  338. #define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9
  339. #define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA
  340. #define GLX_TEXTURE_1D_BIT_EXT 0x00000001
  341. #define GLX_TEXTURE_2D_BIT_EXT 0x00000002
  342. #define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
  343. #define GLX_TEXTURE_1D_EXT 0x20DB
  344. #define GLX_TEXTURE_2D_EXT 0x20DC
  345. #define GLX_TEXTURE_RECTANGLE_EXT 0x20DD
  346. #define GLX_FRONT_LEFT_EXT 0x20DE
  347. #define GLX_FRONT_RIGHT_EXT 0x20DF
  348. #define GLX_BACK_LEFT_EXT 0x20E0
  349. #define GLX_BACK_RIGHT_EXT 0x20E1
  350. #define GLX_FRONT_EXT GLX_FRONT_LEFT_EXT
  351. #define GLX_BACK_EXT GLX_BACK_LEFT_EXT
  352. #define GLX_AUX0_EXT 0x20E2
  353. #define GLX_AUX1_EXT 0x20E3
  354. #define GLX_AUX2_EXT 0x20E4
  355. #define GLX_AUX3_EXT 0x20E5
  356. #define GLX_AUX4_EXT 0x20E6
  357. #define GLX_AUX5_EXT 0x20E7
  358. #define GLX_AUX6_EXT 0x20E8
  359. #define GLX_AUX7_EXT 0x20E9
  360. #define GLX_AUX8_EXT 0x20EA
  361. #define GLX_AUX9_EXT 0x20EB
  362. extern void glXBindTexImageEXT(Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list);
  363. extern void glXReleaseTexImageEXT(Display *dpy, GLXDrawable drawable, int buffer);
  364. #endif /* GLX_EXT_texture_from_pixmap */
  365. /*** Should these go here, or in another header? */
  366. /*
  367. ** GLX Events
  368. */
  369. typedef struct {
  370. int event_type; /* GLX_DAMAGED or GLX_SAVED */
  371. int draw_type; /* GLX_WINDOW or GLX_PBUFFER */
  372. unsigned long serial; /* # of last request processed by server */
  373. Bool send_event; /* true if this came for SendEvent request */
  374. Display *display; /* display the event was read from */
  375. GLXDrawable drawable; /* XID of Drawable */
  376. unsigned int buffer_mask; /* mask indicating which buffers are affected */
  377. unsigned int aux_buffer; /* which aux buffer was affected */
  378. int x, y;
  379. int width, height;
  380. int count; /* if nonzero, at least this many more */
  381. } GLXPbufferClobberEvent;
  382. typedef union __GLXEvent {
  383. GLXPbufferClobberEvent glxpbufferclobber;
  384. long pad[24];
  385. } GLXEvent;
  386. #ifdef __cplusplus
  387. }
  388. #endif
  389. #endif