glxext.h 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681
  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/08/24 */
  50. /* Current version at http://oss.sgi.com/projects/ogl-sample/registry/ */
  51. #define GLX_GLXEXT_VERSION 7
  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
  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. #ifndef GLX_VERSION_1_3
  290. #define GLX_VERSION_1_3 1
  291. #ifdef GLX_GLXEXT_PROTOTYPES
  292. extern GLXFBConfig * glXGetFBConfigs (Display *, int, int *);
  293. extern GLXFBConfig * glXChooseFBConfig (Display *, int, const int *, int *);
  294. extern int glXGetFBConfigAttrib (Display *, GLXFBConfig, int, int *);
  295. extern XVisualInfo * glXGetVisualFromFBConfig (Display *, GLXFBConfig);
  296. extern GLXWindow glXCreateWindow (Display *, GLXFBConfig, Window, const int *);
  297. extern void glXDestroyWindow (Display *, GLXWindow);
  298. extern GLXPixmap glXCreatePixmap (Display *, GLXFBConfig, Pixmap, const int *);
  299. extern void glXDestroyPixmap (Display *, GLXPixmap);
  300. extern GLXPbuffer glXCreatePbuffer (Display *, GLXFBConfig, const int *);
  301. extern void glXDestroyPbuffer (Display *, GLXPbuffer);
  302. extern void glXQueryDrawable (Display *, GLXDrawable, int, unsigned int *);
  303. extern GLXContext glXCreateNewContext (Display *, GLXFBConfig, int, GLXContext, Bool);
  304. extern Bool glXMakeContextCurrent (Display *, GLXDrawable, GLXDrawable, GLXContext);
  305. extern GLXDrawable glXGetCurrentReadDrawable (void);
  306. extern Display * glXGetCurrentDisplay (void);
  307. extern int glXQueryContext (Display *, GLXContext, int, int *);
  308. extern void glXSelectEvent (Display *, GLXDrawable, unsigned long);
  309. extern void glXGetSelectedEvent (Display *, GLXDrawable, unsigned long *);
  310. #endif /* GLX_GLXEXT_PROTOTYPES */
  311. typedef GLXFBConfig * ( * PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements);
  312. typedef GLXFBConfig * ( * PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements);
  313. typedef int ( * PFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value);
  314. typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config);
  315. typedef GLXWindow ( * PFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list);
  316. typedef void ( * PFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win);
  317. typedef GLXPixmap ( * PFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list);
  318. typedef void ( * PFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap);
  319. typedef GLXPbuffer ( * PFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list);
  320. typedef void ( * PFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf);
  321. typedef void ( * PFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
  322. typedef GLXContext ( * PFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
  323. typedef Bool ( * PFNGLXMAKECONTEXTCURRENTPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
  324. typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLEPROC) (void);
  325. typedef Display * ( * PFNGLXGETCURRENTDISPLAYPROC) (void);
  326. typedef int ( * PFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value);
  327. typedef void ( * PFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask);
  328. typedef void ( * PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
  329. #endif
  330. #ifndef GLX_VERSION_1_4
  331. #define GLX_VERSION_1_4 1
  332. #ifdef GLX_GLXEXT_PROTOTYPES
  333. extern __GLXextFuncPtr glXGetProcAddress (const GLubyte *);
  334. #endif /* GLX_GLXEXT_PROTOTYPES */
  335. typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName);
  336. #endif
  337. #ifndef GLX_ARB_get_proc_address
  338. #define GLX_ARB_get_proc_address 1
  339. #ifdef GLX_GLXEXT_PROTOTYPES
  340. extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *);
  341. #endif /* GLX_GLXEXT_PROTOTYPES */
  342. typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procName);
  343. #endif
  344. #ifndef GLX_ARB_multisample
  345. #define GLX_ARB_multisample 1
  346. #endif
  347. #ifndef GLX_SGIS_multisample
  348. #define GLX_SGIS_multisample 1
  349. #endif
  350. #ifndef GLX_EXT_visual_info
  351. #define GLX_EXT_visual_info 1
  352. #endif
  353. #ifndef GLX_SGI_swap_control
  354. #define GLX_SGI_swap_control 1
  355. #ifdef GLX_GLXEXT_PROTOTYPES
  356. extern int glXSwapIntervalSGI (int);
  357. #endif /* GLX_GLXEXT_PROTOTYPES */
  358. typedef int ( * PFNGLXSWAPINTERVALSGIPROC) (int interval);
  359. #endif
  360. #ifndef GLX_SGI_video_sync
  361. #define GLX_SGI_video_sync 1
  362. #ifdef GLX_GLXEXT_PROTOTYPES
  363. extern int glXGetVideoSyncSGI (unsigned int *);
  364. extern int glXWaitVideoSyncSGI (int, int, unsigned int *);
  365. #endif /* GLX_GLXEXT_PROTOTYPES */
  366. typedef int ( * PFNGLXGETVIDEOSYNCSGIPROC) (unsigned int *count);
  367. typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int *count);
  368. #endif
  369. #ifndef GLX_SGI_make_current_read
  370. #define GLX_SGI_make_current_read 1
  371. #ifdef GLX_GLXEXT_PROTOTYPES
  372. extern Bool glXMakeCurrentReadSGI (Display *, GLXDrawable, GLXDrawable, GLXContext);
  373. extern GLXDrawable glXGetCurrentReadDrawableSGI (void);
  374. #endif /* GLX_GLXEXT_PROTOTYPES */
  375. typedef Bool ( * PFNGLXMAKECURRENTREADSGIPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
  376. typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLESGIPROC) (void);
  377. #endif
  378. #ifndef GLX_SGIX_video_source
  379. #define GLX_SGIX_video_source 1
  380. #ifdef _VL_H
  381. #ifdef GLX_GLXEXT_PROTOTYPES
  382. extern GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX (Display *, int, VLServer, VLPath, int, VLNode);
  383. extern void glXDestroyGLXVideoSourceSGIX (Display *, GLXVideoSourceSGIX);
  384. #endif /* GLX_GLXEXT_PROTOTYPES */
  385. typedef GLXVideoSourceSGIX ( * PFNGLXCREATEGLXVIDEOSOURCESGIXPROC) (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode);
  386. typedef void ( * PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC) (Display *dpy, GLXVideoSourceSGIX glxvideosource);
  387. #endif /* _VL_H */
  388. #endif
  389. #ifndef GLX_EXT_visual_rating
  390. #define GLX_EXT_visual_rating 1
  391. #endif
  392. #ifndef GLX_EXT_import_context
  393. #define GLX_EXT_import_context 1
  394. #ifdef GLX_GLXEXT_PROTOTYPES
  395. extern Display * glXGetCurrentDisplayEXT (void);
  396. extern int glXQueryContextInfoEXT (Display *, GLXContext, int, int *);
  397. extern GLXContextID glXGetContextIDEXT (const GLXContext);
  398. extern GLXContext glXImportContextEXT (Display *, GLXContextID);
  399. extern void glXFreeContextEXT (Display *, GLXContext);
  400. #endif /* GLX_GLXEXT_PROTOTYPES */
  401. typedef Display * ( * PFNGLXGETCURRENTDISPLAYEXTPROC) (void);
  402. typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC) (Display *dpy, GLXContext context, int attribute, int *value);
  403. typedef GLXContextID ( * PFNGLXGETCONTEXTIDEXTPROC) (const GLXContext context);
  404. typedef GLXContext ( * PFNGLXIMPORTCONTEXTEXTPROC) (Display *dpy, GLXContextID contextID);
  405. typedef void ( * PFNGLXFREECONTEXTEXTPROC) (Display *dpy, GLXContext context);
  406. #endif
  407. #ifndef GLX_SGIX_fbconfig
  408. #define GLX_SGIX_fbconfig 1
  409. #ifdef GLX_GLXEXT_PROTOTYPES
  410. extern int glXGetFBConfigAttribSGIX (Display *, GLXFBConfigSGIX, int, int *);
  411. extern GLXFBConfigSGIX * glXChooseFBConfigSGIX (Display *, int, int *, int *);
  412. extern GLXPixmap glXCreateGLXPixmapWithConfigSGIX (Display *, GLXFBConfigSGIX, Pixmap);
  413. extern GLXContext glXCreateContextWithConfigSGIX (Display *, GLXFBConfigSGIX, int, GLXContext, Bool);
  414. extern XVisualInfo * glXGetVisualFromFBConfigSGIX (Display *, GLXFBConfigSGIX);
  415. extern GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX (Display *, XVisualInfo *);
  416. #endif /* GLX_GLXEXT_PROTOTYPES */
  417. typedef int ( * PFNGLXGETFBCONFIGATTRIBSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value);
  418. typedef GLXFBConfigSGIX * ( * PFNGLXCHOOSEFBCONFIGSGIXPROC) (Display *dpy, int screen, int *attrib_list, int *nelements);
  419. typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap);
  420. typedef GLXContext ( * PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct);
  421. typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config);
  422. typedef GLXFBConfigSGIX ( * PFNGLXGETFBCONFIGFROMVISUALSGIXPROC) (Display *dpy, XVisualInfo *vis);
  423. #endif
  424. #ifndef GLX_SGIX_pbuffer
  425. #define GLX_SGIX_pbuffer 1
  426. #ifdef GLX_GLXEXT_PROTOTYPES
  427. extern GLXPbufferSGIX glXCreateGLXPbufferSGIX (Display *, GLXFBConfigSGIX, unsigned int, unsigned int, int *);
  428. extern void glXDestroyGLXPbufferSGIX (Display *, GLXPbufferSGIX);
  429. extern int glXQueryGLXPbufferSGIX (Display *, GLXPbufferSGIX, int, unsigned int *);
  430. extern void glXSelectEventSGIX (Display *, GLXDrawable, unsigned long);
  431. extern void glXGetSelectedEventSGIX (Display *, GLXDrawable, unsigned long *);
  432. #endif /* GLX_GLXEXT_PROTOTYPES */
  433. typedef GLXPbufferSGIX ( * PFNGLXCREATEGLXPBUFFERSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list);
  434. typedef void ( * PFNGLXDESTROYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf);
  435. typedef int ( * PFNGLXQUERYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value);
  436. typedef void ( * PFNGLXSELECTEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long mask);
  437. typedef void ( * PFNGLXGETSELECTEDEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long *mask);
  438. #endif
  439. #ifndef GLX_SGI_cushion
  440. #define GLX_SGI_cushion 1
  441. #ifdef GLX_GLXEXT_PROTOTYPES
  442. extern void glXCushionSGI (Display *, Window, float);
  443. #endif /* GLX_GLXEXT_PROTOTYPES */
  444. typedef void ( * PFNGLXCUSHIONSGIPROC) (Display *dpy, Window window, float cushion);
  445. #endif
  446. #ifndef GLX_SGIX_video_resize
  447. #define GLX_SGIX_video_resize 1
  448. #ifdef GLX_GLXEXT_PROTOTYPES
  449. extern int glXBindChannelToWindowSGIX (Display *, int, int, Window);
  450. extern int glXChannelRectSGIX (Display *, int, int, int, int, int, int);
  451. extern int glXQueryChannelRectSGIX (Display *, int, int, int *, int *, int *, int *);
  452. extern int glXQueryChannelDeltasSGIX (Display *, int, int, int *, int *, int *, int *);
  453. extern int glXChannelRectSyncSGIX (Display *, int, int, GLenum);
  454. #endif /* GLX_GLXEXT_PROTOTYPES */
  455. typedef int ( * PFNGLXBINDCHANNELTOWINDOWSGIXPROC) (Display *display, int screen, int channel, Window window);
  456. typedef int ( * PFNGLXCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int x, int y, int w, int h);
  457. typedef int ( * PFNGLXQUERYCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh);
  458. typedef int ( * PFNGLXQUERYCHANNELDELTASSGIXPROC) (Display *display, int screen, int channel, int *x, int *y, int *w, int *h);
  459. typedef int ( * PFNGLXCHANNELRECTSYNCSGIXPROC) (Display *display, int screen, int channel, GLenum synctype);
  460. #endif
  461. #ifndef GLX_SGIX_dmbuffer
  462. #define GLX_SGIX_dmbuffer 1
  463. #ifdef _DM_BUFFER_H_
  464. #ifdef GLX_GLXEXT_PROTOTYPES
  465. extern Bool glXAssociateDMPbufferSGIX (Display *, GLXPbufferSGIX, DMparams *, DMbuffer);
  466. #endif /* GLX_GLXEXT_PROTOTYPES */
  467. typedef Bool ( * PFNGLXASSOCIATEDMPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer);
  468. #endif /* _DM_BUFFER_H_ */
  469. #endif
  470. #ifndef GLX_SGIX_swap_group
  471. #define GLX_SGIX_swap_group 1
  472. #ifdef GLX_GLXEXT_PROTOTYPES
  473. extern void glXJoinSwapGroupSGIX (Display *, GLXDrawable, GLXDrawable);
  474. #endif /* GLX_GLXEXT_PROTOTYPES */
  475. typedef void ( * PFNGLXJOINSWAPGROUPSGIXPROC) (Display *dpy, GLXDrawable drawable, GLXDrawable member);
  476. #endif
  477. #ifndef GLX_SGIX_swap_barrier
  478. #define GLX_SGIX_swap_barrier 1
  479. #ifdef GLX_GLXEXT_PROTOTYPES
  480. extern void glXBindSwapBarrierSGIX (Display *, GLXDrawable, int);
  481. extern Bool glXQueryMaxSwapBarriersSGIX (Display *, int, int *);
  482. #endif /* GLX_GLXEXT_PROTOTYPES */
  483. typedef void ( * PFNGLXBINDSWAPBARRIERSGIXPROC) (Display *dpy, GLXDrawable drawable, int barrier);
  484. typedef Bool ( * PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC) (Display *dpy, int screen, int *max);
  485. #endif
  486. #ifndef GLX_SUN_get_transparent_index
  487. #define GLX_SUN_get_transparent_index 1
  488. #ifdef GLX_GLXEXT_PROTOTYPES
  489. extern Status glXGetTransparentIndexSUN (Display *, Window, Window, long *);
  490. #endif /* GLX_GLXEXT_PROTOTYPES */
  491. typedef Status ( * PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex);
  492. #endif
  493. #ifndef GLX_MESA_copy_sub_buffer
  494. #define GLX_MESA_copy_sub_buffer 1
  495. #ifdef GLX_GLXEXT_PROTOTYPES
  496. extern void glXCopySubBufferMESA (Display *, GLXDrawable, int, int, int, int);
  497. #endif /* GLX_GLXEXT_PROTOTYPES */
  498. typedef void ( * PFNGLXCOPYSUBBUFFERMESAPROC) (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height);
  499. #endif
  500. #ifndef GLX_MESA_pixmap_colormap
  501. #define GLX_MESA_pixmap_colormap 1
  502. #ifdef GLX_GLXEXT_PROTOTYPES
  503. extern GLXPixmap glXCreateGLXPixmapMESA (Display *, XVisualInfo *, Pixmap, Colormap);
  504. #endif /* GLX_GLXEXT_PROTOTYPES */
  505. typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPMESAPROC) (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap);
  506. #endif
  507. #ifndef GLX_MESA_release_buffers
  508. #define GLX_MESA_release_buffers 1
  509. #ifdef GLX_GLXEXT_PROTOTYPES
  510. extern Bool glXReleaseBuffersMESA (Display *, GLXDrawable);
  511. #endif /* GLX_GLXEXT_PROTOTYPES */
  512. typedef Bool ( * PFNGLXRELEASEBUFFERSMESAPROC) (Display *dpy, GLXDrawable drawable);
  513. #endif
  514. #ifndef GLX_MESA_set_3dfx_mode
  515. #define GLX_MESA_set_3dfx_mode 1
  516. #ifdef GLX_GLXEXT_PROTOTYPES
  517. extern Bool glXSet3DfxModeMESA (int);
  518. #endif /* GLX_GLXEXT_PROTOTYPES */
  519. typedef Bool ( * PFNGLXSET3DFXMODEMESAPROC) (int mode);
  520. #endif
  521. #ifndef GLX_SGIX_visual_select_group
  522. #define GLX_SGIX_visual_select_group 1
  523. #endif
  524. #ifndef GLX_OML_swap_method
  525. #define GLX_OML_swap_method 1
  526. #endif
  527. #ifndef GLX_OML_sync_control
  528. #define GLX_OML_sync_control 1
  529. #if defined(__STDC_VERSION__)
  530. #if __STDC_VERSION__ >= 199901L
  531. /* Include ISO C99 integer types for OML_sync_control; need a better test */
  532. #include <inttypes.h>
  533. #ifdef GLX_GLXEXT_PROTOTYPES
  534. extern Bool glXGetSyncValuesOML (Display *, GLXDrawable, int64_t *, int64_t *, int64_t *);
  535. extern Bool glXGetMscRateOML (Display *, GLXDrawable, int32_t *, int32_t *);
  536. extern int64_t glXSwapBuffersMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t);
  537. extern Bool glXWaitForMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t, int64_t *, int64_t *, int64_t *);
  538. extern Bool glXWaitForSbcOML (Display *, GLXDrawable, int64_t, int64_t *, int64_t *, int64_t *);
  539. #endif /* GLX_GLXEXT_PROTOTYPES */
  540. typedef Bool ( * PFNGLXGETSYNCVALUESOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc);
  541. typedef Bool ( * PFNGLXGETMSCRATEOMLPROC) (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator);
  542. typedef int64_t ( * PFNGLXSWAPBUFFERSMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder);
  543. 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);
  544. typedef Bool ( * PFNGLXWAITFORSBCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc);
  545. #endif /* C99 version test */
  546. #endif /* STDC test */
  547. #endif
  548. #ifndef GLX_SGIX_hyperpipe
  549. #define GLX_SGIX_hyperpipe 1
  550. typedef struct {
  551. char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
  552. int networkId;
  553. } GLXHyperpipeNetworkSGIX;
  554. typedef struct {
  555. char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
  556. int channel;
  557. unsigned int
  558. participationType;
  559. int timeSlice;
  560. } GLXHyperpipeConfigSGIX;
  561. typedef struct {
  562. char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
  563. int srcXOrigin, srcYOrigin, srcWidth, srcHeight;
  564. int destXOrigin, destYOrigin, destWidth, destHeight;
  565. } GLXPipeRect;
  566. typedef struct {
  567. char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
  568. int XOrigin, YOrigin, maxHeight, maxWidth;
  569. } GLXPipeRectLimits;
  570. #ifdef GLX_GLXEXT_PROTOTYPES
  571. extern GLXHyperpipeNetworkSGIX * glXQueryHyperpipeNetworkSGIX (Display *, int *);
  572. extern int glXHyperpipeConfigSGIX (Display *, int, int, GLXHyperpipeConfigSGIX *, int *);
  573. extern GLXHyperpipeConfigSGIX * glXQueryHyperpipeConfigSGIX (Display *, int, int *);
  574. extern int glXDestroyHyperpipeConfigSGIX (Display *, int);
  575. extern int glXBindHyperpipeSGIX (Display *, int);
  576. extern int glXQueryHyperpipeBestAttribSGIX (Display *, int, int, int, void *, void *);
  577. extern int glXHyperpipeAttribSGIX (Display *, int, int, int, void *);
  578. extern int glXQueryHyperpipeAttribSGIX (Display *, int, int, int, void *);
  579. #endif /* GLX_GLXEXT_PROTOTYPES */
  580. typedef GLXHyperpipeNetworkSGIX * ( * PFNGLXQUERYHYPERPIPENETWORKSGIXPROC) (Display *dpy, int *npipes);
  581. typedef int ( * PFNGLXHYPERPIPECONFIGSGIXPROC) (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId);
  582. typedef GLXHyperpipeConfigSGIX * ( * PFNGLXQUERYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId, int *npipes);
  583. typedef int ( * PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId);
  584. typedef int ( * PFNGLXBINDHYPERPIPESGIXPROC) (Display *dpy, int hpId);
  585. typedef int ( * PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList);
  586. typedef int ( * PFNGLXHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList);
  587. typedef int ( * PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList);
  588. #endif
  589. #ifndef GLX_MESA_agp_offset
  590. #define GLX_MESA_agp_offset 1
  591. #ifdef GLX_GLXEXT_PROTOTYPES
  592. extern unsigned int glXGetAGPOffsetMESA (const void *);
  593. #endif /* GLX_GLXEXT_PROTOTYPES */
  594. typedef unsigned int ( * PFNGLXGETAGPOFFSETMESAPROC) (const void *pointer);
  595. #endif
  596. #ifdef __cplusplus
  597. }
  598. #endif
  599. #endif