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.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693
  1. #ifndef __glxext_h_
  2. #define __glxext_h_
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. /*
  7. ** License Applicability. Except to the extent portions of this file are
  8. ** made subject to an alternative license as permitted in the SGI Free
  9. ** Software License B, Version 1.1 (the "License"), the contents of this
  10. ** file are subject only to the provisions of the License. You may not use
  11. ** this file except in compliance with the License. You may obtain a copy
  12. ** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
  13. ** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
  14. **
  15. ** http://oss.sgi.com/projects/FreeB
  16. **
  17. ** Note that, as provided in the License, the Software is distributed on an
  18. ** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
  19. ** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
  20. ** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
  21. ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
  22. **
  23. ** Original Code. The Original Code is: OpenGL Sample Implementation,
  24. ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
  25. ** Inc. The Original Code is Copyright (c) 1991-2004 Silicon Graphics, Inc.
  26. ** Copyright in any portions created by third parties is as indicated
  27. ** elsewhere herein. All Rights Reserved.
  28. **
  29. ** Additional Notice Provisions: This software was created using the
  30. ** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has
  31. ** not been independently verified as being compliant with the OpenGL(R)
  32. ** version 1.2.1 Specification.
  33. */
  34. #if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
  35. #define WIN32_LEAN_AND_MEAN 1
  36. #include <windows.h>
  37. #endif
  38. #ifndef APIENTRY
  39. #define APIENTRY
  40. #endif
  41. #ifndef APIENTRYP
  42. #define APIENTRYP APIENTRY *
  43. #endif
  44. #ifndef GLAPI
  45. #define GLAPI extern
  46. #endif
  47. /*************************************************************/
  48. /* Header file version number, required by OpenGL ABI for Linux */
  49. /* glxext.h last updated 2004/07/26 */
  50. /* Current version at http://oss.sgi.com/projects/ogl-sample/registry/ */
  51. #define GLX_GLXEXT_VERSION 6
  52. #ifndef GLX_VERSION_1_3
  53. #define GLX_WINDOW_BIT 0x00000001
  54. #define GLX_PIXMAP_BIT 0x00000002
  55. #define GLX_PBUFFER_BIT 0x00000004
  56. #define GLX_RGBA_BIT 0x00000001
  57. #define GLX_COLOR_INDEX_BIT 0x00000002
  58. #define GLX_PBUFFER_CLOBBER_MASK 0x08000000
  59. #define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001
  60. #define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002
  61. #define GLX_BACK_LEFT_BUFFER_BIT 0x00000004
  62. #define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008
  63. #define GLX_AUX_BUFFERS_BIT 0x00000010
  64. #define GLX_DEPTH_BUFFER_BIT 0x00000020
  65. #define GLX_STENCIL_BUFFER_BIT 0x00000040
  66. #define GLX_ACCUM_BUFFER_BIT 0x00000080
  67. #define GLX_CONFIG_CAVEAT 0x20
  68. #define GLX_X_VISUAL_TYPE 0x22
  69. #define GLX_TRANSPARENT_TYPE 0x23
  70. #define GLX_TRANSPARENT_INDEX_VALUE 0x24
  71. #define GLX_TRANSPARENT_RED_VALUE 0x25
  72. #define GLX_TRANSPARENT_GREEN_VALUE 0x26
  73. #define GLX_TRANSPARENT_BLUE_VALUE 0x27
  74. #define GLX_TRANSPARENT_ALPHA_VALUE 0x28
  75. #define GLX_DONT_CARE 0xFFFFFFFF
  76. #define GLX_NONE 0x8000
  77. #define GLX_SLOW_CONFIG 0x8001
  78. #define GLX_TRUE_COLOR 0x8002
  79. #define GLX_DIRECT_COLOR 0x8003
  80. #define GLX_PSEUDO_COLOR 0x8004
  81. #define GLX_STATIC_COLOR 0x8005
  82. #define GLX_GRAY_SCALE 0x8006
  83. #define GLX_STATIC_GRAY 0x8007
  84. #define GLX_TRANSPARENT_RGB 0x8008
  85. #define GLX_TRANSPARENT_INDEX 0x8009
  86. #define GLX_VISUAL_ID 0x800B
  87. #define GLX_SCREEN 0x800C
  88. #define GLX_NON_CONFORMANT_CONFIG 0x800D
  89. #define GLX_DRAWABLE_TYPE 0x8010
  90. #define GLX_RENDER_TYPE 0x8011
  91. #define GLX_X_RENDERABLE 0x8012
  92. #define GLX_FBCONFIG_ID 0x8013
  93. #define GLX_RGBA_TYPE 0x8014
  94. #define GLX_COLOR_INDEX_TYPE 0x8015
  95. #define GLX_MAX_PBUFFER_WIDTH 0x8016
  96. #define GLX_MAX_PBUFFER_HEIGHT 0x8017
  97. #define GLX_MAX_PBUFFER_PIXELS 0x8018
  98. #define GLX_PRESERVED_CONTENTS 0x801B
  99. #define GLX_LARGEST_PBUFFER 0x801C
  100. #define GLX_WIDTH 0x801D
  101. #define GLX_HEIGHT 0x801E
  102. #define GLX_EVENT_MASK 0x801F
  103. #define GLX_DAMAGED 0x8020
  104. #define GLX_SAVED 0x8021
  105. #define GLX_WINDOW 0x8022
  106. #define GLX_PBUFFER 0x8023
  107. #define GLX_PBUFFER_HEIGHT 0x8040
  108. #define GLX_PBUFFER_WIDTH 0x8041
  109. #endif
  110. #ifndef GLX_VERSION_1_4
  111. #define GLX_SAMPLE_BUFFERS 100000
  112. #define GLX_SAMPLES 100001
  113. #endif
  114. #ifndef GLX_ARB_get_proc_address
  115. #endif
  116. #ifndef GLX_ARB_multisample
  117. #define GLX_SAMPLE_BUFFERS_ARB 100000
  118. #define GLX_SAMPLES_ARB 100001
  119. #endif
  120. #ifndef GLX_SGIS_multisample
  121. #define GLX_SAMPLE_BUFFERS_SGIS 100000
  122. #define GLX_SAMPLES_SGIS 100001
  123. #endif
  124. #ifndef GLX_EXT_visual_info
  125. #define GLX_X_VISUAL_TYPE_EXT 0x22
  126. #define GLX_TRANSPARENT_TYPE_EXT 0x23
  127. #define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24
  128. #define GLX_TRANSPARENT_RED_VALUE_EXT 0x25
  129. #define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26
  130. #define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27
  131. #define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28
  132. #define GLX_NONE_EXT 0x8000
  133. #define GLX_TRUE_COLOR_EXT 0x8002
  134. #define GLX_DIRECT_COLOR_EXT 0x8003
  135. #define GLX_PSEUDO_COLOR_EXT 0x8004
  136. #define GLX_STATIC_COLOR_EXT 0x8005
  137. #define GLX_GRAY_SCALE_EXT 0x8006
  138. #define GLX_STATIC_GRAY_EXT 0x8007
  139. #define GLX_TRANSPARENT_RGB_EXT 0x8008
  140. #define GLX_TRANSPARENT_INDEX_EXT 0x8009
  141. #endif
  142. #ifndef GLX_SGI_swap_control
  143. #endif
  144. #ifndef GLX_SGI_video_sync
  145. #endif
  146. #ifndef GLX_SGI_make_current_read
  147. #endif
  148. #ifndef GLX_SGIX_video_source
  149. #endif
  150. #ifndef GLX_EXT_visual_rating
  151. #define GLX_VISUAL_CAVEAT_EXT 0x20
  152. #define GLX_SLOW_VISUAL_EXT 0x8001
  153. #define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D
  154. /* reuse GLX_NONE_EXT */
  155. #endif
  156. #ifndef GLX_EXT_import_context
  157. #define GLX_SHARE_CONTEXT_EXT 0x800A
  158. #define GLX_VISUAL_ID_EXT 0x800B
  159. #define GLX_SCREEN_EXT 0x800C
  160. #endif
  161. #ifndef GLX_SGIX_fbconfig
  162. #define GLX_WINDOW_BIT_SGIX 0x00000001
  163. #define GLX_PIXMAP_BIT_SGIX 0x00000002
  164. #define GLX_RGBA_BIT_SGIX 0x00000001
  165. #define GLX_COLOR_INDEX_BIT_SGIX 0x00000002
  166. #define GLX_DRAWABLE_TYPE_SGIX 0x8010
  167. #define GLX_RENDER_TYPE_SGIX 0x8011
  168. #define GLX_X_RENDERABLE_SGIX 0x8012
  169. #define GLX_FBCONFIG_ID_SGIX 0x8013
  170. #define GLX_RGBA_TYPE_SGIX 0x8014
  171. #define GLX_COLOR_INDEX_TYPE_SGIX 0x8015
  172. /* reuse GLX_SCREEN_EXT */
  173. #endif
  174. #ifndef GLX_SGIX_pbuffer
  175. #define GLX_PBUFFER_BIT_SGIX 0x00000004
  176. #define GLX_BUFFER_CLOBBER_MASK_SGIX 0x08000000
  177. #define GLX_FRONT_LEFT_BUFFER_BIT_SGIX 0x00000001
  178. #define GLX_FRONT_RIGHT_BUFFER_BIT_SGIX 0x00000002
  179. #define GLX_BACK_LEFT_BUFFER_BIT_SGIX 0x00000004
  180. #define GLX_BACK_RIGHT_BUFFER_BIT_SGIX 0x00000008
  181. #define GLX_AUX_BUFFERS_BIT_SGIX 0x00000010
  182. #define GLX_DEPTH_BUFFER_BIT_SGIX 0x00000020
  183. #define GLX_STENCIL_BUFFER_BIT_SGIX 0x00000040
  184. #define GLX_ACCUM_BUFFER_BIT_SGIX 0x00000080
  185. #define GLX_SAMPLE_BUFFERS_BIT_SGIX 0x00000100
  186. #define GLX_MAX_PBUFFER_WIDTH_SGIX 0x8016
  187. #define GLX_MAX_PBUFFER_HEIGHT_SGIX 0x8017
  188. #define GLX_MAX_PBUFFER_PIXELS_SGIX 0x8018
  189. #define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019
  190. #define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A
  191. #define GLX_PRESERVED_CONTENTS_SGIX 0x801B
  192. #define GLX_LARGEST_PBUFFER_SGIX 0x801C
  193. #define GLX_WIDTH_SGIX 0x801D
  194. #define GLX_HEIGHT_SGIX 0x801E
  195. #define GLX_EVENT_MASK_SGIX 0x801F
  196. #define GLX_DAMAGED_SGIX 0x8020
  197. #define GLX_SAVED_SGIX 0x8021
  198. #define GLX_WINDOW_SGIX 0x8022
  199. #define GLX_PBUFFER_SGIX 0x8023
  200. #endif
  201. #ifndef GLX_SGI_cushion
  202. #endif
  203. #ifndef GLX_SGIX_video_resize
  204. #define GLX_SYNC_FRAME_SGIX 0x00000000
  205. #define GLX_SYNC_SWAP_SGIX 0x00000001
  206. #endif
  207. #ifndef GLX_SGIX_dmbuffer
  208. #define GLX_DIGITAL_MEDIA_PBUFFER_SGIX 0x8024
  209. #endif
  210. #ifndef GLX_SGIX_swap_group
  211. #endif
  212. #ifndef GLX_SGIX_swap_barrier
  213. #endif
  214. #ifndef GLX_SGIS_blended_overlay
  215. #define GLX_BLENDED_RGBA_SGIS 0x8025
  216. #endif
  217. #ifndef GLX_SGIS_shared_multisample
  218. #define GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS 0x8026
  219. #define GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS 0x8027
  220. #endif
  221. #ifndef GLX_SUN_get_transparent_index
  222. #endif
  223. #ifndef GLX_3DFX_multisample
  224. #define GLX_SAMPLE_BUFFERS_3DFX 0x8050
  225. #define GLX_SAMPLES_3DFX 0x8051
  226. #endif
  227. #ifndef GLX_MESA_copy_sub_buffer
  228. #endif
  229. #ifndef GLX_MESA_pixmap_colormap
  230. #endif
  231. #ifndef GLX_MESA_release_buffers
  232. #endif
  233. #ifndef GLX_MESA_set_3dfx_mode
  234. #define GLX_3DFX_WINDOW_MODE_MESA 0x1
  235. #define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2
  236. #endif
  237. #ifndef GLX_SGIX_visual_select_group
  238. #define GLX_VISUAL_SELECT_GROUP_SGIX 0x8028
  239. #endif
  240. #ifndef GLX_OML_swap_method
  241. #define GLX_SWAP_METHOD_OML 0x8060
  242. #define GLX_SWAP_EXCHANGE_OML 0x8061
  243. #define GLX_SWAP_COPY_OML 0x8062
  244. #define GLX_SWAP_UNDEFINED_OML 0x8063
  245. #endif
  246. #ifndef GLX_OML_sync_control
  247. #endif
  248. #ifndef GLX_SGIX_hyperpipe_group
  249. #define GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX 80
  250. #define GLX_BAD_HYPERPIPE_CONFIG_SGIX 91
  251. #define GLX_BAD_HYPERPIPE_SGIX 92
  252. #define GLX_HYPERPIPE_DISPLAY_PIPE_SGIX 0x00000001
  253. #define GLX_HYPERPIPE_RENDER_PIPE_SGIX 0x00000002
  254. #define GLX_PIPE_RECT_SGIX 0x00000001
  255. #define GLX_PIPE_RECT_LIMITS_SGIX 0x00000002
  256. #define GLX_HYPERPIPE_STEREO_SGIX 0x00000003
  257. #define GLX_HYPERPIPE_PIXEL_AVERAGE_SGIX 0x00000004
  258. #define GLX_HYPERPIPE_ID_SGIX 0x8030
  259. #endif
  260. #ifndef GLX_MESA_agp_offset
  261. #endif
  262. /*************************************************************/
  263. #ifndef GLX_ARB_get_proc_address
  264. typedef void (*__GLXextFuncPtr)(void);
  265. #endif
  266. #ifndef GLX_SGIX_video_source
  267. typedef XID GLXVideoSourceSGIX;
  268. #endif
  269. #ifndef GLX_SGIX_fbconfig
  270. typedef XID GLXFBConfigIDSGIX;
  271. typedef struct __GLXFBConfigRec *GLXFBConfigSGIX;
  272. #endif
  273. #ifndef GLX_SGIX_pbuffer
  274. typedef XID GLXPbufferSGIX;
  275. typedef struct {
  276. int type;
  277. unsigned long serial; /* # of last request processed by server */
  278. Bool send_event; /* true if this came for SendEvent request */
  279. Display *display; /* display the event was read from */
  280. GLXDrawable drawable; /* i.d. of Drawable */
  281. int event_type; /* GLX_DAMAGED_SGIX or GLX_SAVED_SGIX */
  282. int draw_type; /* GLX_WINDOW_SGIX or GLX_PBUFFER_SGIX */
  283. unsigned int mask; /* mask indicating which buffers are affected*/
  284. int x, y;
  285. int width, height;
  286. int count; /* if nonzero, at least this many more */
  287. } GLXBufferClobberEventSGIX;
  288. #endif
  289. #if defined(__sun__) || defined(__osf__)
  290. #include <inttypes.h>
  291. #if defined(__STDC__)
  292. #if defined(__arch64__)
  293. typedef long int int64_t;
  294. #else
  295. typedef long long int int64_t;
  296. #endif /* __arch64__ */
  297. #endif /* __STDC__ */
  298. #elif defined(__UNIXOS2__) || defined(__SOL64__)
  299. typedef long int int32_t;
  300. typedef long long int int64_t;
  301. #elif defined( __VMS )
  302. #include <inttypes.h>
  303. #elif defined(__SCO__) || defined(__USLC__)
  304. #include <stdint.h>
  305. #elif defined(WIN32) && defined(__GNUC__)
  306. #include <stdint.h>
  307. #endif
  308. #ifndef GLX_VERSION_1_3
  309. #define GLX_VERSION_1_3 1
  310. #ifdef GLX_GLXEXT_PROTOTYPES
  311. extern GLXFBConfig * glXGetFBConfigs (Display *, int, int *);
  312. extern GLXFBConfig * glXChooseFBConfig (Display *, int, const int *, int *);
  313. extern int glXGetFBConfigAttrib (Display *, GLXFBConfig, int, int *);
  314. extern XVisualInfo * glXGetVisualFromFBConfig (Display *, GLXFBConfig);
  315. extern GLXWindow glXCreateWindow (Display *, GLXFBConfig, Window, const int *);
  316. extern void glXDestroyWindow (Display *, GLXWindow);
  317. extern GLXPixmap glXCreatePixmap (Display *, GLXFBConfig, Pixmap, const int *);
  318. extern void glXDestroyPixmap (Display *, GLXPixmap);
  319. extern GLXPbuffer glXCreatePbuffer (Display *, GLXFBConfig, const int *);
  320. extern void glXDestroyPbuffer (Display *, GLXPbuffer);
  321. extern void glXQueryDrawable (Display *, GLXDrawable, int, unsigned int *);
  322. extern GLXContext glXCreateNewContext (Display *, GLXFBConfig, int, GLXContext, Bool);
  323. extern Bool glXMakeContextCurrent (Display *, GLXDrawable, GLXDrawable, GLXContext);
  324. extern GLXDrawable glXGetCurrentReadDrawable (void);
  325. extern Display * glXGetCurrentDisplay (void);
  326. extern int glXQueryContext (Display *, GLXContext, int, int *);
  327. extern void glXSelectEvent (Display *, GLXDrawable, unsigned long);
  328. extern void glXGetSelectedEvent (Display *, GLXDrawable, unsigned long *);
  329. #endif /* GLX_GLXEXT_PROTOTYPES */
  330. typedef GLXFBConfig * ( * PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements);
  331. typedef GLXFBConfig * ( * PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements);
  332. typedef int ( * PFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value);
  333. typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config);
  334. typedef GLXWindow ( * PFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list);
  335. typedef void ( * PFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win);
  336. typedef GLXPixmap ( * PFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list);
  337. typedef void ( * PFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap);
  338. typedef GLXPbuffer ( * PFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list);
  339. typedef void ( * PFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf);
  340. typedef void ( * PFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
  341. typedef GLXContext ( * PFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
  342. typedef Bool ( * PFNGLXMAKECONTEXTCURRENTPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
  343. typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLEPROC) (void);
  344. typedef Display * ( * PFNGLXGETCURRENTDISPLAYPROC) (void);
  345. typedef int ( * PFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value);
  346. typedef void ( * PFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask);
  347. typedef void ( * PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
  348. #endif
  349. #ifndef GLX_VERSION_1_4
  350. #define GLX_VERSION_1_4 1
  351. #ifdef GLX_GLXEXT_PROTOTYPES
  352. extern __GLXextFuncPtr glXGetProcAddress (const GLubyte *);
  353. #endif /* GLX_GLXEXT_PROTOTYPES */
  354. typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName);
  355. #endif
  356. #ifndef GLX_ARB_get_proc_address
  357. #define GLX_ARB_get_proc_address 1
  358. #ifdef GLX_GLXEXT_PROTOTYPES
  359. extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *);
  360. #endif /* GLX_GLXEXT_PROTOTYPES */
  361. typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procName);
  362. #endif
  363. #ifndef GLX_ARB_multisample
  364. #define GLX_ARB_multisample 1
  365. #endif
  366. #ifndef GLX_SGIS_multisample
  367. #define GLX_SGIS_multisample 1
  368. #endif
  369. #ifndef GLX_EXT_visual_info
  370. #define GLX_EXT_visual_info 1
  371. #endif
  372. #ifndef GLX_SGI_swap_control
  373. #define GLX_SGI_swap_control 1
  374. #ifdef GLX_GLXEXT_PROTOTYPES
  375. extern int glXSwapIntervalSGI (int);
  376. #endif /* GLX_GLXEXT_PROTOTYPES */
  377. typedef int ( * PFNGLXSWAPINTERVALSGIPROC) (int interval);
  378. #endif
  379. #ifndef GLX_SGI_video_sync
  380. #define GLX_SGI_video_sync 1
  381. #ifdef GLX_GLXEXT_PROTOTYPES
  382. extern int glXGetVideoSyncSGI (unsigned int *);
  383. extern int glXWaitVideoSyncSGI (int, int, unsigned int *);
  384. #endif /* GLX_GLXEXT_PROTOTYPES */
  385. typedef int ( * PFNGLXGETVIDEOSYNCSGIPROC) (unsigned int *count);
  386. typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int *count);
  387. #endif
  388. #ifndef GLX_SGI_make_current_read
  389. #define GLX_SGI_make_current_read 1
  390. #ifdef GLX_GLXEXT_PROTOTYPES
  391. extern Bool glXMakeCurrentReadSGI (Display *, GLXDrawable, GLXDrawable, GLXContext);
  392. extern GLXDrawable glXGetCurrentReadDrawableSGI (void);
  393. #endif /* GLX_GLXEXT_PROTOTYPES */
  394. typedef Bool ( * PFNGLXMAKECURRENTREADSGIPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
  395. typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLESGIPROC) (void);
  396. #endif
  397. #ifndef GLX_SGIX_video_source
  398. #define GLX_SGIX_video_source 1
  399. #ifdef _VL_H
  400. #ifdef GLX_GLXEXT_PROTOTYPES
  401. extern GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX (Display *, int, VLServer, VLPath, int, VLNode);
  402. extern void glXDestroyGLXVideoSourceSGIX (Display *, GLXVideoSourceSGIX);
  403. #endif /* GLX_GLXEXT_PROTOTYPES */
  404. typedef GLXVideoSourceSGIX ( * PFNGLXCREATEGLXVIDEOSOURCESGIXPROC) (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode);
  405. typedef void ( * PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC) (Display *dpy, GLXVideoSourceSGIX glxvideosource);
  406. #endif /* _VL_H */
  407. #endif
  408. #ifndef GLX_EXT_visual_rating
  409. #define GLX_EXT_visual_rating 1
  410. #endif
  411. #ifndef GLX_EXT_import_context
  412. #define GLX_EXT_import_context 1
  413. #ifdef GLX_GLXEXT_PROTOTYPES
  414. extern Display * glXGetCurrentDisplayEXT (void);
  415. extern int glXQueryContextInfoEXT (Display *, GLXContext, int, int *);
  416. extern GLXContextID glXGetContextIDEXT (const GLXContext);
  417. extern GLXContext glXImportContextEXT (Display *, GLXContextID);
  418. extern void glXFreeContextEXT (Display *, GLXContext);
  419. #endif /* GLX_GLXEXT_PROTOTYPES */
  420. typedef Display * ( * PFNGLXGETCURRENTDISPLAYEXTPROC) (void);
  421. typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC) (Display *dpy, GLXContext context, int attribute, int *value);
  422. typedef GLXContextID ( * PFNGLXGETCONTEXTIDEXTPROC) (const GLXContext context);
  423. typedef GLXContext ( * PFNGLXIMPORTCONTEXTEXTPROC) (Display *dpy, GLXContextID contextID);
  424. typedef void ( * PFNGLXFREECONTEXTEXTPROC) (Display *dpy, GLXContext context);
  425. #endif
  426. #ifndef GLX_SGIX_fbconfig
  427. #define GLX_SGIX_fbconfig 1
  428. #ifdef GLX_GLXEXT_PROTOTYPES
  429. extern int glXGetFBConfigAttribSGIX (Display *, GLXFBConfigSGIX, int, int *);
  430. extern GLXFBConfigSGIX * glXChooseFBConfigSGIX (Display *, int, int *, int *);
  431. extern GLXPixmap glXCreateGLXPixmapWithConfigSGIX (Display *, GLXFBConfigSGIX, Pixmap);
  432. extern GLXContext glXCreateContextWithConfigSGIX (Display *, GLXFBConfigSGIX, int, GLXContext, Bool);
  433. extern XVisualInfo * glXGetVisualFromFBConfigSGIX (Display *, GLXFBConfigSGIX);
  434. extern GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX (Display *, XVisualInfo *);
  435. #endif /* GLX_GLXEXT_PROTOTYPES */
  436. typedef int ( * PFNGLXGETFBCONFIGATTRIBSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value);
  437. typedef GLXFBConfigSGIX * ( * PFNGLXCHOOSEFBCONFIGSGIXPROC) (Display *dpy, int screen, int *attrib_list, int *nelements);
  438. typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap);
  439. typedef GLXContext ( * PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct);
  440. typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config);
  441. typedef GLXFBConfigSGIX ( * PFNGLXGETFBCONFIGFROMVISUALSGIXPROC) (Display *dpy, XVisualInfo *vis);
  442. #endif
  443. #ifndef GLX_SGIX_pbuffer
  444. #define GLX_SGIX_pbuffer 1
  445. #ifdef GLX_GLXEXT_PROTOTYPES
  446. extern GLXPbufferSGIX glXCreateGLXPbufferSGIX (Display *, GLXFBConfigSGIX, unsigned int, unsigned int, int *);
  447. extern void glXDestroyGLXPbufferSGIX (Display *, GLXPbufferSGIX);
  448. extern int glXQueryGLXPbufferSGIX (Display *, GLXPbufferSGIX, int, unsigned int *);
  449. extern void glXSelectEventSGIX (Display *, GLXDrawable, unsigned long);
  450. extern void glXGetSelectedEventSGIX (Display *, GLXDrawable, unsigned long *);
  451. #endif /* GLX_GLXEXT_PROTOTYPES */
  452. typedef GLXPbufferSGIX ( * PFNGLXCREATEGLXPBUFFERSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list);
  453. typedef void ( * PFNGLXDESTROYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf);
  454. typedef int ( * PFNGLXQUERYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value);
  455. typedef void ( * PFNGLXSELECTEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long mask);
  456. typedef void ( * PFNGLXGETSELECTEDEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long *mask);
  457. #endif
  458. #ifndef GLX_SGI_cushion
  459. #define GLX_SGI_cushion 1
  460. #ifdef GLX_GLXEXT_PROTOTYPES
  461. extern void glXCushionSGI (Display *, Window, float);
  462. #endif /* GLX_GLXEXT_PROTOTYPES */
  463. typedef void ( * PFNGLXCUSHIONSGIPROC) (Display *dpy, Window window, float cushion);
  464. #endif
  465. #ifndef GLX_SGIX_video_resize
  466. #define GLX_SGIX_video_resize 1
  467. #ifdef GLX_GLXEXT_PROTOTYPES
  468. extern int glXBindChannelToWindowSGIX (Display *, int, int, Window);
  469. extern int glXChannelRectSGIX (Display *, int, int, int, int, int, int);
  470. extern int glXQueryChannelRectSGIX (Display *, int, int, int *, int *, int *, int *);
  471. extern int glXQueryChannelDeltasSGIX (Display *, int, int, int *, int *, int *, int *);
  472. extern int glXChannelRectSyncSGIX (Display *, int, int, GLenum);
  473. #endif /* GLX_GLXEXT_PROTOTYPES */
  474. typedef int ( * PFNGLXBINDCHANNELTOWINDOWSGIXPROC) (Display *display, int screen, int channel, Window window);
  475. typedef int ( * PFNGLXCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int x, int y, int w, int h);
  476. typedef int ( * PFNGLXQUERYCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh);
  477. typedef int ( * PFNGLXQUERYCHANNELDELTASSGIXPROC) (Display *display, int screen, int channel, int *x, int *y, int *w, int *h);
  478. typedef int ( * PFNGLXCHANNELRECTSYNCSGIXPROC) (Display *display, int screen, int channel, GLenum synctype);
  479. #endif
  480. #ifndef GLX_SGIX_dmbuffer
  481. #define GLX_SGIX_dmbuffer 1
  482. #ifdef _DM_BUFFER_H_
  483. #ifdef GLX_GLXEXT_PROTOTYPES
  484. extern Bool glXAssociateDMPbufferSGIX (Display *, GLXPbufferSGIX, DMparams *, DMbuffer);
  485. #endif /* GLX_GLXEXT_PROTOTYPES */
  486. typedef Bool ( * PFNGLXASSOCIATEDMPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer);
  487. #endif /* _DM_BUFFER_H_ */
  488. #endif
  489. #ifndef GLX_SGIX_swap_group
  490. #define GLX_SGIX_swap_group 1
  491. #ifdef GLX_GLXEXT_PROTOTYPES
  492. extern void glXJoinSwapGroupSGIX (Display *, GLXDrawable, GLXDrawable);
  493. #endif /* GLX_GLXEXT_PROTOTYPES */
  494. typedef void ( * PFNGLXJOINSWAPGROUPSGIXPROC) (Display *dpy, GLXDrawable drawable, GLXDrawable member);
  495. #endif
  496. #ifndef GLX_SGIX_swap_barrier
  497. #define GLX_SGIX_swap_barrier 1
  498. #ifdef GLX_GLXEXT_PROTOTYPES
  499. extern void glXBindSwapBarrierSGIX (Display *, GLXDrawable, int);
  500. extern Bool glXQueryMaxSwapBarriersSGIX (Display *, int, int *);
  501. #endif /* GLX_GLXEXT_PROTOTYPES */
  502. typedef void ( * PFNGLXBINDSWAPBARRIERSGIXPROC) (Display *dpy, GLXDrawable drawable, int barrier);
  503. typedef Bool ( * PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC) (Display *dpy, int screen, int *max);
  504. #endif
  505. #ifndef GLX_SUN_get_transparent_index
  506. #define GLX_SUN_get_transparent_index 1
  507. #ifdef GLX_GLXEXT_PROTOTYPES
  508. extern Status glXGetTransparentIndexSUN (Display *, Window, Window, long *);
  509. #endif /* GLX_GLXEXT_PROTOTYPES */
  510. typedef Status ( * PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex);
  511. #endif
  512. #ifndef GLX_MESA_copy_sub_buffer
  513. #define GLX_MESA_copy_sub_buffer 1
  514. #ifdef GLX_GLXEXT_PROTOTYPES
  515. extern void glXCopySubBufferMESA (Display *, GLXDrawable, int, int, int, int);
  516. #endif /* GLX_GLXEXT_PROTOTYPES */
  517. typedef void ( * PFNGLXCOPYSUBBUFFERMESAPROC) (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height);
  518. #endif
  519. #ifndef GLX_MESA_pixmap_colormap
  520. #define GLX_MESA_pixmap_colormap 1
  521. #ifdef GLX_GLXEXT_PROTOTYPES
  522. extern GLXPixmap glXCreateGLXPixmapMESA (Display *, XVisualInfo *, Pixmap, Colormap);
  523. #endif /* GLX_GLXEXT_PROTOTYPES */
  524. typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPMESAPROC) (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap);
  525. #endif
  526. #ifndef GLX_MESA_release_buffers
  527. #define GLX_MESA_release_buffers 1
  528. #ifdef GLX_GLXEXT_PROTOTYPES
  529. extern Bool glXReleaseBuffersMESA (Display *, GLXDrawable);
  530. #endif /* GLX_GLXEXT_PROTOTYPES */
  531. typedef Bool ( * PFNGLXRELEASEBUFFERSMESAPROC) (Display *dpy, GLXDrawable drawable);
  532. #endif
  533. #ifndef GLX_MESA_set_3dfx_mode
  534. #define GLX_MESA_set_3dfx_mode 1
  535. #ifdef GLX_GLXEXT_PROTOTYPES
  536. extern Bool glXSet3DfxModeMESA (int);
  537. #endif /* GLX_GLXEXT_PROTOTYPES */
  538. typedef Bool ( * PFNGLXSET3DFXMODEMESAPROC) (int mode);
  539. #endif
  540. #ifndef GLX_SGIX_visual_select_group
  541. #define GLX_SGIX_visual_select_group 1
  542. #endif
  543. #ifndef GLX_OML_swap_method
  544. #define GLX_OML_swap_method 1
  545. #endif
  546. #ifndef GLX_OML_sync_control
  547. #define GLX_OML_sync_control 1
  548. #ifdef GLX_GLXEXT_PROTOTYPES
  549. extern Bool glXGetSyncValuesOML (Display *, GLXDrawable, int64_t *, int64_t *, int64_t *);
  550. extern Bool glXGetMscRateOML (Display *, GLXDrawable, int32_t *, int32_t *);
  551. extern int64_t glXSwapBuffersMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t);
  552. extern Bool glXWaitForMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t, int64_t *, int64_t *, int64_t *);
  553. extern Bool glXWaitForSbcOML (Display *, GLXDrawable, int64_t, int64_t *, int64_t *, int64_t *);
  554. #endif /* GLX_GLXEXT_PROTOTYPES */
  555. typedef Bool ( * PFNGLXGETSYNCVALUESOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc);
  556. typedef Bool ( * PFNGLXGETMSCRATEOMLPROC) (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator);
  557. typedef int64_t ( * PFNGLXSWAPBUFFERSMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder);
  558. typedef Bool ( * PFNGLXWAITFORMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t *ust, int64_t *msc, int64_t *sbc);
  559. typedef Bool ( * PFNGLXWAITFORSBCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc);
  560. #endif
  561. #ifndef GLX_SGIX_hyperpipe_group
  562. #define GLX_SGIX_hyperpipe_group 1
  563. typedef struct {
  564. char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
  565. int networkId;
  566. } GLXHyperpipeNetworkSGIX;
  567. typedef struct {
  568. char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
  569. int channel;
  570. unsigned int
  571. participationType;
  572. int timeSlice;
  573. } GLXHyperpipeConfigSGIX;
  574. typedef struct {
  575. char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
  576. int srcXOrigin, srcYOrigin, srcWidth, srcHeight;
  577. int destXOrigin, destYOrigin, destWidth, destHeight;
  578. } GLXPipeRect;
  579. typedef struct {
  580. char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
  581. int XOrigin, YOrigin, maxHeight, maxWidth;
  582. } GLXPipeRectLimits;
  583. #ifdef GLX_GLXEXT_PROTOTYPES
  584. extern GLXHyperpipeNetworkSGIX * glXQueryHyperpipeNetworkSGIX (Display *, int *);
  585. extern int glXHyperpipeConfigSGIX (Display *, int, int, GLXHyperpipeConfigSGIX *, int *);
  586. extern GLXHyperpipeConfigSGIX * glXQueryHyperpipeConfigSGIX (Display *, int, int *);
  587. extern int glXDestroyHyperpipeConfigSGIX (Display *, int);
  588. extern int glXBindHyperpipeSGIX (Display *, int);
  589. extern int glXQueryHyperpipeBestAttribSGIX (Display *, int, int, int, void *, void *);
  590. extern int glXHyperpipeAttribSGIX (Display *, int, int, int, void *);
  591. extern int glXQueryHyperpipeAttribSGIX (Display *, int, int, int, void *);
  592. #endif /* GLX_GLXEXT_PROTOTYPES */
  593. typedef GLXHyperpipeNetworkSGIX * ( * PFNGLXQUERYHYPERPIPENETWORKSGIXPROC) (Display *dpy, int *npipes);
  594. typedef int ( * PFNGLXHYPERPIPECONFIGSGIXPROC) (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId);
  595. typedef GLXHyperpipeConfigSGIX * ( * PFNGLXQUERYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId, int *npipes);
  596. typedef int ( * PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId);
  597. typedef int ( * PFNGLXBINDHYPERPIPESGIXPROC) (Display *dpy, int hpId);
  598. typedef int ( * PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList);
  599. typedef int ( * PFNGLXHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList);
  600. typedef int ( * PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList);
  601. #endif
  602. #ifndef GLX_MESA_agp_offset
  603. #define GLX_MESA_agp_offset 1
  604. #ifdef GLX_GLXEXT_PROTOTYPES
  605. extern unsigned int glXGetAGPOffsetMESA (const void *);
  606. #endif /* GLX_GLXEXT_PROTOTYPES */
  607. typedef unsigned int ( * PFNGLXGETAGPOFFSETMESAPROC) (const void *pointer);
  608. #endif
  609. #ifdef __cplusplus
  610. }
  611. #endif
  612. #endif