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.

glxext.h 29KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724
  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 2006/08/30 */
  50. /* Current version at http://www.opengl.org/registry/ */
  51. #define GLX_GLXEXT_VERSION 14
  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_ARB_fbconfig_float
  121. #define GLX_RGBA_FLOAT_TYPE_ARB 0x20B9
  122. #define GLX_RGBA_FLOAT_BIT_ARB 0x00000004
  123. #endif
  124. #ifndef GLX_SGIS_multisample
  125. #define GLX_SAMPLE_BUFFERS_SGIS 100000
  126. #define GLX_SAMPLES_SGIS 100001
  127. #endif
  128. #ifndef GLX_EXT_visual_info
  129. #define GLX_X_VISUAL_TYPE_EXT 0x22
  130. #define GLX_TRANSPARENT_TYPE_EXT 0x23
  131. #define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24
  132. #define GLX_TRANSPARENT_RED_VALUE_EXT 0x25
  133. #define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26
  134. #define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27
  135. #define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28
  136. #define GLX_NONE_EXT 0x8000
  137. #define GLX_TRUE_COLOR_EXT 0x8002
  138. #define GLX_DIRECT_COLOR_EXT 0x8003
  139. #define GLX_PSEUDO_COLOR_EXT 0x8004
  140. #define GLX_STATIC_COLOR_EXT 0x8005
  141. #define GLX_GRAY_SCALE_EXT 0x8006
  142. #define GLX_STATIC_GRAY_EXT 0x8007
  143. #define GLX_TRANSPARENT_RGB_EXT 0x8008
  144. #define GLX_TRANSPARENT_INDEX_EXT 0x8009
  145. #endif
  146. #ifndef GLX_SGI_swap_control
  147. #endif
  148. #ifndef GLX_SGI_video_sync
  149. #endif
  150. #ifndef GLX_SGI_make_current_read
  151. #endif
  152. #ifndef GLX_SGIX_video_source
  153. #endif
  154. #ifndef GLX_EXT_visual_rating
  155. #define GLX_VISUAL_CAVEAT_EXT 0x20
  156. #define GLX_SLOW_VISUAL_EXT 0x8001
  157. #define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D
  158. /* reuse GLX_NONE_EXT */
  159. #endif
  160. #ifndef GLX_EXT_import_context
  161. #define GLX_SHARE_CONTEXT_EXT 0x800A
  162. #define GLX_VISUAL_ID_EXT 0x800B
  163. #define GLX_SCREEN_EXT 0x800C
  164. #endif
  165. #ifndef GLX_SGIX_fbconfig
  166. #define GLX_WINDOW_BIT_SGIX 0x00000001
  167. #define GLX_PIXMAP_BIT_SGIX 0x00000002
  168. #define GLX_RGBA_BIT_SGIX 0x00000001
  169. #define GLX_COLOR_INDEX_BIT_SGIX 0x00000002
  170. #define GLX_DRAWABLE_TYPE_SGIX 0x8010
  171. #define GLX_RENDER_TYPE_SGIX 0x8011
  172. #define GLX_X_RENDERABLE_SGIX 0x8012
  173. #define GLX_FBCONFIG_ID_SGIX 0x8013
  174. #define GLX_RGBA_TYPE_SGIX 0x8014
  175. #define GLX_COLOR_INDEX_TYPE_SGIX 0x8015
  176. /* reuse GLX_SCREEN_EXT */
  177. #endif
  178. #ifndef GLX_SGIX_pbuffer
  179. #define GLX_PBUFFER_BIT_SGIX 0x00000004
  180. #define GLX_BUFFER_CLOBBER_MASK_SGIX 0x08000000
  181. #define GLX_FRONT_LEFT_BUFFER_BIT_SGIX 0x00000001
  182. #define GLX_FRONT_RIGHT_BUFFER_BIT_SGIX 0x00000002
  183. #define GLX_BACK_LEFT_BUFFER_BIT_SGIX 0x00000004
  184. #define GLX_BACK_RIGHT_BUFFER_BIT_SGIX 0x00000008
  185. #define GLX_AUX_BUFFERS_BIT_SGIX 0x00000010
  186. #define GLX_DEPTH_BUFFER_BIT_SGIX 0x00000020
  187. #define GLX_STENCIL_BUFFER_BIT_SGIX 0x00000040
  188. #define GLX_ACCUM_BUFFER_BIT_SGIX 0x00000080
  189. #define GLX_SAMPLE_BUFFERS_BIT_SGIX 0x00000100
  190. #define GLX_MAX_PBUFFER_WIDTH_SGIX 0x8016
  191. #define GLX_MAX_PBUFFER_HEIGHT_SGIX 0x8017
  192. #define GLX_MAX_PBUFFER_PIXELS_SGIX 0x8018
  193. #define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019
  194. #define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A
  195. #define GLX_PRESERVED_CONTENTS_SGIX 0x801B
  196. #define GLX_LARGEST_PBUFFER_SGIX 0x801C
  197. #define GLX_WIDTH_SGIX 0x801D
  198. #define GLX_HEIGHT_SGIX 0x801E
  199. #define GLX_EVENT_MASK_SGIX 0x801F
  200. #define GLX_DAMAGED_SGIX 0x8020
  201. #define GLX_SAVED_SGIX 0x8021
  202. #define GLX_WINDOW_SGIX 0x8022
  203. #define GLX_PBUFFER_SGIX 0x8023
  204. #endif
  205. #ifndef GLX_SGI_cushion
  206. #endif
  207. #ifndef GLX_SGIX_video_resize
  208. #define GLX_SYNC_FRAME_SGIX 0x00000000
  209. #define GLX_SYNC_SWAP_SGIX 0x00000001
  210. #endif
  211. #ifndef GLX_SGIX_dmbuffer
  212. #define GLX_DIGITAL_MEDIA_PBUFFER_SGIX 0x8024
  213. #endif
  214. #ifndef GLX_SGIX_swap_group
  215. #endif
  216. #ifndef GLX_SGIX_swap_barrier
  217. #endif
  218. #ifndef GLX_SGIS_blended_overlay
  219. #define GLX_BLENDED_RGBA_SGIS 0x8025
  220. #endif
  221. #ifndef GLX_SGIS_shared_multisample
  222. #define GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS 0x8026
  223. #define GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS 0x8027
  224. #endif
  225. #ifndef GLX_SUN_get_transparent_index
  226. #endif
  227. #ifndef GLX_3DFX_multisample
  228. #define GLX_SAMPLE_BUFFERS_3DFX 0x8050
  229. #define GLX_SAMPLES_3DFX 0x8051
  230. #endif
  231. #ifndef GLX_MESA_copy_sub_buffer
  232. #endif
  233. #ifndef GLX_MESA_pixmap_colormap
  234. #endif
  235. #ifndef GLX_MESA_release_buffers
  236. #endif
  237. #ifndef GLX_MESA_set_3dfx_mode
  238. #define GLX_3DFX_WINDOW_MODE_MESA 0x1
  239. #define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2
  240. #endif
  241. #ifndef GLX_SGIX_visual_select_group
  242. #define GLX_VISUAL_SELECT_GROUP_SGIX 0x8028
  243. #endif
  244. #ifndef GLX_OML_swap_method
  245. #define GLX_SWAP_METHOD_OML 0x8060
  246. #define GLX_SWAP_EXCHANGE_OML 0x8061
  247. #define GLX_SWAP_COPY_OML 0x8062
  248. #define GLX_SWAP_UNDEFINED_OML 0x8063
  249. #endif
  250. #ifndef GLX_OML_sync_control
  251. #endif
  252. #ifndef GLX_NV_float_buffer
  253. #define GLX_FLOAT_COMPONENTS_NV 0x20B0
  254. #endif
  255. #ifndef GLX_SGIX_hyperpipe
  256. #define GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX 80
  257. #define GLX_BAD_HYPERPIPE_CONFIG_SGIX 91
  258. #define GLX_BAD_HYPERPIPE_SGIX 92
  259. #define GLX_HYPERPIPE_DISPLAY_PIPE_SGIX 0x00000001
  260. #define GLX_HYPERPIPE_RENDER_PIPE_SGIX 0x00000002
  261. #define GLX_PIPE_RECT_SGIX 0x00000001
  262. #define GLX_PIPE_RECT_LIMITS_SGIX 0x00000002
  263. #define GLX_HYPERPIPE_STEREO_SGIX 0x00000003
  264. #define GLX_HYPERPIPE_PIXEL_AVERAGE_SGIX 0x00000004
  265. #define GLX_HYPERPIPE_ID_SGIX 0x8030
  266. #endif
  267. #ifndef GLX_MESA_agp_offset
  268. #endif
  269. /*************************************************************/
  270. #ifndef GLX_ARB_get_proc_address
  271. typedef void (*__GLXextFuncPtr)(void);
  272. #endif
  273. #ifndef GLX_SGIX_video_source
  274. typedef XID GLXVideoSourceSGIX;
  275. #endif
  276. #ifndef GLX_SGIX_fbconfig
  277. typedef XID GLXFBConfigIDSGIX;
  278. typedef struct __GLXFBConfigRec *GLXFBConfigSGIX;
  279. #endif
  280. #ifndef GLX_SGIX_pbuffer
  281. typedef XID GLXPbufferSGIX;
  282. typedef struct {
  283. int type;
  284. unsigned long serial; /* # of last request processed by server */
  285. Bool send_event; /* true if this came for SendEvent request */
  286. Display *display; /* display the event was read from */
  287. GLXDrawable drawable; /* i.d. of Drawable */
  288. int event_type; /* GLX_DAMAGED_SGIX or GLX_SAVED_SGIX */
  289. int draw_type; /* GLX_WINDOW_SGIX or GLX_PBUFFER_SGIX */
  290. unsigned int mask; /* mask indicating which buffers are affected*/
  291. int x, y;
  292. int width, height;
  293. int count; /* if nonzero, at least this many more */
  294. } GLXBufferClobberEventSGIX;
  295. #endif
  296. #ifndef GLEXT_64_TYPES_DEFINED
  297. /* This code block is duplicated in glxext.h, so must be protected */
  298. #define GLEXT_64_TYPES_DEFINED
  299. /* Define int32_t, int64_t, and uint64_t types for UST/MSC */
  300. /* (as used in the GLX_OML_sync_control extension). */
  301. #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
  302. #include <inttypes.h>
  303. #elif defined(__sun__)
  304. #include <inttypes.h>
  305. #if defined(__STDC__)
  306. #if defined(__arch64__)
  307. typedef long int int64_t;
  308. typedef unsigned long int uint64_t;
  309. #else
  310. typedef long long int int64_t;
  311. typedef unsigned long long int uint64_t;
  312. #endif /* __arch64__ */
  313. #endif /* __STDC__ */
  314. #elif defined( __VMS )
  315. #include <inttypes.h>
  316. #elif defined(__SCO__) || defined(__USLC__)
  317. #include <stdint.h>
  318. #elif defined(__UNIXOS2__) || defined(__SOL64__)
  319. typedef long int int32_t;
  320. typedef long long int int64_t;
  321. typedef unsigned long long int uint64_t;
  322. #elif defined(WIN32) && defined(__GNUC__)
  323. #include <stdint.h>
  324. #else
  325. #include <inttypes.h> /* Fallback option */
  326. #endif
  327. #endif
  328. #ifndef GLX_VERSION_1_3
  329. #define GLX_VERSION_1_3 1
  330. #ifdef GLX_GLXEXT_PROTOTYPES
  331. extern GLXFBConfig * glXGetFBConfigs (Display *, int, int *);
  332. extern GLXFBConfig * glXChooseFBConfig (Display *, int, const int *, int *);
  333. extern int glXGetFBConfigAttrib (Display *, GLXFBConfig, int, int *);
  334. extern XVisualInfo * glXGetVisualFromFBConfig (Display *, GLXFBConfig);
  335. extern GLXWindow glXCreateWindow (Display *, GLXFBConfig, Window, const int *);
  336. extern void glXDestroyWindow (Display *, GLXWindow);
  337. extern GLXPixmap glXCreatePixmap (Display *, GLXFBConfig, Pixmap, const int *);
  338. extern void glXDestroyPixmap (Display *, GLXPixmap);
  339. extern GLXPbuffer glXCreatePbuffer (Display *, GLXFBConfig, const int *);
  340. extern void glXDestroyPbuffer (Display *, GLXPbuffer);
  341. extern void glXQueryDrawable (Display *, GLXDrawable, int, unsigned int *);
  342. extern GLXContext glXCreateNewContext (Display *, GLXFBConfig, int, GLXContext, Bool);
  343. extern Bool glXMakeContextCurrent (Display *, GLXDrawable, GLXDrawable, GLXContext);
  344. extern GLXDrawable glXGetCurrentReadDrawable (void);
  345. extern Display * glXGetCurrentDisplay (void);
  346. extern int glXQueryContext (Display *, GLXContext, int, int *);
  347. extern void glXSelectEvent (Display *, GLXDrawable, unsigned long);
  348. extern void glXGetSelectedEvent (Display *, GLXDrawable, unsigned long *);
  349. #endif /* GLX_GLXEXT_PROTOTYPES */
  350. typedef GLXFBConfig * ( * PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements);
  351. typedef GLXFBConfig * ( * PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements);
  352. typedef int ( * PFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value);
  353. typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config);
  354. typedef GLXWindow ( * PFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list);
  355. typedef void ( * PFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win);
  356. typedef GLXPixmap ( * PFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list);
  357. typedef void ( * PFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap);
  358. typedef GLXPbuffer ( * PFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list);
  359. typedef void ( * PFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf);
  360. typedef void ( * PFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
  361. typedef GLXContext ( * PFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
  362. typedef Bool ( * PFNGLXMAKECONTEXTCURRENTPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
  363. typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLEPROC) (void);
  364. typedef Display * ( * PFNGLXGETCURRENTDISPLAYPROC) (void);
  365. typedef int ( * PFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value);
  366. typedef void ( * PFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask);
  367. typedef void ( * PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
  368. #endif
  369. #ifndef GLX_VERSION_1_4
  370. #define GLX_VERSION_1_4 1
  371. #ifdef GLX_GLXEXT_PROTOTYPES
  372. extern __GLXextFuncPtr glXGetProcAddress (const GLubyte *);
  373. #endif /* GLX_GLXEXT_PROTOTYPES */
  374. typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName);
  375. #endif
  376. #ifndef GLX_ARB_get_proc_address
  377. #define GLX_ARB_get_proc_address 1
  378. #ifdef GLX_GLXEXT_PROTOTYPES
  379. extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *);
  380. #endif /* GLX_GLXEXT_PROTOTYPES */
  381. typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procName);
  382. #endif
  383. #ifndef GLX_ARB_multisample
  384. #define GLX_ARB_multisample 1
  385. #endif
  386. #ifndef GLX_ARB_fbconfig_float
  387. #define GLX_ARB_fbconfig_float 1
  388. #endif
  389. #ifndef GLX_SGIS_multisample
  390. #define GLX_SGIS_multisample 1
  391. #endif
  392. #ifndef GLX_EXT_visual_info
  393. #define GLX_EXT_visual_info 1
  394. #endif
  395. #ifndef GLX_SGI_swap_control
  396. #define GLX_SGI_swap_control 1
  397. #ifdef GLX_GLXEXT_PROTOTYPES
  398. extern int glXSwapIntervalSGI (int);
  399. #endif /* GLX_GLXEXT_PROTOTYPES */
  400. typedef int ( * PFNGLXSWAPINTERVALSGIPROC) (int interval);
  401. #endif
  402. #ifndef GLX_SGI_video_sync
  403. #define GLX_SGI_video_sync 1
  404. #ifdef GLX_GLXEXT_PROTOTYPES
  405. extern int glXGetVideoSyncSGI (unsigned int *);
  406. extern int glXWaitVideoSyncSGI (int, int, unsigned int *);
  407. #endif /* GLX_GLXEXT_PROTOTYPES */
  408. typedef int ( * PFNGLXGETVIDEOSYNCSGIPROC) (unsigned int *count);
  409. typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int *count);
  410. #endif
  411. #ifndef GLX_SGI_make_current_read
  412. #define GLX_SGI_make_current_read 1
  413. #ifdef GLX_GLXEXT_PROTOTYPES
  414. extern Bool glXMakeCurrentReadSGI (Display *, GLXDrawable, GLXDrawable, GLXContext);
  415. extern GLXDrawable glXGetCurrentReadDrawableSGI (void);
  416. #endif /* GLX_GLXEXT_PROTOTYPES */
  417. typedef Bool ( * PFNGLXMAKECURRENTREADSGIPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
  418. typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLESGIPROC) (void);
  419. #endif
  420. #ifndef GLX_SGIX_video_source
  421. #define GLX_SGIX_video_source 1
  422. #ifdef _VL_H
  423. #ifdef GLX_GLXEXT_PROTOTYPES
  424. extern GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX (Display *, int, VLServer, VLPath, int, VLNode);
  425. extern void glXDestroyGLXVideoSourceSGIX (Display *, GLXVideoSourceSGIX);
  426. #endif /* GLX_GLXEXT_PROTOTYPES */
  427. typedef GLXVideoSourceSGIX ( * PFNGLXCREATEGLXVIDEOSOURCESGIXPROC) (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode);
  428. typedef void ( * PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC) (Display *dpy, GLXVideoSourceSGIX glxvideosource);
  429. #endif /* _VL_H */
  430. #endif
  431. #ifndef GLX_EXT_visual_rating
  432. #define GLX_EXT_visual_rating 1
  433. #endif
  434. #ifndef GLX_EXT_import_context
  435. #define GLX_EXT_import_context 1
  436. #ifdef GLX_GLXEXT_PROTOTYPES
  437. extern Display * glXGetCurrentDisplayEXT (void);
  438. extern int glXQueryContextInfoEXT (Display *, GLXContext, int, int *);
  439. extern GLXContextID glXGetContextIDEXT (const GLXContext);
  440. extern GLXContext glXImportContextEXT (Display *, GLXContextID);
  441. extern void glXFreeContextEXT (Display *, GLXContext);
  442. #endif /* GLX_GLXEXT_PROTOTYPES */
  443. typedef Display * ( * PFNGLXGETCURRENTDISPLAYEXTPROC) (void);
  444. typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC) (Display *dpy, GLXContext context, int attribute, int *value);
  445. typedef GLXContextID ( * PFNGLXGETCONTEXTIDEXTPROC) (const GLXContext context);
  446. typedef GLXContext ( * PFNGLXIMPORTCONTEXTEXTPROC) (Display *dpy, GLXContextID contextID);
  447. typedef void ( * PFNGLXFREECONTEXTEXTPROC) (Display *dpy, GLXContext context);
  448. #endif
  449. #ifndef GLX_SGIX_fbconfig
  450. #define GLX_SGIX_fbconfig 1
  451. #ifdef GLX_GLXEXT_PROTOTYPES
  452. extern int glXGetFBConfigAttribSGIX (Display *, GLXFBConfigSGIX, int, int *);
  453. extern GLXFBConfigSGIX * glXChooseFBConfigSGIX (Display *, int, int *, int *);
  454. extern GLXPixmap glXCreateGLXPixmapWithConfigSGIX (Display *, GLXFBConfigSGIX, Pixmap);
  455. extern GLXContext glXCreateContextWithConfigSGIX (Display *, GLXFBConfigSGIX, int, GLXContext, Bool);
  456. extern XVisualInfo * glXGetVisualFromFBConfigSGIX (Display *, GLXFBConfigSGIX);
  457. extern GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX (Display *, XVisualInfo *);
  458. #endif /* GLX_GLXEXT_PROTOTYPES */
  459. typedef int ( * PFNGLXGETFBCONFIGATTRIBSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value);
  460. typedef GLXFBConfigSGIX * ( * PFNGLXCHOOSEFBCONFIGSGIXPROC) (Display *dpy, int screen, int *attrib_list, int *nelements);
  461. typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap);
  462. typedef GLXContext ( * PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct);
  463. typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config);
  464. typedef GLXFBConfigSGIX ( * PFNGLXGETFBCONFIGFROMVISUALSGIXPROC) (Display *dpy, XVisualInfo *vis);
  465. #endif
  466. #ifndef GLX_SGIX_pbuffer
  467. #define GLX_SGIX_pbuffer 1
  468. #ifdef GLX_GLXEXT_PROTOTYPES
  469. extern GLXPbufferSGIX glXCreateGLXPbufferSGIX (Display *, GLXFBConfigSGIX, unsigned int, unsigned int, int *);
  470. extern void glXDestroyGLXPbufferSGIX (Display *, GLXPbufferSGIX);
  471. extern int glXQueryGLXPbufferSGIX (Display *, GLXPbufferSGIX, int, unsigned int *);
  472. extern void glXSelectEventSGIX (Display *, GLXDrawable, unsigned long);
  473. extern void glXGetSelectedEventSGIX (Display *, GLXDrawable, unsigned long *);
  474. #endif /* GLX_GLXEXT_PROTOTYPES */
  475. typedef GLXPbufferSGIX ( * PFNGLXCREATEGLXPBUFFERSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list);
  476. typedef void ( * PFNGLXDESTROYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf);
  477. typedef int ( * PFNGLXQUERYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value);
  478. typedef void ( * PFNGLXSELECTEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long mask);
  479. typedef void ( * PFNGLXGETSELECTEDEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long *mask);
  480. #endif
  481. #ifndef GLX_SGI_cushion
  482. #define GLX_SGI_cushion 1
  483. #ifdef GLX_GLXEXT_PROTOTYPES
  484. extern void glXCushionSGI (Display *, Window, float);
  485. #endif /* GLX_GLXEXT_PROTOTYPES */
  486. typedef void ( * PFNGLXCUSHIONSGIPROC) (Display *dpy, Window window, float cushion);
  487. #endif
  488. #ifndef GLX_SGIX_video_resize
  489. #define GLX_SGIX_video_resize 1
  490. #ifdef GLX_GLXEXT_PROTOTYPES
  491. extern int glXBindChannelToWindowSGIX (Display *, int, int, Window);
  492. extern int glXChannelRectSGIX (Display *, int, int, int, int, int, int);
  493. extern int glXQueryChannelRectSGIX (Display *, int, int, int *, int *, int *, int *);
  494. extern int glXQueryChannelDeltasSGIX (Display *, int, int, int *, int *, int *, int *);
  495. extern int glXChannelRectSyncSGIX (Display *, int, int, GLenum);
  496. #endif /* GLX_GLXEXT_PROTOTYPES */
  497. typedef int ( * PFNGLXBINDCHANNELTOWINDOWSGIXPROC) (Display *display, int screen, int channel, Window window);
  498. typedef int ( * PFNGLXCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int x, int y, int w, int h);
  499. typedef int ( * PFNGLXQUERYCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh);
  500. typedef int ( * PFNGLXQUERYCHANNELDELTASSGIXPROC) (Display *display, int screen, int channel, int *x, int *y, int *w, int *h);
  501. typedef int ( * PFNGLXCHANNELRECTSYNCSGIXPROC) (Display *display, int screen, int channel, GLenum synctype);
  502. #endif
  503. #ifndef GLX_SGIX_dmbuffer
  504. #define GLX_SGIX_dmbuffer 1
  505. #ifdef _DM_BUFFER_H_
  506. #ifdef GLX_GLXEXT_PROTOTYPES
  507. extern Bool glXAssociateDMPbufferSGIX (Display *, GLXPbufferSGIX, DMparams *, DMbuffer);
  508. #endif /* GLX_GLXEXT_PROTOTYPES */
  509. typedef Bool ( * PFNGLXASSOCIATEDMPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer);
  510. #endif /* _DM_BUFFER_H_ */
  511. #endif
  512. #ifndef GLX_SGIX_swap_group
  513. #define GLX_SGIX_swap_group 1
  514. #ifdef GLX_GLXEXT_PROTOTYPES
  515. extern void glXJoinSwapGroupSGIX (Display *, GLXDrawable, GLXDrawable);
  516. #endif /* GLX_GLXEXT_PROTOTYPES */
  517. typedef void ( * PFNGLXJOINSWAPGROUPSGIXPROC) (Display *dpy, GLXDrawable drawable, GLXDrawable member);
  518. #endif
  519. #ifndef GLX_SGIX_swap_barrier
  520. #define GLX_SGIX_swap_barrier 1
  521. #ifdef GLX_GLXEXT_PROTOTYPES
  522. extern void glXBindSwapBarrierSGIX (Display *, GLXDrawable, int);
  523. extern Bool glXQueryMaxSwapBarriersSGIX (Display *, int, int *);
  524. #endif /* GLX_GLXEXT_PROTOTYPES */
  525. typedef void ( * PFNGLXBINDSWAPBARRIERSGIXPROC) (Display *dpy, GLXDrawable drawable, int barrier);
  526. typedef Bool ( * PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC) (Display *dpy, int screen, int *max);
  527. #endif
  528. #ifndef GLX_SUN_get_transparent_index
  529. #define GLX_SUN_get_transparent_index 1
  530. #ifdef GLX_GLXEXT_PROTOTYPES
  531. extern Status glXGetTransparentIndexSUN (Display *, Window, Window, long *);
  532. #endif /* GLX_GLXEXT_PROTOTYPES */
  533. typedef Status ( * PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex);
  534. #endif
  535. #ifndef GLX_MESA_copy_sub_buffer
  536. #define GLX_MESA_copy_sub_buffer 1
  537. #ifdef GLX_GLXEXT_PROTOTYPES
  538. extern void glXCopySubBufferMESA (Display *, GLXDrawable, int, int, int, int);
  539. #endif /* GLX_GLXEXT_PROTOTYPES */
  540. typedef void ( * PFNGLXCOPYSUBBUFFERMESAPROC) (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height);
  541. #endif
  542. #ifndef GLX_MESA_pixmap_colormap
  543. #define GLX_MESA_pixmap_colormap 1
  544. #ifdef GLX_GLXEXT_PROTOTYPES
  545. extern GLXPixmap glXCreateGLXPixmapMESA (Display *, XVisualInfo *, Pixmap, Colormap);
  546. #endif /* GLX_GLXEXT_PROTOTYPES */
  547. typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPMESAPROC) (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap);
  548. #endif
  549. #ifndef GLX_MESA_release_buffers
  550. #define GLX_MESA_release_buffers 1
  551. #ifdef GLX_GLXEXT_PROTOTYPES
  552. extern Bool glXReleaseBuffersMESA (Display *, GLXDrawable);
  553. #endif /* GLX_GLXEXT_PROTOTYPES */
  554. typedef Bool ( * PFNGLXRELEASEBUFFERSMESAPROC) (Display *dpy, GLXDrawable drawable);
  555. #endif
  556. #ifndef GLX_MESA_set_3dfx_mode
  557. #define GLX_MESA_set_3dfx_mode 1
  558. #ifdef GLX_GLXEXT_PROTOTYPES
  559. extern Bool glXSet3DfxModeMESA (int);
  560. #endif /* GLX_GLXEXT_PROTOTYPES */
  561. typedef Bool ( * PFNGLXSET3DFXMODEMESAPROC) (int mode);
  562. #endif
  563. #ifndef GLX_SGIX_visual_select_group
  564. #define GLX_SGIX_visual_select_group 1
  565. #endif
  566. #ifndef GLX_OML_swap_method
  567. #define GLX_OML_swap_method 1
  568. #endif
  569. #ifndef GLX_OML_sync_control
  570. #define GLX_OML_sync_control 1
  571. #ifdef GLX_GLXEXT_PROTOTYPES
  572. extern Bool glXGetSyncValuesOML (Display *, GLXDrawable, int64_t *, int64_t *, int64_t *);
  573. extern Bool glXGetMscRateOML (Display *, GLXDrawable, int32_t *, int32_t *);
  574. extern int64_t glXSwapBuffersMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t);
  575. extern Bool glXWaitForMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t, int64_t *, int64_t *, int64_t *);
  576. extern Bool glXWaitForSbcOML (Display *, GLXDrawable, int64_t, int64_t *, int64_t *, int64_t *);
  577. #endif /* GLX_GLXEXT_PROTOTYPES */
  578. typedef Bool ( * PFNGLXGETSYNCVALUESOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc);
  579. typedef Bool ( * PFNGLXGETMSCRATEOMLPROC) (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator);
  580. typedef int64_t ( * PFNGLXSWAPBUFFERSMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder);
  581. 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);
  582. typedef Bool ( * PFNGLXWAITFORSBCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc);
  583. #endif
  584. #ifndef GLX_NV_float_buffer
  585. #define GLX_NV_float_buffer 1
  586. #endif
  587. #ifndef GLX_SGIX_hyperpipe
  588. #define GLX_SGIX_hyperpipe 1
  589. typedef struct {
  590. char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
  591. int networkId;
  592. } GLXHyperpipeNetworkSGIX;
  593. typedef struct {
  594. char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
  595. int channel;
  596. unsigned int
  597. participationType;
  598. int timeSlice;
  599. } GLXHyperpipeConfigSGIX;
  600. typedef struct {
  601. char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
  602. int srcXOrigin, srcYOrigin, srcWidth, srcHeight;
  603. int destXOrigin, destYOrigin, destWidth, destHeight;
  604. } GLXPipeRect;
  605. typedef struct {
  606. char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
  607. int XOrigin, YOrigin, maxHeight, maxWidth;
  608. } GLXPipeRectLimits;
  609. #ifdef GLX_GLXEXT_PROTOTYPES
  610. extern GLXHyperpipeNetworkSGIX * glXQueryHyperpipeNetworkSGIX (Display *, int *);
  611. extern int glXHyperpipeConfigSGIX (Display *, int, int, GLXHyperpipeConfigSGIX *, int *);
  612. extern GLXHyperpipeConfigSGIX * glXQueryHyperpipeConfigSGIX (Display *, int, int *);
  613. extern int glXDestroyHyperpipeConfigSGIX (Display *, int);
  614. extern int glXBindHyperpipeSGIX (Display *, int);
  615. extern int glXQueryHyperpipeBestAttribSGIX (Display *, int, int, int, void *, void *);
  616. extern int glXHyperpipeAttribSGIX (Display *, int, int, int, void *);
  617. extern int glXQueryHyperpipeAttribSGIX (Display *, int, int, int, void *);
  618. #endif /* GLX_GLXEXT_PROTOTYPES */
  619. typedef GLXHyperpipeNetworkSGIX * ( * PFNGLXQUERYHYPERPIPENETWORKSGIXPROC) (Display *dpy, int *npipes);
  620. typedef int ( * PFNGLXHYPERPIPECONFIGSGIXPROC) (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId);
  621. typedef GLXHyperpipeConfigSGIX * ( * PFNGLXQUERYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId, int *npipes);
  622. typedef int ( * PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId);
  623. typedef int ( * PFNGLXBINDHYPERPIPESGIXPROC) (Display *dpy, int hpId);
  624. typedef int ( * PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList);
  625. typedef int ( * PFNGLXHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList);
  626. typedef int ( * PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList);
  627. #endif
  628. #ifndef GLX_MESA_agp_offset
  629. #define GLX_MESA_agp_offset 1
  630. #ifdef GLX_GLXEXT_PROTOTYPES
  631. extern unsigned int glXGetAGPOffsetMESA (const void *);
  632. #endif /* GLX_GLXEXT_PROTOTYPES */
  633. typedef unsigned int ( * PFNGLXGETAGPOFFSETMESAPROC) (const void *pointer);
  634. #endif
  635. #ifdef __cplusplus
  636. }
  637. #endif
  638. #endif