glxext.h 46 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934
  1. #ifndef __glxext_h_
  2. #define __glxext_h_ 1
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. /*
  7. ** Copyright (c) 2013-2017 The Khronos Group Inc.
  8. **
  9. ** Permission is hereby granted, free of charge, to any person obtaining a
  10. ** copy of this software and/or associated documentation files (the
  11. ** "Materials"), to deal in the Materials without restriction, including
  12. ** without limitation the rights to use, copy, modify, merge, publish,
  13. ** distribute, sublicense, and/or sell copies of the Materials, and to
  14. ** permit persons to whom the Materials are furnished to do so, subject to
  15. ** the following conditions:
  16. **
  17. ** The above copyright notice and this permission notice shall be included
  18. ** in all copies or substantial portions of the Materials.
  19. **
  20. ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  21. ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  22. ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  23. ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
  24. ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  25. ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  26. ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
  27. */
  28. /*
  29. ** This header is generated from the Khronos OpenGL / OpenGL ES XML
  30. ** API Registry. The current version of the Registry, generator scripts
  31. ** used to make the header, and the header can be found at
  32. ** https://github.com/KhronosGroup/OpenGL-Registry
  33. */
  34. #define GLX_GLXEXT_VERSION 20170221
  35. /* Generated C header for:
  36. * API: glx
  37. * Versions considered: .*
  38. * Versions emitted: 1\.[3-9]
  39. * Default extensions included: glx
  40. * Additional extensions included: _nomatch_^
  41. * Extensions removed: _nomatch_^
  42. */
  43. #ifndef GLX_VERSION_1_3
  44. #define GLX_VERSION_1_3 1
  45. typedef XID GLXContextID;
  46. typedef struct __GLXFBConfigRec *GLXFBConfig;
  47. typedef XID GLXWindow;
  48. typedef XID GLXPbuffer;
  49. #define GLX_WINDOW_BIT 0x00000001
  50. #define GLX_PIXMAP_BIT 0x00000002
  51. #define GLX_PBUFFER_BIT 0x00000004
  52. #define GLX_RGBA_BIT 0x00000001
  53. #define GLX_COLOR_INDEX_BIT 0x00000002
  54. #define GLX_PBUFFER_CLOBBER_MASK 0x08000000
  55. #define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001
  56. #define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002
  57. #define GLX_BACK_LEFT_BUFFER_BIT 0x00000004
  58. #define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008
  59. #define GLX_AUX_BUFFERS_BIT 0x00000010
  60. #define GLX_DEPTH_BUFFER_BIT 0x00000020
  61. #define GLX_STENCIL_BUFFER_BIT 0x00000040
  62. #define GLX_ACCUM_BUFFER_BIT 0x00000080
  63. #define GLX_CONFIG_CAVEAT 0x20
  64. #define GLX_X_VISUAL_TYPE 0x22
  65. #define GLX_TRANSPARENT_TYPE 0x23
  66. #define GLX_TRANSPARENT_INDEX_VALUE 0x24
  67. #define GLX_TRANSPARENT_RED_VALUE 0x25
  68. #define GLX_TRANSPARENT_GREEN_VALUE 0x26
  69. #define GLX_TRANSPARENT_BLUE_VALUE 0x27
  70. #define GLX_TRANSPARENT_ALPHA_VALUE 0x28
  71. #define GLX_DONT_CARE 0xFFFFFFFF
  72. #define GLX_NONE 0x8000
  73. #define GLX_SLOW_CONFIG 0x8001
  74. #define GLX_TRUE_COLOR 0x8002
  75. #define GLX_DIRECT_COLOR 0x8003
  76. #define GLX_PSEUDO_COLOR 0x8004
  77. #define GLX_STATIC_COLOR 0x8005
  78. #define GLX_GRAY_SCALE 0x8006
  79. #define GLX_STATIC_GRAY 0x8007
  80. #define GLX_TRANSPARENT_RGB 0x8008
  81. #define GLX_TRANSPARENT_INDEX 0x8009
  82. #define GLX_VISUAL_ID 0x800B
  83. #define GLX_SCREEN 0x800C
  84. #define GLX_NON_CONFORMANT_CONFIG 0x800D
  85. #define GLX_DRAWABLE_TYPE 0x8010
  86. #define GLX_RENDER_TYPE 0x8011
  87. #define GLX_X_RENDERABLE 0x8012
  88. #define GLX_FBCONFIG_ID 0x8013
  89. #define GLX_RGBA_TYPE 0x8014
  90. #define GLX_COLOR_INDEX_TYPE 0x8015
  91. #define GLX_MAX_PBUFFER_WIDTH 0x8016
  92. #define GLX_MAX_PBUFFER_HEIGHT 0x8017
  93. #define GLX_MAX_PBUFFER_PIXELS 0x8018
  94. #define GLX_PRESERVED_CONTENTS 0x801B
  95. #define GLX_LARGEST_PBUFFER 0x801C
  96. #define GLX_WIDTH 0x801D
  97. #define GLX_HEIGHT 0x801E
  98. #define GLX_EVENT_MASK 0x801F
  99. #define GLX_DAMAGED 0x8020
  100. #define GLX_SAVED 0x8021
  101. #define GLX_WINDOW 0x8022
  102. #define GLX_PBUFFER 0x8023
  103. #define GLX_PBUFFER_HEIGHT 0x8040
  104. #define GLX_PBUFFER_WIDTH 0x8041
  105. typedef GLXFBConfig *( *PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements);
  106. typedef GLXFBConfig *( *PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements);
  107. typedef int ( *PFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value);
  108. typedef XVisualInfo *( *PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config);
  109. typedef GLXWindow ( *PFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list);
  110. typedef void ( *PFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win);
  111. typedef GLXPixmap ( *PFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list);
  112. typedef void ( *PFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap);
  113. typedef GLXPbuffer ( *PFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list);
  114. typedef void ( *PFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf);
  115. typedef void ( *PFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
  116. typedef GLXContext ( *PFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
  117. typedef Bool ( *PFNGLXMAKECONTEXTCURRENTPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
  118. typedef GLXDrawable ( *PFNGLXGETCURRENTREADDRAWABLEPROC) (void);
  119. typedef int ( *PFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value);
  120. typedef void ( *PFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask);
  121. typedef void ( *PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
  122. #ifdef GLX_GLXEXT_PROTOTYPES
  123. GLXFBConfig *glXGetFBConfigs (Display *dpy, int screen, int *nelements);
  124. GLXFBConfig *glXChooseFBConfig (Display *dpy, int screen, const int *attrib_list, int *nelements);
  125. int glXGetFBConfigAttrib (Display *dpy, GLXFBConfig config, int attribute, int *value);
  126. XVisualInfo *glXGetVisualFromFBConfig (Display *dpy, GLXFBConfig config);
  127. GLXWindow glXCreateWindow (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list);
  128. void glXDestroyWindow (Display *dpy, GLXWindow win);
  129. GLXPixmap glXCreatePixmap (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list);
  130. void glXDestroyPixmap (Display *dpy, GLXPixmap pixmap);
  131. GLXPbuffer glXCreatePbuffer (Display *dpy, GLXFBConfig config, const int *attrib_list);
  132. void glXDestroyPbuffer (Display *dpy, GLXPbuffer pbuf);
  133. void glXQueryDrawable (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
  134. GLXContext glXCreateNewContext (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
  135. Bool glXMakeContextCurrent (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
  136. GLXDrawable glXGetCurrentReadDrawable (void);
  137. int glXQueryContext (Display *dpy, GLXContext ctx, int attribute, int *value);
  138. void glXSelectEvent (Display *dpy, GLXDrawable draw, unsigned long event_mask);
  139. void glXGetSelectedEvent (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
  140. #endif
  141. #endif /* GLX_VERSION_1_3 */
  142. #ifndef GLX_VERSION_1_4
  143. #define GLX_VERSION_1_4 1
  144. typedef void ( *__GLXextFuncPtr)(void);
  145. #define GLX_SAMPLE_BUFFERS 100000
  146. #define GLX_SAMPLES 100001
  147. typedef __GLXextFuncPtr ( *PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName);
  148. #ifdef GLX_GLXEXT_PROTOTYPES
  149. __GLXextFuncPtr glXGetProcAddress (const GLubyte *procName);
  150. #endif
  151. #endif /* GLX_VERSION_1_4 */
  152. #ifndef GLX_ARB_context_flush_control
  153. #define GLX_ARB_context_flush_control 1
  154. #define GLX_CONTEXT_RELEASE_BEHAVIOR_ARB 0x2097
  155. #define GLX_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB 0
  156. #define GLX_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB 0x2098
  157. #endif /* GLX_ARB_context_flush_control */
  158. #ifndef GLX_ARB_create_context
  159. #define GLX_ARB_create_context 1
  160. #define GLX_CONTEXT_DEBUG_BIT_ARB 0x00000001
  161. #define GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002
  162. #define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091
  163. #define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092
  164. #define GLX_CONTEXT_FLAGS_ARB 0x2094
  165. typedef GLXContext ( *PFNGLXCREATECONTEXTATTRIBSARBPROC) (Display *dpy, GLXFBConfig config, GLXContext share_context, Bool direct, const int *attrib_list);
  166. #ifdef GLX_GLXEXT_PROTOTYPES
  167. GLXContext glXCreateContextAttribsARB (Display *dpy, GLXFBConfig config, GLXContext share_context, Bool direct, const int *attrib_list);
  168. #endif
  169. #endif /* GLX_ARB_create_context */
  170. #ifndef GLX_ARB_create_context_profile
  171. #define GLX_ARB_create_context_profile 1
  172. #define GLX_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
  173. #define GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002
  174. #define GLX_CONTEXT_PROFILE_MASK_ARB 0x9126
  175. #endif /* GLX_ARB_create_context_profile */
  176. #ifndef GLX_ARB_create_context_robustness
  177. #define GLX_ARB_create_context_robustness 1
  178. #define GLX_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004
  179. #define GLX_LOSE_CONTEXT_ON_RESET_ARB 0x8252
  180. #define GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256
  181. #define GLX_NO_RESET_NOTIFICATION_ARB 0x8261
  182. #endif /* GLX_ARB_create_context_robustness */
  183. #ifndef GLX_ARB_fbconfig_float
  184. #define GLX_ARB_fbconfig_float 1
  185. #define GLX_RGBA_FLOAT_TYPE_ARB 0x20B9
  186. #define GLX_RGBA_FLOAT_BIT_ARB 0x00000004
  187. #endif /* GLX_ARB_fbconfig_float */
  188. #ifndef GLX_ARB_framebuffer_sRGB
  189. #define GLX_ARB_framebuffer_sRGB 1
  190. #define GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20B2
  191. #endif /* GLX_ARB_framebuffer_sRGB */
  192. #ifndef GLX_ARB_get_proc_address
  193. #define GLX_ARB_get_proc_address 1
  194. typedef __GLXextFuncPtr ( *PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procName);
  195. #ifdef GLX_GLXEXT_PROTOTYPES
  196. __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *procName);
  197. #endif
  198. #endif /* GLX_ARB_get_proc_address */
  199. #ifndef GLX_ARB_multisample
  200. #define GLX_ARB_multisample 1
  201. #define GLX_SAMPLE_BUFFERS_ARB 100000
  202. #define GLX_SAMPLES_ARB 100001
  203. #endif /* GLX_ARB_multisample */
  204. #ifndef GLX_ARB_robustness_application_isolation
  205. #define GLX_ARB_robustness_application_isolation 1
  206. #define GLX_CONTEXT_RESET_ISOLATION_BIT_ARB 0x00000008
  207. #endif /* GLX_ARB_robustness_application_isolation */
  208. #ifndef GLX_ARB_robustness_share_group_isolation
  209. #define GLX_ARB_robustness_share_group_isolation 1
  210. #endif /* GLX_ARB_robustness_share_group_isolation */
  211. #ifndef GLX_ARB_vertex_buffer_object
  212. #define GLX_ARB_vertex_buffer_object 1
  213. #define GLX_CONTEXT_ALLOW_BUFFER_BYTE_ORDER_MISMATCH_ARB 0x2095
  214. #endif /* GLX_ARB_vertex_buffer_object */
  215. #ifndef GLX_3DFX_multisample
  216. #define GLX_3DFX_multisample 1
  217. #define GLX_SAMPLE_BUFFERS_3DFX 0x8050
  218. #define GLX_SAMPLES_3DFX 0x8051
  219. #endif /* GLX_3DFX_multisample */
  220. #ifndef GLX_AMD_gpu_association
  221. #define GLX_AMD_gpu_association 1
  222. #define GLX_GPU_VENDOR_AMD 0x1F00
  223. #define GLX_GPU_RENDERER_STRING_AMD 0x1F01
  224. #define GLX_GPU_OPENGL_VERSION_STRING_AMD 0x1F02
  225. #define GLX_GPU_FASTEST_TARGET_GPUS_AMD 0x21A2
  226. #define GLX_GPU_RAM_AMD 0x21A3
  227. #define GLX_GPU_CLOCK_AMD 0x21A4
  228. #define GLX_GPU_NUM_PIPES_AMD 0x21A5
  229. #define GLX_GPU_NUM_SIMD_AMD 0x21A6
  230. #define GLX_GPU_NUM_RB_AMD 0x21A7
  231. #define GLX_GPU_NUM_SPI_AMD 0x21A8
  232. typedef unsigned int ( *PFNGLXGETGPUIDSAMDPROC) (unsigned int maxCount, unsigned int *ids);
  233. typedef int ( *PFNGLXGETGPUINFOAMDPROC) (unsigned int id, int property, GLenum dataType, unsigned int size, void *data);
  234. typedef unsigned int ( *PFNGLXGETCONTEXTGPUIDAMDPROC) (GLXContext ctx);
  235. typedef GLXContext ( *PFNGLXCREATEASSOCIATEDCONTEXTAMDPROC) (unsigned int id, GLXContext share_list);
  236. typedef GLXContext ( *PFNGLXCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC) (unsigned int id, GLXContext share_context, const int *attribList);
  237. typedef Bool ( *PFNGLXDELETEASSOCIATEDCONTEXTAMDPROC) (GLXContext ctx);
  238. typedef Bool ( *PFNGLXMAKEASSOCIATEDCONTEXTCURRENTAMDPROC) (GLXContext ctx);
  239. typedef GLXContext ( *PFNGLXGETCURRENTASSOCIATEDCONTEXTAMDPROC) (void);
  240. typedef void ( *PFNGLXBLITCONTEXTFRAMEBUFFERAMDPROC) (GLXContext dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
  241. #ifdef GLX_GLXEXT_PROTOTYPES
  242. unsigned int glXGetGPUIDsAMD (unsigned int maxCount, unsigned int *ids);
  243. int glXGetGPUInfoAMD (unsigned int id, int property, GLenum dataType, unsigned int size, void *data);
  244. unsigned int glXGetContextGPUIDAMD (GLXContext ctx);
  245. GLXContext glXCreateAssociatedContextAMD (unsigned int id, GLXContext share_list);
  246. GLXContext glXCreateAssociatedContextAttribsAMD (unsigned int id, GLXContext share_context, const int *attribList);
  247. Bool glXDeleteAssociatedContextAMD (GLXContext ctx);
  248. Bool glXMakeAssociatedContextCurrentAMD (GLXContext ctx);
  249. GLXContext glXGetCurrentAssociatedContextAMD (void);
  250. void glXBlitContextFramebufferAMD (GLXContext dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
  251. #endif
  252. #endif /* GLX_AMD_gpu_association */
  253. #ifndef GLX_EXT_buffer_age
  254. #define GLX_EXT_buffer_age 1
  255. #define GLX_BACK_BUFFER_AGE_EXT 0x20F4
  256. #endif /* GLX_EXT_buffer_age */
  257. #ifndef GLX_EXT_create_context_es2_profile
  258. #define GLX_EXT_create_context_es2_profile 1
  259. #define GLX_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004
  260. #endif /* GLX_EXT_create_context_es2_profile */
  261. #ifndef GLX_EXT_create_context_es_profile
  262. #define GLX_EXT_create_context_es_profile 1
  263. #define GLX_CONTEXT_ES_PROFILE_BIT_EXT 0x00000004
  264. #endif /* GLX_EXT_create_context_es_profile */
  265. #ifndef GLX_EXT_fbconfig_packed_float
  266. #define GLX_EXT_fbconfig_packed_float 1
  267. #define GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT 0x20B1
  268. #define GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT 0x00000008
  269. #endif /* GLX_EXT_fbconfig_packed_float */
  270. #ifndef GLX_EXT_framebuffer_sRGB
  271. #define GLX_EXT_framebuffer_sRGB 1
  272. #define GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20B2
  273. #endif /* GLX_EXT_framebuffer_sRGB */
  274. #ifndef GLX_EXT_import_context
  275. #define GLX_EXT_import_context 1
  276. #define GLX_SHARE_CONTEXT_EXT 0x800A
  277. #define GLX_VISUAL_ID_EXT 0x800B
  278. #define GLX_SCREEN_EXT 0x800C
  279. typedef Display *( *PFNGLXGETCURRENTDISPLAYEXTPROC) (void);
  280. typedef int ( *PFNGLXQUERYCONTEXTINFOEXTPROC) (Display *dpy, GLXContext context, int attribute, int *value);
  281. typedef GLXContextID ( *PFNGLXGETCONTEXTIDEXTPROC) (const GLXContext context);
  282. typedef GLXContext ( *PFNGLXIMPORTCONTEXTEXTPROC) (Display *dpy, GLXContextID contextID);
  283. typedef void ( *PFNGLXFREECONTEXTEXTPROC) (Display *dpy, GLXContext context);
  284. #ifdef GLX_GLXEXT_PROTOTYPES
  285. Display *glXGetCurrentDisplayEXT (void);
  286. int glXQueryContextInfoEXT (Display *dpy, GLXContext context, int attribute, int *value);
  287. GLXContextID glXGetContextIDEXT (const GLXContext context);
  288. GLXContext glXImportContextEXT (Display *dpy, GLXContextID contextID);
  289. void glXFreeContextEXT (Display *dpy, GLXContext context);
  290. #endif
  291. #endif /* GLX_EXT_import_context */
  292. #ifndef GLX_EXT_libglvnd
  293. #define GLX_EXT_libglvnd 1
  294. #define GLX_VENDOR_NAMES_EXT 0x20F6
  295. #endif /* GLX_EXT_libglvnd */
  296. #ifndef GLX_EXT_stereo_tree
  297. #define GLX_EXT_stereo_tree 1
  298. typedef struct {
  299. int type;
  300. unsigned long serial;
  301. Bool send_event;
  302. Display *display;
  303. int extension;
  304. int evtype;
  305. GLXDrawable window;
  306. Bool stereo_tree;
  307. } GLXStereoNotifyEventEXT;
  308. #define GLX_STEREO_TREE_EXT 0x20F5
  309. #define GLX_STEREO_NOTIFY_MASK_EXT 0x00000001
  310. #define GLX_STEREO_NOTIFY_EXT 0x00000000
  311. #endif /* GLX_EXT_stereo_tree */
  312. #ifndef GLX_EXT_swap_control
  313. #define GLX_EXT_swap_control 1
  314. #define GLX_SWAP_INTERVAL_EXT 0x20F1
  315. #define GLX_MAX_SWAP_INTERVAL_EXT 0x20F2
  316. typedef void ( *PFNGLXSWAPINTERVALEXTPROC) (Display *dpy, GLXDrawable drawable, int interval);
  317. #ifdef GLX_GLXEXT_PROTOTYPES
  318. void glXSwapIntervalEXT (Display *dpy, GLXDrawable drawable, int interval);
  319. #endif
  320. #endif /* GLX_EXT_swap_control */
  321. #ifndef GLX_EXT_swap_control_tear
  322. #define GLX_EXT_swap_control_tear 1
  323. #define GLX_LATE_SWAPS_TEAR_EXT 0x20F3
  324. #endif /* GLX_EXT_swap_control_tear */
  325. #ifndef GLX_EXT_texture_from_pixmap
  326. #define GLX_EXT_texture_from_pixmap 1
  327. #define GLX_TEXTURE_1D_BIT_EXT 0x00000001
  328. #define GLX_TEXTURE_2D_BIT_EXT 0x00000002
  329. #define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
  330. #define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0
  331. #define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1
  332. #define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2
  333. #define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3
  334. #define GLX_Y_INVERTED_EXT 0x20D4
  335. #define GLX_TEXTURE_FORMAT_EXT 0x20D5
  336. #define GLX_TEXTURE_TARGET_EXT 0x20D6
  337. #define GLX_MIPMAP_TEXTURE_EXT 0x20D7
  338. #define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8
  339. #define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9
  340. #define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA
  341. #define GLX_TEXTURE_1D_EXT 0x20DB
  342. #define GLX_TEXTURE_2D_EXT 0x20DC
  343. #define GLX_TEXTURE_RECTANGLE_EXT 0x20DD
  344. #define GLX_FRONT_LEFT_EXT 0x20DE
  345. #define GLX_FRONT_RIGHT_EXT 0x20DF
  346. #define GLX_BACK_LEFT_EXT 0x20E0
  347. #define GLX_BACK_RIGHT_EXT 0x20E1
  348. #define GLX_FRONT_EXT 0x20DE
  349. #define GLX_BACK_EXT 0x20E0
  350. #define GLX_AUX0_EXT 0x20E2
  351. #define GLX_AUX1_EXT 0x20E3
  352. #define GLX_AUX2_EXT 0x20E4
  353. #define GLX_AUX3_EXT 0x20E5
  354. #define GLX_AUX4_EXT 0x20E6
  355. #define GLX_AUX5_EXT 0x20E7
  356. #define GLX_AUX6_EXT 0x20E8
  357. #define GLX_AUX7_EXT 0x20E9
  358. #define GLX_AUX8_EXT 0x20EA
  359. #define GLX_AUX9_EXT 0x20EB
  360. typedef void ( *PFNGLXBINDTEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list);
  361. typedef void ( *PFNGLXRELEASETEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer);
  362. #ifdef GLX_GLXEXT_PROTOTYPES
  363. void glXBindTexImageEXT (Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list);
  364. void glXReleaseTexImageEXT (Display *dpy, GLXDrawable drawable, int buffer);
  365. #endif
  366. #endif /* GLX_EXT_texture_from_pixmap */
  367. #ifndef GLX_EXT_visual_info
  368. #define GLX_EXT_visual_info 1
  369. #define GLX_X_VISUAL_TYPE_EXT 0x22
  370. #define GLX_TRANSPARENT_TYPE_EXT 0x23
  371. #define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24
  372. #define GLX_TRANSPARENT_RED_VALUE_EXT 0x25
  373. #define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26
  374. #define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27
  375. #define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28
  376. #define GLX_NONE_EXT 0x8000
  377. #define GLX_TRUE_COLOR_EXT 0x8002
  378. #define GLX_DIRECT_COLOR_EXT 0x8003
  379. #define GLX_PSEUDO_COLOR_EXT 0x8004
  380. #define GLX_STATIC_COLOR_EXT 0x8005
  381. #define GLX_GRAY_SCALE_EXT 0x8006
  382. #define GLX_STATIC_GRAY_EXT 0x8007
  383. #define GLX_TRANSPARENT_RGB_EXT 0x8008
  384. #define GLX_TRANSPARENT_INDEX_EXT 0x8009
  385. #endif /* GLX_EXT_visual_info */
  386. #ifndef GLX_EXT_visual_rating
  387. #define GLX_EXT_visual_rating 1
  388. #define GLX_VISUAL_CAVEAT_EXT 0x20
  389. #define GLX_SLOW_VISUAL_EXT 0x8001
  390. #define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D
  391. #endif /* GLX_EXT_visual_rating */
  392. #ifndef GLX_INTEL_swap_event
  393. #define GLX_INTEL_swap_event 1
  394. #define GLX_BUFFER_SWAP_COMPLETE_INTEL_MASK 0x04000000
  395. #define GLX_EXCHANGE_COMPLETE_INTEL 0x8180
  396. #define GLX_COPY_COMPLETE_INTEL 0x8181
  397. #define GLX_FLIP_COMPLETE_INTEL 0x8182
  398. #endif /* GLX_INTEL_swap_event */
  399. #ifndef GLX_MESA_agp_offset
  400. #define GLX_MESA_agp_offset 1
  401. typedef unsigned int ( *PFNGLXGETAGPOFFSETMESAPROC) (const void *pointer);
  402. #ifdef GLX_GLXEXT_PROTOTYPES
  403. unsigned int glXGetAGPOffsetMESA (const void *pointer);
  404. #endif
  405. #endif /* GLX_MESA_agp_offset */
  406. #ifndef GLX_MESA_copy_sub_buffer
  407. #define GLX_MESA_copy_sub_buffer 1
  408. typedef void ( *PFNGLXCOPYSUBBUFFERMESAPROC) (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height);
  409. #ifdef GLX_GLXEXT_PROTOTYPES
  410. void glXCopySubBufferMESA (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height);
  411. #endif
  412. #endif /* GLX_MESA_copy_sub_buffer */
  413. #ifndef GLX_MESA_pixmap_colormap
  414. #define GLX_MESA_pixmap_colormap 1
  415. typedef GLXPixmap ( *PFNGLXCREATEGLXPIXMAPMESAPROC) (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap);
  416. #ifdef GLX_GLXEXT_PROTOTYPES
  417. GLXPixmap glXCreateGLXPixmapMESA (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap);
  418. #endif
  419. #endif /* GLX_MESA_pixmap_colormap */
  420. #ifndef GLX_MESA_query_renderer
  421. #define GLX_MESA_query_renderer 1
  422. #define GLX_RENDERER_VENDOR_ID_MESA 0x8183
  423. #define GLX_RENDERER_DEVICE_ID_MESA 0x8184
  424. #define GLX_RENDERER_VERSION_MESA 0x8185
  425. #define GLX_RENDERER_ACCELERATED_MESA 0x8186
  426. #define GLX_RENDERER_VIDEO_MEMORY_MESA 0x8187
  427. #define GLX_RENDERER_UNIFIED_MEMORY_ARCHITECTURE_MESA 0x8188
  428. #define GLX_RENDERER_PREFERRED_PROFILE_MESA 0x8189
  429. #define GLX_RENDERER_OPENGL_CORE_PROFILE_VERSION_MESA 0x818A
  430. #define GLX_RENDERER_OPENGL_COMPATIBILITY_PROFILE_VERSION_MESA 0x818B
  431. #define GLX_RENDERER_OPENGL_ES_PROFILE_VERSION_MESA 0x818C
  432. #define GLX_RENDERER_OPENGL_ES2_PROFILE_VERSION_MESA 0x818D
  433. #define GLX_RENDERER_ID_MESA 0x818E
  434. typedef Bool ( *PFNGLXQUERYCURRENTRENDERERINTEGERMESAPROC) (int attribute, unsigned int *value);
  435. typedef const char *( *PFNGLXQUERYCURRENTRENDERERSTRINGMESAPROC) (int attribute);
  436. typedef Bool ( *PFNGLXQUERYRENDERERINTEGERMESAPROC) (Display *dpy, int screen, int renderer, int attribute, unsigned int *value);
  437. typedef const char *( *PFNGLXQUERYRENDERERSTRINGMESAPROC) (Display *dpy, int screen, int renderer, int attribute);
  438. #ifdef GLX_GLXEXT_PROTOTYPES
  439. Bool glXQueryCurrentRendererIntegerMESA (int attribute, unsigned int *value);
  440. const char *glXQueryCurrentRendererStringMESA (int attribute);
  441. Bool glXQueryRendererIntegerMESA (Display *dpy, int screen, int renderer, int attribute, unsigned int *value);
  442. const char *glXQueryRendererStringMESA (Display *dpy, int screen, int renderer, int attribute);
  443. #endif
  444. #endif /* GLX_MESA_query_renderer */
  445. #ifndef GLX_MESA_release_buffers
  446. #define GLX_MESA_release_buffers 1
  447. typedef Bool ( *PFNGLXRELEASEBUFFERSMESAPROC) (Display *dpy, GLXDrawable drawable);
  448. #ifdef GLX_GLXEXT_PROTOTYPES
  449. Bool glXReleaseBuffersMESA (Display *dpy, GLXDrawable drawable);
  450. #endif
  451. #endif /* GLX_MESA_release_buffers */
  452. #ifndef GLX_MESA_set_3dfx_mode
  453. #define GLX_MESA_set_3dfx_mode 1
  454. #define GLX_3DFX_WINDOW_MODE_MESA 0x1
  455. #define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2
  456. typedef Bool ( *PFNGLXSET3DFXMODEMESAPROC) (int mode);
  457. #ifdef GLX_GLXEXT_PROTOTYPES
  458. Bool glXSet3DfxModeMESA (int mode);
  459. #endif
  460. #endif /* GLX_MESA_set_3dfx_mode */
  461. #ifndef GLX_NV_copy_buffer
  462. #define GLX_NV_copy_buffer 1
  463. typedef void ( *PFNGLXCOPYBUFFERSUBDATANVPROC) (Display *dpy, GLXContext readCtx, GLXContext writeCtx, GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
  464. typedef void ( *PFNGLXNAMEDCOPYBUFFERSUBDATANVPROC) (Display *dpy, GLXContext readCtx, GLXContext writeCtx, GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
  465. #ifdef GLX_GLXEXT_PROTOTYPES
  466. void glXCopyBufferSubDataNV (Display *dpy, GLXContext readCtx, GLXContext writeCtx, GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
  467. void glXNamedCopyBufferSubDataNV (Display *dpy, GLXContext readCtx, GLXContext writeCtx, GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
  468. #endif
  469. #endif /* GLX_NV_copy_buffer */
  470. #ifndef GLX_NV_copy_image
  471. #define GLX_NV_copy_image 1
  472. typedef void ( *PFNGLXCOPYIMAGESUBDATANVPROC) (Display *dpy, GLXContext srcCtx, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLXContext dstCtx, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
  473. #ifdef GLX_GLXEXT_PROTOTYPES
  474. void glXCopyImageSubDataNV (Display *dpy, GLXContext srcCtx, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLXContext dstCtx, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
  475. #endif
  476. #endif /* GLX_NV_copy_image */
  477. #ifndef GLX_NV_delay_before_swap
  478. #define GLX_NV_delay_before_swap 1
  479. typedef Bool ( *PFNGLXDELAYBEFORESWAPNVPROC) (Display *dpy, GLXDrawable drawable, GLfloat seconds);
  480. #ifdef GLX_GLXEXT_PROTOTYPES
  481. Bool glXDelayBeforeSwapNV (Display *dpy, GLXDrawable drawable, GLfloat seconds);
  482. #endif
  483. #endif /* GLX_NV_delay_before_swap */
  484. #ifndef GLX_NV_float_buffer
  485. #define GLX_NV_float_buffer 1
  486. #define GLX_FLOAT_COMPONENTS_NV 0x20B0
  487. #endif /* GLX_NV_float_buffer */
  488. #ifndef GLX_NV_multisample_coverage
  489. #define GLX_NV_multisample_coverage 1
  490. #define GLX_COVERAGE_SAMPLES_NV 100001
  491. #define GLX_COLOR_SAMPLES_NV 0x20B3
  492. #endif /* GLX_NV_multisample_coverage */
  493. #ifndef GLX_NV_present_video
  494. #define GLX_NV_present_video 1
  495. #define GLX_NUM_VIDEO_SLOTS_NV 0x20F0
  496. typedef unsigned int *( *PFNGLXENUMERATEVIDEODEVICESNVPROC) (Display *dpy, int screen, int *nelements);
  497. typedef int ( *PFNGLXBINDVIDEODEVICENVPROC) (Display *dpy, unsigned int video_slot, unsigned int video_device, const int *attrib_list);
  498. #ifdef GLX_GLXEXT_PROTOTYPES
  499. unsigned int *glXEnumerateVideoDevicesNV (Display *dpy, int screen, int *nelements);
  500. int glXBindVideoDeviceNV (Display *dpy, unsigned int video_slot, unsigned int video_device, const int *attrib_list);
  501. #endif
  502. #endif /* GLX_NV_present_video */
  503. #ifndef GLX_NV_robustness_video_memory_purge
  504. #define GLX_NV_robustness_video_memory_purge 1
  505. #define GLX_GENERATE_RESET_ON_VIDEO_MEMORY_PURGE_NV 0x20F7
  506. #endif /* GLX_NV_robustness_video_memory_purge */
  507. #ifndef GLX_NV_swap_group
  508. #define GLX_NV_swap_group 1
  509. typedef Bool ( *PFNGLXJOINSWAPGROUPNVPROC) (Display *dpy, GLXDrawable drawable, GLuint group);
  510. typedef Bool ( *PFNGLXBINDSWAPBARRIERNVPROC) (Display *dpy, GLuint group, GLuint barrier);
  511. typedef Bool ( *PFNGLXQUERYSWAPGROUPNVPROC) (Display *dpy, GLXDrawable drawable, GLuint *group, GLuint *barrier);
  512. typedef Bool ( *PFNGLXQUERYMAXSWAPGROUPSNVPROC) (Display *dpy, int screen, GLuint *maxGroups, GLuint *maxBarriers);
  513. typedef Bool ( *PFNGLXQUERYFRAMECOUNTNVPROC) (Display *dpy, int screen, GLuint *count);
  514. typedef Bool ( *PFNGLXRESETFRAMECOUNTNVPROC) (Display *dpy, int screen);
  515. #ifdef GLX_GLXEXT_PROTOTYPES
  516. Bool glXJoinSwapGroupNV (Display *dpy, GLXDrawable drawable, GLuint group);
  517. Bool glXBindSwapBarrierNV (Display *dpy, GLuint group, GLuint barrier);
  518. Bool glXQuerySwapGroupNV (Display *dpy, GLXDrawable drawable, GLuint *group, GLuint *barrier);
  519. Bool glXQueryMaxSwapGroupsNV (Display *dpy, int screen, GLuint *maxGroups, GLuint *maxBarriers);
  520. Bool glXQueryFrameCountNV (Display *dpy, int screen, GLuint *count);
  521. Bool glXResetFrameCountNV (Display *dpy, int screen);
  522. #endif
  523. #endif /* GLX_NV_swap_group */
  524. #ifndef GLX_NV_video_capture
  525. #define GLX_NV_video_capture 1
  526. typedef XID GLXVideoCaptureDeviceNV;
  527. #define GLX_DEVICE_ID_NV 0x20CD
  528. #define GLX_UNIQUE_ID_NV 0x20CE
  529. #define GLX_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20CF
  530. typedef int ( *PFNGLXBINDVIDEOCAPTUREDEVICENVPROC) (Display *dpy, unsigned int video_capture_slot, GLXVideoCaptureDeviceNV device);
  531. typedef GLXVideoCaptureDeviceNV *( *PFNGLXENUMERATEVIDEOCAPTUREDEVICESNVPROC) (Display *dpy, int screen, int *nelements);
  532. typedef void ( *PFNGLXLOCKVIDEOCAPTUREDEVICENVPROC) (Display *dpy, GLXVideoCaptureDeviceNV device);
  533. typedef int ( *PFNGLXQUERYVIDEOCAPTUREDEVICENVPROC) (Display *dpy, GLXVideoCaptureDeviceNV device, int attribute, int *value);
  534. typedef void ( *PFNGLXRELEASEVIDEOCAPTUREDEVICENVPROC) (Display *dpy, GLXVideoCaptureDeviceNV device);
  535. #ifdef GLX_GLXEXT_PROTOTYPES
  536. int glXBindVideoCaptureDeviceNV (Display *dpy, unsigned int video_capture_slot, GLXVideoCaptureDeviceNV device);
  537. GLXVideoCaptureDeviceNV *glXEnumerateVideoCaptureDevicesNV (Display *dpy, int screen, int *nelements);
  538. void glXLockVideoCaptureDeviceNV (Display *dpy, GLXVideoCaptureDeviceNV device);
  539. int glXQueryVideoCaptureDeviceNV (Display *dpy, GLXVideoCaptureDeviceNV device, int attribute, int *value);
  540. void glXReleaseVideoCaptureDeviceNV (Display *dpy, GLXVideoCaptureDeviceNV device);
  541. #endif
  542. #endif /* GLX_NV_video_capture */
  543. #ifndef GLX_NV_video_out
  544. #define GLX_NV_video_out 1
  545. typedef unsigned int GLXVideoDeviceNV;
  546. #define GLX_VIDEO_OUT_COLOR_NV 0x20C3
  547. #define GLX_VIDEO_OUT_ALPHA_NV 0x20C4
  548. #define GLX_VIDEO_OUT_DEPTH_NV 0x20C5
  549. #define GLX_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6
  550. #define GLX_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7
  551. #define GLX_VIDEO_OUT_FRAME_NV 0x20C8
  552. #define GLX_VIDEO_OUT_FIELD_1_NV 0x20C9
  553. #define GLX_VIDEO_OUT_FIELD_2_NV 0x20CA
  554. #define GLX_VIDEO_OUT_STACKED_FIELDS_1_2_NV 0x20CB
  555. #define GLX_VIDEO_OUT_STACKED_FIELDS_2_1_NV 0x20CC
  556. typedef int ( *PFNGLXGETVIDEODEVICENVPROC) (Display *dpy, int screen, int numVideoDevices, GLXVideoDeviceNV *pVideoDevice);
  557. typedef int ( *PFNGLXRELEASEVIDEODEVICENVPROC) (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice);
  558. typedef int ( *PFNGLXBINDVIDEOIMAGENVPROC) (Display *dpy, GLXVideoDeviceNV VideoDevice, GLXPbuffer pbuf, int iVideoBuffer);
  559. typedef int ( *PFNGLXRELEASEVIDEOIMAGENVPROC) (Display *dpy, GLXPbuffer pbuf);
  560. typedef int ( *PFNGLXSENDPBUFFERTOVIDEONVPROC) (Display *dpy, GLXPbuffer pbuf, int iBufferType, unsigned long *pulCounterPbuffer, GLboolean bBlock);
  561. typedef int ( *PFNGLXGETVIDEOINFONVPROC) (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo);
  562. #ifdef GLX_GLXEXT_PROTOTYPES
  563. int glXGetVideoDeviceNV (Display *dpy, int screen, int numVideoDevices, GLXVideoDeviceNV *pVideoDevice);
  564. int glXReleaseVideoDeviceNV (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice);
  565. int glXBindVideoImageNV (Display *dpy, GLXVideoDeviceNV VideoDevice, GLXPbuffer pbuf, int iVideoBuffer);
  566. int glXReleaseVideoImageNV (Display *dpy, GLXPbuffer pbuf);
  567. int glXSendPbufferToVideoNV (Display *dpy, GLXPbuffer pbuf, int iBufferType, unsigned long *pulCounterPbuffer, GLboolean bBlock);
  568. int glXGetVideoInfoNV (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo);
  569. #endif
  570. #endif /* GLX_NV_video_out */
  571. #ifndef GLX_OML_swap_method
  572. #define GLX_OML_swap_method 1
  573. #define GLX_SWAP_METHOD_OML 0x8060
  574. #define GLX_SWAP_EXCHANGE_OML 0x8061
  575. #define GLX_SWAP_COPY_OML 0x8062
  576. #define GLX_SWAP_UNDEFINED_OML 0x8063
  577. #endif /* GLX_OML_swap_method */
  578. #ifndef GLX_OML_sync_control
  579. #define GLX_OML_sync_control 1
  580. #ifndef GLEXT_64_TYPES_DEFINED
  581. /* This code block is duplicated in glext.h, so must be protected */
  582. #define GLEXT_64_TYPES_DEFINED
  583. /* Define int32_t, int64_t, and uint64_t types for UST/MSC */
  584. /* (as used in the GLX_OML_sync_control extension). */
  585. #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
  586. #include <inttypes.h>
  587. #elif defined(__sun__) || defined(__digital__)
  588. #include <inttypes.h>
  589. #if defined(__STDC__)
  590. #if defined(__arch64__) || defined(_LP64)
  591. typedef long int int64_t;
  592. typedef unsigned long int uint64_t;
  593. #else
  594. typedef long long int int64_t;
  595. typedef unsigned long long int uint64_t;
  596. #endif /* __arch64__ */
  597. #endif /* __STDC__ */
  598. #elif defined( __VMS ) || defined(__sgi)
  599. #include <inttypes.h>
  600. #elif defined(__SCO__) || defined(__USLC__)
  601. #include <stdint.h>
  602. #elif defined(__UNIXOS2__) || defined(__SOL64__)
  603. typedef long int int32_t;
  604. typedef long long int int64_t;
  605. typedef unsigned long long int uint64_t;
  606. #elif defined(_WIN32) && defined(__GNUC__)
  607. #include <stdint.h>
  608. #elif defined(_WIN32)
  609. typedef __int32 int32_t;
  610. typedef __int64 int64_t;
  611. typedef unsigned __int64 uint64_t;
  612. #else
  613. /* Fallback if nothing above works */
  614. #include <inttypes.h>
  615. #endif
  616. #endif
  617. typedef Bool ( *PFNGLXGETSYNCVALUESOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc);
  618. typedef Bool ( *PFNGLXGETMSCRATEOMLPROC) (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator);
  619. typedef int64_t ( *PFNGLXSWAPBUFFERSMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder);
  620. 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);
  621. typedef Bool ( *PFNGLXWAITFORSBCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc);
  622. #ifdef GLX_GLXEXT_PROTOTYPES
  623. Bool glXGetSyncValuesOML (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc);
  624. Bool glXGetMscRateOML (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator);
  625. int64_t glXSwapBuffersMscOML (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder);
  626. Bool glXWaitForMscOML (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t *ust, int64_t *msc, int64_t *sbc);
  627. Bool glXWaitForSbcOML (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc);
  628. #endif
  629. #endif /* GLX_OML_sync_control */
  630. #ifndef GLX_SGIS_blended_overlay
  631. #define GLX_SGIS_blended_overlay 1
  632. #define GLX_BLENDED_RGBA_SGIS 0x8025
  633. #endif /* GLX_SGIS_blended_overlay */
  634. #ifndef GLX_SGIS_multisample
  635. #define GLX_SGIS_multisample 1
  636. #define GLX_SAMPLE_BUFFERS_SGIS 100000
  637. #define GLX_SAMPLES_SGIS 100001
  638. #endif /* GLX_SGIS_multisample */
  639. #ifndef GLX_SGIS_shared_multisample
  640. #define GLX_SGIS_shared_multisample 1
  641. #define GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS 0x8026
  642. #define GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS 0x8027
  643. #endif /* GLX_SGIS_shared_multisample */
  644. #ifndef GLX_SGIX_dmbuffer
  645. #define GLX_SGIX_dmbuffer 1
  646. typedef XID GLXPbufferSGIX;
  647. #ifdef _DM_BUFFER_H_
  648. #define GLX_DIGITAL_MEDIA_PBUFFER_SGIX 0x8024
  649. typedef Bool ( *PFNGLXASSOCIATEDMPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer);
  650. #ifdef GLX_GLXEXT_PROTOTYPES
  651. Bool glXAssociateDMPbufferSGIX (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer);
  652. #endif
  653. #endif /* _DM_BUFFER_H_ */
  654. #endif /* GLX_SGIX_dmbuffer */
  655. #ifndef GLX_SGIX_fbconfig
  656. #define GLX_SGIX_fbconfig 1
  657. typedef struct __GLXFBConfigRec *GLXFBConfigSGIX;
  658. #define GLX_WINDOW_BIT_SGIX 0x00000001
  659. #define GLX_PIXMAP_BIT_SGIX 0x00000002
  660. #define GLX_RGBA_BIT_SGIX 0x00000001
  661. #define GLX_COLOR_INDEX_BIT_SGIX 0x00000002
  662. #define GLX_DRAWABLE_TYPE_SGIX 0x8010
  663. #define GLX_RENDER_TYPE_SGIX 0x8011
  664. #define GLX_X_RENDERABLE_SGIX 0x8012
  665. #define GLX_FBCONFIG_ID_SGIX 0x8013
  666. #define GLX_RGBA_TYPE_SGIX 0x8014
  667. #define GLX_COLOR_INDEX_TYPE_SGIX 0x8015
  668. typedef int ( *PFNGLXGETFBCONFIGATTRIBSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value);
  669. typedef GLXFBConfigSGIX *( *PFNGLXCHOOSEFBCONFIGSGIXPROC) (Display *dpy, int screen, int *attrib_list, int *nelements);
  670. typedef GLXPixmap ( *PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap);
  671. typedef GLXContext ( *PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct);
  672. typedef XVisualInfo *( *PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config);
  673. typedef GLXFBConfigSGIX ( *PFNGLXGETFBCONFIGFROMVISUALSGIXPROC) (Display *dpy, XVisualInfo *vis);
  674. #ifdef GLX_GLXEXT_PROTOTYPES
  675. int glXGetFBConfigAttribSGIX (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value);
  676. GLXFBConfigSGIX *glXChooseFBConfigSGIX (Display *dpy, int screen, int *attrib_list, int *nelements);
  677. GLXPixmap glXCreateGLXPixmapWithConfigSGIX (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap);
  678. GLXContext glXCreateContextWithConfigSGIX (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct);
  679. XVisualInfo *glXGetVisualFromFBConfigSGIX (Display *dpy, GLXFBConfigSGIX config);
  680. GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX (Display *dpy, XVisualInfo *vis);
  681. #endif
  682. #endif /* GLX_SGIX_fbconfig */
  683. #ifndef GLX_SGIX_hyperpipe
  684. #define GLX_SGIX_hyperpipe 1
  685. typedef struct {
  686. char pipeName[80]; /* Should be [GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX] */
  687. int networkId;
  688. } GLXHyperpipeNetworkSGIX;
  689. typedef struct {
  690. char pipeName[80]; /* Should be [GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX] */
  691. int channel;
  692. unsigned int participationType;
  693. int timeSlice;
  694. } GLXHyperpipeConfigSGIX;
  695. typedef struct {
  696. char pipeName[80]; /* Should be [GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX] */
  697. int srcXOrigin, srcYOrigin, srcWidth, srcHeight;
  698. int destXOrigin, destYOrigin, destWidth, destHeight;
  699. } GLXPipeRect;
  700. typedef struct {
  701. char pipeName[80]; /* Should be [GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX] */
  702. int XOrigin, YOrigin, maxHeight, maxWidth;
  703. } GLXPipeRectLimits;
  704. #define GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX 80
  705. #define GLX_BAD_HYPERPIPE_CONFIG_SGIX 91
  706. #define GLX_BAD_HYPERPIPE_SGIX 92
  707. #define GLX_HYPERPIPE_DISPLAY_PIPE_SGIX 0x00000001
  708. #define GLX_HYPERPIPE_RENDER_PIPE_SGIX 0x00000002
  709. #define GLX_PIPE_RECT_SGIX 0x00000001
  710. #define GLX_PIPE_RECT_LIMITS_SGIX 0x00000002
  711. #define GLX_HYPERPIPE_STEREO_SGIX 0x00000003
  712. #define GLX_HYPERPIPE_PIXEL_AVERAGE_SGIX 0x00000004
  713. #define GLX_HYPERPIPE_ID_SGIX 0x8030
  714. typedef GLXHyperpipeNetworkSGIX *( *PFNGLXQUERYHYPERPIPENETWORKSGIXPROC) (Display *dpy, int *npipes);
  715. typedef int ( *PFNGLXHYPERPIPECONFIGSGIXPROC) (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId);
  716. typedef GLXHyperpipeConfigSGIX *( *PFNGLXQUERYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId, int *npipes);
  717. typedef int ( *PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId);
  718. typedef int ( *PFNGLXBINDHYPERPIPESGIXPROC) (Display *dpy, int hpId);
  719. typedef int ( *PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList);
  720. typedef int ( *PFNGLXHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList);
  721. typedef int ( *PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList);
  722. #ifdef GLX_GLXEXT_PROTOTYPES
  723. GLXHyperpipeNetworkSGIX *glXQueryHyperpipeNetworkSGIX (Display *dpy, int *npipes);
  724. int glXHyperpipeConfigSGIX (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId);
  725. GLXHyperpipeConfigSGIX *glXQueryHyperpipeConfigSGIX (Display *dpy, int hpId, int *npipes);
  726. int glXDestroyHyperpipeConfigSGIX (Display *dpy, int hpId);
  727. int glXBindHyperpipeSGIX (Display *dpy, int hpId);
  728. int glXQueryHyperpipeBestAttribSGIX (Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList);
  729. int glXHyperpipeAttribSGIX (Display *dpy, int timeSlice, int attrib, int size, void *attribList);
  730. int glXQueryHyperpipeAttribSGIX (Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList);
  731. #endif
  732. #endif /* GLX_SGIX_hyperpipe */
  733. #ifndef GLX_SGIX_pbuffer
  734. #define GLX_SGIX_pbuffer 1
  735. #define GLX_PBUFFER_BIT_SGIX 0x00000004
  736. #define GLX_BUFFER_CLOBBER_MASK_SGIX 0x08000000
  737. #define GLX_FRONT_LEFT_BUFFER_BIT_SGIX 0x00000001
  738. #define GLX_FRONT_RIGHT_BUFFER_BIT_SGIX 0x00000002
  739. #define GLX_BACK_LEFT_BUFFER_BIT_SGIX 0x00000004
  740. #define GLX_BACK_RIGHT_BUFFER_BIT_SGIX 0x00000008
  741. #define GLX_AUX_BUFFERS_BIT_SGIX 0x00000010
  742. #define GLX_DEPTH_BUFFER_BIT_SGIX 0x00000020
  743. #define GLX_STENCIL_BUFFER_BIT_SGIX 0x00000040
  744. #define GLX_ACCUM_BUFFER_BIT_SGIX 0x00000080
  745. #define GLX_SAMPLE_BUFFERS_BIT_SGIX 0x00000100
  746. #define GLX_MAX_PBUFFER_WIDTH_SGIX 0x8016
  747. #define GLX_MAX_PBUFFER_HEIGHT_SGIX 0x8017
  748. #define GLX_MAX_PBUFFER_PIXELS_SGIX 0x8018
  749. #define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019
  750. #define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A
  751. #define GLX_PRESERVED_CONTENTS_SGIX 0x801B
  752. #define GLX_LARGEST_PBUFFER_SGIX 0x801C
  753. #define GLX_WIDTH_SGIX 0x801D
  754. #define GLX_HEIGHT_SGIX 0x801E
  755. #define GLX_EVENT_MASK_SGIX 0x801F
  756. #define GLX_DAMAGED_SGIX 0x8020
  757. #define GLX_SAVED_SGIX 0x8021
  758. #define GLX_WINDOW_SGIX 0x8022
  759. #define GLX_PBUFFER_SGIX 0x8023
  760. typedef GLXPbufferSGIX ( *PFNGLXCREATEGLXPBUFFERSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list);
  761. typedef void ( *PFNGLXDESTROYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf);
  762. typedef int ( *PFNGLXQUERYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value);
  763. typedef void ( *PFNGLXSELECTEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long mask);
  764. typedef void ( *PFNGLXGETSELECTEDEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long *mask);
  765. #ifdef GLX_GLXEXT_PROTOTYPES
  766. GLXPbufferSGIX glXCreateGLXPbufferSGIX (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list);
  767. void glXDestroyGLXPbufferSGIX (Display *dpy, GLXPbufferSGIX pbuf);
  768. int glXQueryGLXPbufferSGIX (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value);
  769. void glXSelectEventSGIX (Display *dpy, GLXDrawable drawable, unsigned long mask);
  770. void glXGetSelectedEventSGIX (Display *dpy, GLXDrawable drawable, unsigned long *mask);
  771. #endif
  772. #endif /* GLX_SGIX_pbuffer */
  773. #ifndef GLX_SGIX_swap_barrier
  774. #define GLX_SGIX_swap_barrier 1
  775. typedef void ( *PFNGLXBINDSWAPBARRIERSGIXPROC) (Display *dpy, GLXDrawable drawable, int barrier);
  776. typedef Bool ( *PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC) (Display *dpy, int screen, int *max);
  777. #ifdef GLX_GLXEXT_PROTOTYPES
  778. void glXBindSwapBarrierSGIX (Display *dpy, GLXDrawable drawable, int barrier);
  779. Bool glXQueryMaxSwapBarriersSGIX (Display *dpy, int screen, int *max);
  780. #endif
  781. #endif /* GLX_SGIX_swap_barrier */
  782. #ifndef GLX_SGIX_swap_group
  783. #define GLX_SGIX_swap_group 1
  784. typedef void ( *PFNGLXJOINSWAPGROUPSGIXPROC) (Display *dpy, GLXDrawable drawable, GLXDrawable member);
  785. #ifdef GLX_GLXEXT_PROTOTYPES
  786. void glXJoinSwapGroupSGIX (Display *dpy, GLXDrawable drawable, GLXDrawable member);
  787. #endif
  788. #endif /* GLX_SGIX_swap_group */
  789. #ifndef GLX_SGIX_video_resize
  790. #define GLX_SGIX_video_resize 1
  791. #define GLX_SYNC_FRAME_SGIX 0x00000000
  792. #define GLX_SYNC_SWAP_SGIX 0x00000001
  793. typedef int ( *PFNGLXBINDCHANNELTOWINDOWSGIXPROC) (Display *display, int screen, int channel, Window window);
  794. typedef int ( *PFNGLXCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int x, int y, int w, int h);
  795. typedef int ( *PFNGLXQUERYCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh);
  796. typedef int ( *PFNGLXQUERYCHANNELDELTASSGIXPROC) (Display *display, int screen, int channel, int *x, int *y, int *w, int *h);
  797. typedef int ( *PFNGLXCHANNELRECTSYNCSGIXPROC) (Display *display, int screen, int channel, GLenum synctype);
  798. #ifdef GLX_GLXEXT_PROTOTYPES
  799. int glXBindChannelToWindowSGIX (Display *display, int screen, int channel, Window window);
  800. int glXChannelRectSGIX (Display *display, int screen, int channel, int x, int y, int w, int h);
  801. int glXQueryChannelRectSGIX (Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh);
  802. int glXQueryChannelDeltasSGIX (Display *display, int screen, int channel, int *x, int *y, int *w, int *h);
  803. int glXChannelRectSyncSGIX (Display *display, int screen, int channel, GLenum synctype);
  804. #endif
  805. #endif /* GLX_SGIX_video_resize */
  806. #ifndef GLX_SGIX_video_source
  807. #define GLX_SGIX_video_source 1
  808. typedef XID GLXVideoSourceSGIX;
  809. #ifdef _VL_H
  810. typedef GLXVideoSourceSGIX ( *PFNGLXCREATEGLXVIDEOSOURCESGIXPROC) (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode);
  811. typedef void ( *PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC) (Display *dpy, GLXVideoSourceSGIX glxvideosource);
  812. #ifdef GLX_GLXEXT_PROTOTYPES
  813. GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode);
  814. void glXDestroyGLXVideoSourceSGIX (Display *dpy, GLXVideoSourceSGIX glxvideosource);
  815. #endif
  816. #endif /* _VL_H */
  817. #endif /* GLX_SGIX_video_source */
  818. #ifndef GLX_SGIX_visual_select_group
  819. #define GLX_SGIX_visual_select_group 1
  820. #define GLX_VISUAL_SELECT_GROUP_SGIX 0x8028
  821. #endif /* GLX_SGIX_visual_select_group */
  822. #ifndef GLX_SGI_cushion
  823. #define GLX_SGI_cushion 1
  824. typedef void ( *PFNGLXCUSHIONSGIPROC) (Display *dpy, Window window, float cushion);
  825. #ifdef GLX_GLXEXT_PROTOTYPES
  826. void glXCushionSGI (Display *dpy, Window window, float cushion);
  827. #endif
  828. #endif /* GLX_SGI_cushion */
  829. #ifndef GLX_SGI_make_current_read
  830. #define GLX_SGI_make_current_read 1
  831. typedef Bool ( *PFNGLXMAKECURRENTREADSGIPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
  832. typedef GLXDrawable ( *PFNGLXGETCURRENTREADDRAWABLESGIPROC) (void);
  833. #ifdef GLX_GLXEXT_PROTOTYPES
  834. Bool glXMakeCurrentReadSGI (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
  835. GLXDrawable glXGetCurrentReadDrawableSGI (void);
  836. #endif
  837. #endif /* GLX_SGI_make_current_read */
  838. #ifndef GLX_SGI_swap_control
  839. #define GLX_SGI_swap_control 1
  840. typedef int ( *PFNGLXSWAPINTERVALSGIPROC) (int interval);
  841. #ifdef GLX_GLXEXT_PROTOTYPES
  842. int glXSwapIntervalSGI (int interval);
  843. #endif
  844. #endif /* GLX_SGI_swap_control */
  845. #ifndef GLX_SGI_video_sync
  846. #define GLX_SGI_video_sync 1
  847. typedef int ( *PFNGLXGETVIDEOSYNCSGIPROC) (unsigned int *count);
  848. typedef int ( *PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int *count);
  849. #ifdef GLX_GLXEXT_PROTOTYPES
  850. int glXGetVideoSyncSGI (unsigned int *count);
  851. int glXWaitVideoSyncSGI (int divisor, int remainder, unsigned int *count);
  852. #endif
  853. #endif /* GLX_SGI_video_sync */
  854. #ifndef GLX_SUN_get_transparent_index
  855. #define GLX_SUN_get_transparent_index 1
  856. typedef Status ( *PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex);
  857. #ifdef GLX_GLXEXT_PROTOTYPES
  858. Status glXGetTransparentIndexSUN (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex);
  859. #endif
  860. #endif /* GLX_SUN_get_transparent_index */
  861. #ifdef __cplusplus
  862. }
  863. #endif
  864. #endif