glplatform-glx.h 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993
  1. #ifndef GL_BINDIFY_glx_H
  2. #define GL_BINDIFY_glx_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #include <X11/Xlib.h>
  7. #include <X11/Xutil.h>
  8. #include <stdint.h>
  9. #include <stddef.h>
  10. #include <string.h>
  11. #include <stdbool.h>
  12. #ifndef GLBINDIFY_COMMON_GL_TYPEDEFS
  13. #define GLBINDIFY_COMMON_GL_TYPEDEFS
  14. typedef unsigned int GLenum;
  15. typedef unsigned char GLboolean;
  16. typedef unsigned int GLbitfield;
  17. typedef signed char GLbyte;
  18. typedef short GLshort;
  19. typedef int GLint;
  20. typedef unsigned char GLubyte;
  21. typedef unsigned short GLushort;
  22. typedef unsigned int GLuint;
  23. typedef int GLsizei;
  24. typedef float GLfloat;
  25. typedef double GLdouble;
  26. typedef ptrdiff_t GLintptr;
  27. typedef ptrdiff_t GLsizeiptr;
  28. #endif
  29. #ifndef GLPLATFORM_GLX_VERSION
  30. #define GLPLATFORM_GLX_VERSION 14
  31. #endif
  32. #ifndef GLPLATFORM_TYPE_Bool
  33. #define GLPLATFORM_TYPE_Bool
  34. #endif
  35. #ifndef GLPLATFORM_TYPE_Display
  36. #define GLPLATFORM_TYPE_Display
  37. #endif
  38. #ifndef GLPLATFORM_TYPE_Font
  39. #define GLPLATFORM_TYPE_Font
  40. #endif
  41. #ifndef GLPLATFORM_TYPE_GLXContext
  42. #define GLPLATFORM_TYPE_GLXContext
  43. typedef struct __GLXcontextRec *GLXContext;
  44. #endif
  45. #ifndef GLPLATFORM_TYPE_GLXDrawable
  46. #define GLPLATFORM_TYPE_GLXDrawable
  47. typedef XID GLXDrawable;
  48. #endif
  49. #ifndef GLPLATFORM_TYPE_GLXFBConfig
  50. #define GLPLATFORM_TYPE_GLXFBConfig
  51. typedef struct __GLXFBConfigRec *GLXFBConfig;
  52. #endif
  53. #ifndef GLPLATFORM_TYPE_GLXPbuffer
  54. #define GLPLATFORM_TYPE_GLXPbuffer
  55. typedef XID GLXPbuffer;
  56. #endif
  57. #ifndef GLPLATFORM_TYPE_GLXPixmap
  58. #define GLPLATFORM_TYPE_GLXPixmap
  59. typedef XID GLXPixmap;
  60. #endif
  61. #ifndef GLPLATFORM_TYPE_GLXWindow
  62. #define GLPLATFORM_TYPE_GLXWindow
  63. typedef XID GLXWindow;
  64. #endif
  65. #ifndef GLPLATFORM_TYPE_Pixmap
  66. #define GLPLATFORM_TYPE_Pixmap
  67. #endif
  68. #ifndef GLPLATFORM_TYPE_Window
  69. #define GLPLATFORM_TYPE_Window
  70. #endif
  71. #ifndef GLPLATFORM_TYPE_XVisualInfo
  72. #define GLPLATFORM_TYPE_XVisualInfo
  73. #endif
  74. #ifndef GLPLATFORM_TYPE___GLXextFuncPtr
  75. #define GLPLATFORM_TYPE___GLXextFuncPtr
  76. typedef void ( *__GLXextFuncPtr)(void);
  77. #endif
  78. #define GLX_ACCUM_ALPHA_SIZE 0x11
  79. #define GLX_ACCUM_BLUE_SIZE 0x10
  80. #define GLX_ACCUM_BUFFER_BIT 0x80
  81. #define GLX_ACCUM_GREEN_SIZE 0xf
  82. #define GLX_ACCUM_RED_SIZE 0xe
  83. #define GLX_ALPHA_SIZE 0xb
  84. #define GLX_AUX_BUFFERS 0x7
  85. #define GLX_AUX_BUFFERS_BIT 0x10
  86. #define GLX_BACK_LEFT_BUFFER_BIT 0x4
  87. #define GLX_BACK_RIGHT_BUFFER_BIT 0x8
  88. #define GLX_BAD_ATTRIBUTE 0x2
  89. #define GLX_BAD_CONTEXT 0x5
  90. #define GLX_BAD_ENUM 0x7
  91. #define GLX_BAD_SCREEN 0x1
  92. #define GLX_BAD_VALUE 0x6
  93. #define GLX_BAD_VISUAL 0x4
  94. #define GLX_BLUE_SIZE 0xa
  95. #define GLX_BUFFER_SIZE 0x2
  96. #define GLX_BufferSwapComplete 0x1
  97. #define GLX_COLOR_INDEX_BIT 0x2
  98. #define GLX_COLOR_INDEX_TYPE 0x8015
  99. #define GLX_CONFIG_CAVEAT 0x20
  100. #define GLX_DAMAGED 0x8020
  101. #define GLX_DEPTH_BUFFER_BIT 0x20
  102. #define GLX_DEPTH_SIZE 0xc
  103. #define GLX_DIRECT_COLOR 0x8003
  104. #define GLX_DONT_CARE 0xffffffff
  105. #define GLX_DOUBLEBUFFER 0x5
  106. #define GLX_DRAWABLE_TYPE 0x8010
  107. #define GLX_EVENT_MASK 0x801f
  108. #define GLX_EXTENSIONS 0x3
  109. #define GLX_EXTENSION_NAME 0x0
  110. #define GLX_FBCONFIG_ID 0x8013
  111. #define GLX_FRONT_LEFT_BUFFER_BIT 0x1
  112. #define GLX_FRONT_RIGHT_BUFFER_BIT 0x2
  113. #define GLX_GRAY_SCALE 0x8006
  114. #define GLX_GREEN_SIZE 0x9
  115. #define GLX_HEIGHT 0x801e
  116. #define GLX_LARGEST_PBUFFER 0x801c
  117. #define GLX_LEVEL 0x3
  118. #define GLX_MAX_PBUFFER_HEIGHT 0x8017
  119. #define GLX_MAX_PBUFFER_PIXELS 0x8018
  120. #define GLX_MAX_PBUFFER_WIDTH 0x8016
  121. #define GLX_NONE 0x8000
  122. #define GLX_NON_CONFORMANT_CONFIG 0x800d
  123. #define GLX_NO_EXTENSION 0x3
  124. #define GLX_PBUFFER 0x8023
  125. #define GLX_PBUFFER_BIT 0x4
  126. #define GLX_PBUFFER_CLOBBER_MASK 0x8000000
  127. #define GLX_PBUFFER_HEIGHT 0x8040
  128. #define GLX_PBUFFER_WIDTH 0x8041
  129. #define GLX_PIXMAP_BIT 0x2
  130. #define GLX_PRESERVED_CONTENTS 0x801b
  131. #define GLX_PSEUDO_COLOR 0x8004
  132. #define GLX_PbufferClobber 0x0
  133. #define GLX_RED_SIZE 0x8
  134. #define GLX_RENDER_TYPE 0x8011
  135. #define GLX_RGBA 0x4
  136. #define GLX_RGBA_BIT 0x1
  137. #define GLX_RGBA_TYPE 0x8014
  138. #define GLX_SAMPLES 0x186a1
  139. #define GLX_SAMPLE_BUFFERS 0x186a0
  140. #define GLX_SAVED 0x8021
  141. #define GLX_SCREEN 0x800c
  142. #define GLX_SLOW_CONFIG 0x8001
  143. #define GLX_STATIC_COLOR 0x8005
  144. #define GLX_STATIC_GRAY 0x8007
  145. #define GLX_STENCIL_BUFFER_BIT 0x40
  146. #define GLX_STENCIL_SIZE 0xd
  147. #define GLX_STEREO 0x6
  148. #define GLX_TRANSPARENT_ALPHA_VALUE 0x28
  149. #define GLX_TRANSPARENT_BLUE_VALUE 0x27
  150. #define GLX_TRANSPARENT_GREEN_VALUE 0x26
  151. #define GLX_TRANSPARENT_INDEX 0x8009
  152. #define GLX_TRANSPARENT_INDEX_VALUE 0x24
  153. #define GLX_TRANSPARENT_RED_VALUE 0x25
  154. #define GLX_TRANSPARENT_RGB 0x8008
  155. #define GLX_TRANSPARENT_TYPE 0x23
  156. #define GLX_TRUE_COLOR 0x8002
  157. #define GLX_USE_GL 0x1
  158. #define GLX_VENDOR 0x1
  159. #define GLX_VERSION 0x2
  160. #define GLX_VISUAL_ID 0x800b
  161. #define GLX_WIDTH 0x801d
  162. #define GLX_WINDOW 0x8022
  163. #define GLX_WINDOW_BIT 0x1
  164. #define GLX_X_NUMBER_EVENTS 0x11
  165. #define GLX_X_RENDERABLE 0x8012
  166. #define GLX_X_VISUAL_TYPE 0x22
  167. #define glXChooseFBConfig _glplatform_glXChooseFBConfig
  168. extern GLXFBConfig * (*glXChooseFBConfig)(Display *, int , const int *, int *);
  169. #define glXChooseVisual _glplatform_glXChooseVisual
  170. extern XVisualInfo * (*glXChooseVisual)(Display *, int , int *);
  171. #define glXCopyContext _glplatform_glXCopyContext
  172. extern void (*glXCopyContext)(Display *, GLXContext, GLXContext, unsigned long );
  173. #define glXCreateContext _glplatform_glXCreateContext
  174. extern GLXContext (*glXCreateContext)(Display *, XVisualInfo *, GLXContext, Bool);
  175. #define glXCreateGLXPixmap _glplatform_glXCreateGLXPixmap
  176. extern GLXPixmap (*glXCreateGLXPixmap)(Display *, XVisualInfo *, Pixmap);
  177. #define glXCreateNewContext _glplatform_glXCreateNewContext
  178. extern GLXContext (*glXCreateNewContext)(Display *, GLXFBConfig, int , GLXContext, Bool);
  179. #define glXCreatePbuffer _glplatform_glXCreatePbuffer
  180. extern GLXPbuffer (*glXCreatePbuffer)(Display *, GLXFBConfig, const int *);
  181. #define glXCreatePixmap _glplatform_glXCreatePixmap
  182. extern GLXPixmap (*glXCreatePixmap)(Display *, GLXFBConfig, Pixmap, const int *);
  183. #define glXCreateWindow _glplatform_glXCreateWindow
  184. extern GLXWindow (*glXCreateWindow)(Display *, GLXFBConfig, Window, const int *);
  185. #define glXDestroyContext _glplatform_glXDestroyContext
  186. extern void (*glXDestroyContext)(Display *, GLXContext);
  187. #define glXDestroyGLXPixmap _glplatform_glXDestroyGLXPixmap
  188. extern void (*glXDestroyGLXPixmap)(Display *, GLXPixmap);
  189. #define glXDestroyPbuffer _glplatform_glXDestroyPbuffer
  190. extern void (*glXDestroyPbuffer)(Display *, GLXPbuffer);
  191. #define glXDestroyPixmap _glplatform_glXDestroyPixmap
  192. extern void (*glXDestroyPixmap)(Display *, GLXPixmap);
  193. #define glXDestroyWindow _glplatform_glXDestroyWindow
  194. extern void (*glXDestroyWindow)(Display *, GLXWindow);
  195. #define glXGetClientString _glplatform_glXGetClientString
  196. extern const char * (*glXGetClientString)(Display *, int );
  197. #define glXGetConfig _glplatform_glXGetConfig
  198. extern int (*glXGetConfig)(Display *, XVisualInfo *, int , int *);
  199. #define glXGetCurrentContext _glplatform_glXGetCurrentContext
  200. extern GLXContext (*glXGetCurrentContext)();
  201. #define glXGetCurrentDisplay _glplatform_glXGetCurrentDisplay
  202. extern Display * (*glXGetCurrentDisplay)();
  203. #define glXGetCurrentDrawable _glplatform_glXGetCurrentDrawable
  204. extern GLXDrawable (*glXGetCurrentDrawable)();
  205. #define glXGetCurrentReadDrawable _glplatform_glXGetCurrentReadDrawable
  206. extern GLXDrawable (*glXGetCurrentReadDrawable)();
  207. #define glXGetFBConfigAttrib _glplatform_glXGetFBConfigAttrib
  208. extern int (*glXGetFBConfigAttrib)(Display *, GLXFBConfig, int , int *);
  209. #define glXGetFBConfigs _glplatform_glXGetFBConfigs
  210. extern GLXFBConfig * (*glXGetFBConfigs)(Display *, int , int *);
  211. #define glXGetProcAddress _glplatform_glXGetProcAddress
  212. extern __GLXextFuncPtr (*glXGetProcAddress)(const GLubyte *);
  213. #define glXGetSelectedEvent _glplatform_glXGetSelectedEvent
  214. extern void (*glXGetSelectedEvent)(Display *, GLXDrawable, unsigned long *);
  215. #define glXGetVisualFromFBConfig _glplatform_glXGetVisualFromFBConfig
  216. extern XVisualInfo * (*glXGetVisualFromFBConfig)(Display *, GLXFBConfig);
  217. #define glXIsDirect _glplatform_glXIsDirect
  218. extern Bool (*glXIsDirect)(Display *, GLXContext);
  219. #define glXMakeContextCurrent _glplatform_glXMakeContextCurrent
  220. extern Bool (*glXMakeContextCurrent)(Display *, GLXDrawable, GLXDrawable, GLXContext);
  221. #define glXMakeCurrent _glplatform_glXMakeCurrent
  222. extern Bool (*glXMakeCurrent)(Display *, GLXDrawable, GLXContext);
  223. #define glXQueryContext _glplatform_glXQueryContext
  224. extern int (*glXQueryContext)(Display *, GLXContext, int , int *);
  225. #define glXQueryDrawable _glplatform_glXQueryDrawable
  226. extern void (*glXQueryDrawable)(Display *, GLXDrawable, int , unsigned int *);
  227. #define glXQueryExtension _glplatform_glXQueryExtension
  228. extern Bool (*glXQueryExtension)(Display *, int *, int *);
  229. #define glXQueryExtensionsString _glplatform_glXQueryExtensionsString
  230. extern const char * (*glXQueryExtensionsString)(Display *, int );
  231. #define glXQueryServerString _glplatform_glXQueryServerString
  232. extern const char * (*glXQueryServerString)(Display *, int , int );
  233. #define glXQueryVersion _glplatform_glXQueryVersion
  234. extern Bool (*glXQueryVersion)(Display *, int *, int *);
  235. #define glXSelectEvent _glplatform_glXSelectEvent
  236. extern void (*glXSelectEvent)(Display *, GLXDrawable, unsigned long );
  237. #define glXSwapBuffers _glplatform_glXSwapBuffers
  238. extern void (*glXSwapBuffers)(Display *, GLXDrawable);
  239. #define glXUseXFont _glplatform_glXUseXFont
  240. extern void (*glXUseXFont)(Font, int , int , int );
  241. #define glXWaitGL _glplatform_glXWaitGL
  242. extern void (*glXWaitGL)();
  243. #define glXWaitX _glplatform_glXWaitX
  244. extern void (*glXWaitX)();
  245. #if defined(GLPLATFORM_ENABLE_GLX_3DFX_multisample)
  246. extern bool GLPLATFORM_GLX_3DFX_multisample;
  247. #define GLX_SAMPLES_3DFX 0x8051
  248. #define GLX_SAMPLE_BUFFERS_3DFX 0x8050
  249. #endif
  250. #if defined(GLPLATFORM_ENABLE_GLX_AMD_gpu_association)
  251. extern bool GLPLATFORM_GLX_AMD_gpu_association;
  252. #ifndef GLPLATFORM_TYPE_Bool
  253. #define GLPLATFORM_TYPE_Bool
  254. #endif
  255. #ifndef GLPLATFORM_TYPE_GLXContext
  256. #define GLPLATFORM_TYPE_GLXContext
  257. typedef struct __GLXcontextRec *GLXContext;
  258. #endif
  259. #define GLX_GPU_CLOCK_AMD 0x21a4
  260. #define GLX_GPU_FASTEST_TARGET_GPUS_AMD 0x21a2
  261. #define GLX_GPU_NUM_PIPES_AMD 0x21a5
  262. #define GLX_GPU_NUM_RB_AMD 0x21a7
  263. #define GLX_GPU_NUM_SIMD_AMD 0x21a6
  264. #define GLX_GPU_NUM_SPI_AMD 0x21a8
  265. #define GLX_GPU_OPENGL_VERSION_STRING_AMD 0x1f02
  266. #define GLX_GPU_RAM_AMD 0x21a3
  267. #define GLX_GPU_RENDERER_STRING_AMD 0x1f01
  268. #define GLX_GPU_VENDOR_AMD 0x1f00
  269. #define glXBlitContextFramebufferAMD _glplatform_glXBlitContextFramebufferAMD
  270. extern void (*glXBlitContextFramebufferAMD)(GLXContext, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum);
  271. #define glXCreateAssociatedContextAMD _glplatform_glXCreateAssociatedContextAMD
  272. extern GLXContext (*glXCreateAssociatedContextAMD)(unsigned int , GLXContext);
  273. #define glXCreateAssociatedContextAttribsAMD _glplatform_glXCreateAssociatedContextAttribsAMD
  274. extern GLXContext (*glXCreateAssociatedContextAttribsAMD)(unsigned int , GLXContext, const int *);
  275. #define glXDeleteAssociatedContextAMD _glplatform_glXDeleteAssociatedContextAMD
  276. extern Bool (*glXDeleteAssociatedContextAMD)(GLXContext);
  277. #define glXGetContextGPUIDAMD _glplatform_glXGetContextGPUIDAMD
  278. extern unsigned int (*glXGetContextGPUIDAMD)(GLXContext);
  279. #define glXGetCurrentAssociatedContextAMD _glplatform_glXGetCurrentAssociatedContextAMD
  280. extern GLXContext (*glXGetCurrentAssociatedContextAMD)();
  281. #define glXGetGPUIDsAMD _glplatform_glXGetGPUIDsAMD
  282. extern unsigned int (*glXGetGPUIDsAMD)(unsigned int , unsigned int *);
  283. #define glXGetGPUInfoAMD _glplatform_glXGetGPUInfoAMD
  284. extern int (*glXGetGPUInfoAMD)(unsigned int , int , GLenum, unsigned int , void *);
  285. #define glXMakeAssociatedContextCurrentAMD _glplatform_glXMakeAssociatedContextCurrentAMD
  286. extern Bool (*glXMakeAssociatedContextCurrentAMD)(GLXContext);
  287. #endif
  288. #if defined(GLPLATFORM_ENABLE_GLX_ARB_context_flush_control)
  289. extern bool GLPLATFORM_GLX_ARB_context_flush_control;
  290. #define GLX_CONTEXT_RELEASE_BEHAVIOR_ARB 0x2097
  291. #define GLX_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB 0x2098
  292. #define GLX_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB 0x0
  293. #endif
  294. #if defined(GLPLATFORM_ENABLE_GLX_ARB_create_context)
  295. extern bool GLPLATFORM_GLX_ARB_create_context;
  296. #ifndef GLPLATFORM_TYPE_Bool
  297. #define GLPLATFORM_TYPE_Bool
  298. #endif
  299. #ifndef GLPLATFORM_TYPE_Display
  300. #define GLPLATFORM_TYPE_Display
  301. #endif
  302. #ifndef GLPLATFORM_TYPE_GLXContext
  303. #define GLPLATFORM_TYPE_GLXContext
  304. typedef struct __GLXcontextRec *GLXContext;
  305. #endif
  306. #ifndef GLPLATFORM_TYPE_GLXFBConfig
  307. #define GLPLATFORM_TYPE_GLXFBConfig
  308. typedef struct __GLXFBConfigRec *GLXFBConfig;
  309. #endif
  310. #define GLX_CONTEXT_DEBUG_BIT_ARB 0x1
  311. #define GLX_CONTEXT_FLAGS_ARB 0x2094
  312. #define GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x2
  313. #define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091
  314. #define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092
  315. #define glXCreateContextAttribsARB _glplatform_glXCreateContextAttribsARB
  316. extern GLXContext (*glXCreateContextAttribsARB)(Display *, GLXFBConfig, GLXContext, Bool, const int *);
  317. #endif
  318. #if defined(GLPLATFORM_ENABLE_GLX_ARB_create_context_profile)
  319. extern bool GLPLATFORM_GLX_ARB_create_context_profile;
  320. #define GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x2
  321. #define GLX_CONTEXT_CORE_PROFILE_BIT_ARB 0x1
  322. #define GLX_CONTEXT_PROFILE_MASK_ARB 0x9126
  323. #endif
  324. #if defined(GLPLATFORM_ENABLE_GLX_ARB_create_context_robustness)
  325. extern bool GLPLATFORM_GLX_ARB_create_context_robustness;
  326. #define GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256
  327. #define GLX_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x4
  328. #define GLX_LOSE_CONTEXT_ON_RESET_ARB 0x8252
  329. #define GLX_NO_RESET_NOTIFICATION_ARB 0x8261
  330. #endif
  331. #if defined(GLPLATFORM_ENABLE_GLX_ARB_fbconfig_float)
  332. extern bool GLPLATFORM_GLX_ARB_fbconfig_float;
  333. #define GLX_RGBA_FLOAT_BIT_ARB 0x4
  334. #define GLX_RGBA_FLOAT_TYPE_ARB 0x20b9
  335. #endif
  336. #if defined(GLPLATFORM_ENABLE_GLX_ARB_framebuffer_sRGB)
  337. extern bool GLPLATFORM_GLX_ARB_framebuffer_sRGB;
  338. #define GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20b2
  339. #endif
  340. #if defined(GLPLATFORM_ENABLE_GLX_ARB_get_proc_address)
  341. extern bool GLPLATFORM_GLX_ARB_get_proc_address;
  342. #ifndef GLPLATFORM_TYPE___GLXextFuncPtr
  343. #define GLPLATFORM_TYPE___GLXextFuncPtr
  344. typedef void ( *__GLXextFuncPtr)(void);
  345. #endif
  346. #define glXGetProcAddressARB _glplatform_glXGetProcAddressARB
  347. extern __GLXextFuncPtr (*glXGetProcAddressARB)(const GLubyte *);
  348. #endif
  349. #if defined(GLPLATFORM_ENABLE_GLX_ARB_multisample)
  350. extern bool GLPLATFORM_GLX_ARB_multisample;
  351. #define GLX_SAMPLES_ARB 0x186a1
  352. #define GLX_SAMPLE_BUFFERS_ARB 0x186a0
  353. #endif
  354. #if defined(GLPLATFORM_ENABLE_GLX_ARB_robustness_application_isolation)
  355. extern bool GLPLATFORM_GLX_ARB_robustness_application_isolation;
  356. #define GLX_CONTEXT_RESET_ISOLATION_BIT_ARB 0x8
  357. #endif
  358. #if defined(GLPLATFORM_ENABLE_GLX_ARB_robustness_share_group_isolation)
  359. extern bool GLPLATFORM_GLX_ARB_robustness_share_group_isolation;
  360. #define GLX_CONTEXT_RESET_ISOLATION_BIT_ARB 0x8
  361. #endif
  362. #if defined(GLPLATFORM_ENABLE_GLX_ARB_vertex_buffer_object)
  363. extern bool GLPLATFORM_GLX_ARB_vertex_buffer_object;
  364. #define GLX_CONTEXT_ALLOW_BUFFER_BYTE_ORDER_MISMATCH_ARB 0x2095
  365. #endif
  366. #if defined(GLPLATFORM_ENABLE_GLX_EXT_buffer_age)
  367. extern bool GLPLATFORM_GLX_EXT_buffer_age;
  368. #define GLX_BACK_BUFFER_AGE_EXT 0x20f4
  369. #endif
  370. #if defined(GLPLATFORM_ENABLE_GLX_EXT_create_context_es2_profile)
  371. extern bool GLPLATFORM_GLX_EXT_create_context_es2_profile;
  372. #define GLX_CONTEXT_ES2_PROFILE_BIT_EXT 0x4
  373. #endif
  374. #if defined(GLPLATFORM_ENABLE_GLX_EXT_create_context_es_profile)
  375. extern bool GLPLATFORM_GLX_EXT_create_context_es_profile;
  376. #define GLX_CONTEXT_ES_PROFILE_BIT_EXT 0x4
  377. #endif
  378. #if defined(GLPLATFORM_ENABLE_GLX_EXT_fbconfig_packed_float)
  379. extern bool GLPLATFORM_GLX_EXT_fbconfig_packed_float;
  380. #define GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT 0x8
  381. #define GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT 0x20b1
  382. #endif
  383. #if defined(GLPLATFORM_ENABLE_GLX_EXT_framebuffer_sRGB)
  384. extern bool GLPLATFORM_GLX_EXT_framebuffer_sRGB;
  385. #define GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20b2
  386. #endif
  387. #if defined(GLPLATFORM_ENABLE_GLX_EXT_import_context)
  388. extern bool GLPLATFORM_GLX_EXT_import_context;
  389. #ifndef GLPLATFORM_TYPE_Display
  390. #define GLPLATFORM_TYPE_Display
  391. #endif
  392. #ifndef GLPLATFORM_TYPE_GLXContext
  393. #define GLPLATFORM_TYPE_GLXContext
  394. typedef struct __GLXcontextRec *GLXContext;
  395. #endif
  396. #ifndef GLPLATFORM_TYPE_GLXContextID
  397. #define GLPLATFORM_TYPE_GLXContextID
  398. typedef XID GLXContextID;
  399. #endif
  400. #define GLX_SCREEN_EXT 0x800c
  401. #define GLX_SHARE_CONTEXT_EXT 0x800a
  402. #define GLX_VISUAL_ID_EXT 0x800b
  403. #define glXFreeContextEXT _glplatform_glXFreeContextEXT
  404. extern void (*glXFreeContextEXT)(Display *, GLXContext);
  405. #define glXGetContextIDEXT _glplatform_glXGetContextIDEXT
  406. extern GLXContextID (*glXGetContextIDEXT)(const GLXContext);
  407. #define glXGetCurrentDisplayEXT _glplatform_glXGetCurrentDisplayEXT
  408. extern Display * (*glXGetCurrentDisplayEXT)();
  409. #define glXImportContextEXT _glplatform_glXImportContextEXT
  410. extern GLXContext (*glXImportContextEXT)(Display *, GLXContextID);
  411. #define glXQueryContextInfoEXT _glplatform_glXQueryContextInfoEXT
  412. extern int (*glXQueryContextInfoEXT)(Display *, GLXContext, int , int *);
  413. #endif
  414. #if defined(GLPLATFORM_ENABLE_GLX_EXT_stereo_tree)
  415. extern bool GLPLATFORM_GLX_EXT_stereo_tree;
  416. #define GLX_STEREO_NOTIFY_EXT 0x0
  417. #define GLX_STEREO_NOTIFY_MASK_EXT 0x1
  418. #define GLX_STEREO_TREE_EXT 0x20f5
  419. #endif
  420. #if defined(GLPLATFORM_ENABLE_GLX_EXT_swap_control)
  421. extern bool GLPLATFORM_GLX_EXT_swap_control;
  422. #ifndef GLPLATFORM_TYPE_Display
  423. #define GLPLATFORM_TYPE_Display
  424. #endif
  425. #ifndef GLPLATFORM_TYPE_GLXDrawable
  426. #define GLPLATFORM_TYPE_GLXDrawable
  427. typedef XID GLXDrawable;
  428. #endif
  429. #define GLX_MAX_SWAP_INTERVAL_EXT 0x20f2
  430. #define GLX_SWAP_INTERVAL_EXT 0x20f1
  431. #define glXSwapIntervalEXT _glplatform_glXSwapIntervalEXT
  432. extern void (*glXSwapIntervalEXT)(Display *, GLXDrawable, int );
  433. #endif
  434. #if defined(GLPLATFORM_ENABLE_GLX_EXT_swap_control_tear)
  435. extern bool GLPLATFORM_GLX_EXT_swap_control_tear;
  436. #define GLX_LATE_SWAPS_TEAR_EXT 0x20f3
  437. #endif
  438. #if defined(GLPLATFORM_ENABLE_GLX_EXT_texture_from_pixmap)
  439. extern bool GLPLATFORM_GLX_EXT_texture_from_pixmap;
  440. #ifndef GLPLATFORM_TYPE_Display
  441. #define GLPLATFORM_TYPE_Display
  442. #endif
  443. #ifndef GLPLATFORM_TYPE_GLXDrawable
  444. #define GLPLATFORM_TYPE_GLXDrawable
  445. typedef XID GLXDrawable;
  446. #endif
  447. #define GLX_AUX0_EXT 0x20e2
  448. #define GLX_AUX1_EXT 0x20e3
  449. #define GLX_AUX2_EXT 0x20e4
  450. #define GLX_AUX3_EXT 0x20e5
  451. #define GLX_AUX4_EXT 0x20e6
  452. #define GLX_AUX5_EXT 0x20e7
  453. #define GLX_AUX6_EXT 0x20e8
  454. #define GLX_AUX7_EXT 0x20e9
  455. #define GLX_AUX8_EXT 0x20ea
  456. #define GLX_AUX9_EXT 0x20eb
  457. #define GLX_BACK_EXT 0x20e0
  458. #define GLX_BACK_LEFT_EXT 0x20e0
  459. #define GLX_BACK_RIGHT_EXT 0x20e1
  460. #define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20d2
  461. #define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20d1
  462. #define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20d0
  463. #define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20d3
  464. #define GLX_FRONT_EXT 0x20de
  465. #define GLX_FRONT_LEFT_EXT 0x20de
  466. #define GLX_FRONT_RIGHT_EXT 0x20df
  467. #define GLX_MIPMAP_TEXTURE_EXT 0x20d7
  468. #define GLX_TEXTURE_1D_BIT_EXT 0x1
  469. #define GLX_TEXTURE_1D_EXT 0x20db
  470. #define GLX_TEXTURE_2D_BIT_EXT 0x2
  471. #define GLX_TEXTURE_2D_EXT 0x20dc
  472. #define GLX_TEXTURE_FORMAT_EXT 0x20d5
  473. #define GLX_TEXTURE_FORMAT_NONE_EXT 0x20d8
  474. #define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20da
  475. #define GLX_TEXTURE_FORMAT_RGB_EXT 0x20d9
  476. #define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x4
  477. #define GLX_TEXTURE_RECTANGLE_EXT 0x20dd
  478. #define GLX_TEXTURE_TARGET_EXT 0x20d6
  479. #define GLX_Y_INVERTED_EXT 0x20d4
  480. #define glXBindTexImageEXT _glplatform_glXBindTexImageEXT
  481. extern void (*glXBindTexImageEXT)(Display *, GLXDrawable, int , const int *);
  482. #define glXReleaseTexImageEXT _glplatform_glXReleaseTexImageEXT
  483. extern void (*glXReleaseTexImageEXT)(Display *, GLXDrawable, int );
  484. #endif
  485. #if defined(GLPLATFORM_ENABLE_GLX_EXT_visual_info)
  486. extern bool GLPLATFORM_GLX_EXT_visual_info;
  487. #define GLX_DIRECT_COLOR_EXT 0x8003
  488. #define GLX_GRAY_SCALE_EXT 0x8006
  489. #define GLX_NONE_EXT 0x8000
  490. #define GLX_PSEUDO_COLOR_EXT 0x8004
  491. #define GLX_STATIC_COLOR_EXT 0x8005
  492. #define GLX_STATIC_GRAY_EXT 0x8007
  493. #define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28
  494. #define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27
  495. #define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26
  496. #define GLX_TRANSPARENT_INDEX_EXT 0x8009
  497. #define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24
  498. #define GLX_TRANSPARENT_RED_VALUE_EXT 0x25
  499. #define GLX_TRANSPARENT_RGB_EXT 0x8008
  500. #define GLX_TRANSPARENT_TYPE_EXT 0x23
  501. #define GLX_TRUE_COLOR_EXT 0x8002
  502. #define GLX_X_VISUAL_TYPE_EXT 0x22
  503. #endif
  504. #if defined(GLPLATFORM_ENABLE_GLX_EXT_visual_rating)
  505. extern bool GLPLATFORM_GLX_EXT_visual_rating;
  506. #define GLX_NONE_EXT 0x8000
  507. #define GLX_NON_CONFORMANT_VISUAL_EXT 0x800d
  508. #define GLX_SLOW_VISUAL_EXT 0x8001
  509. #define GLX_VISUAL_CAVEAT_EXT 0x20
  510. #endif
  511. #if defined(GLPLATFORM_ENABLE_GLX_INTEL_swap_event)
  512. extern bool GLPLATFORM_GLX_INTEL_swap_event;
  513. #define GLX_BUFFER_SWAP_COMPLETE_INTEL_MASK 0x4000000
  514. #define GLX_COPY_COMPLETE_INTEL 0x8181
  515. #define GLX_EXCHANGE_COMPLETE_INTEL 0x8180
  516. #define GLX_FLIP_COMPLETE_INTEL 0x8182
  517. #endif
  518. #if defined(GLPLATFORM_ENABLE_GLX_MESA_agp_offset)
  519. extern bool GLPLATFORM_GLX_MESA_agp_offset;
  520. #define glXGetAGPOffsetMESA _glplatform_glXGetAGPOffsetMESA
  521. extern unsigned int (*glXGetAGPOffsetMESA)(const void *);
  522. #endif
  523. #if defined(GLPLATFORM_ENABLE_GLX_MESA_copy_sub_buffer)
  524. extern bool GLPLATFORM_GLX_MESA_copy_sub_buffer;
  525. #ifndef GLPLATFORM_TYPE_Display
  526. #define GLPLATFORM_TYPE_Display
  527. #endif
  528. #ifndef GLPLATFORM_TYPE_GLXDrawable
  529. #define GLPLATFORM_TYPE_GLXDrawable
  530. typedef XID GLXDrawable;
  531. #endif
  532. #define glXCopySubBufferMESA _glplatform_glXCopySubBufferMESA
  533. extern void (*glXCopySubBufferMESA)(Display *, GLXDrawable, int , int , int , int );
  534. #endif
  535. #if defined(GLPLATFORM_ENABLE_GLX_MESA_pixmap_colormap)
  536. extern bool GLPLATFORM_GLX_MESA_pixmap_colormap;
  537. #ifndef GLPLATFORM_TYPE_Colormap
  538. #define GLPLATFORM_TYPE_Colormap
  539. #endif
  540. #ifndef GLPLATFORM_TYPE_Display
  541. #define GLPLATFORM_TYPE_Display
  542. #endif
  543. #ifndef GLPLATFORM_TYPE_GLXPixmap
  544. #define GLPLATFORM_TYPE_GLXPixmap
  545. typedef XID GLXPixmap;
  546. #endif
  547. #ifndef GLPLATFORM_TYPE_Pixmap
  548. #define GLPLATFORM_TYPE_Pixmap
  549. #endif
  550. #ifndef GLPLATFORM_TYPE_XVisualInfo
  551. #define GLPLATFORM_TYPE_XVisualInfo
  552. #endif
  553. #define glXCreateGLXPixmapMESA _glplatform_glXCreateGLXPixmapMESA
  554. extern GLXPixmap (*glXCreateGLXPixmapMESA)(Display *, XVisualInfo *, Pixmap, Colormap);
  555. #endif
  556. #if defined(GLPLATFORM_ENABLE_GLX_MESA_query_renderer)
  557. extern bool GLPLATFORM_GLX_MESA_query_renderer;
  558. #ifndef GLPLATFORM_TYPE_Bool
  559. #define GLPLATFORM_TYPE_Bool
  560. #endif
  561. #ifndef GLPLATFORM_TYPE_Display
  562. #define GLPLATFORM_TYPE_Display
  563. #endif
  564. #define GLX_RENDERER_ACCELERATED_MESA 0x8186
  565. #define GLX_RENDERER_DEVICE_ID_MESA 0x8184
  566. #define GLX_RENDERER_ID_MESA 0x818e
  567. #define GLX_RENDERER_OPENGL_COMPATIBILITY_PROFILE_VERSION_MESA 0x818b
  568. #define GLX_RENDERER_OPENGL_CORE_PROFILE_VERSION_MESA 0x818a
  569. #define GLX_RENDERER_OPENGL_ES2_PROFILE_VERSION_MESA 0x818d
  570. #define GLX_RENDERER_OPENGL_ES_PROFILE_VERSION_MESA 0x818c
  571. #define GLX_RENDERER_PREFERRED_PROFILE_MESA 0x8189
  572. #define GLX_RENDERER_UNIFIED_MEMORY_ARCHITECTURE_MESA 0x8188
  573. #define GLX_RENDERER_VENDOR_ID_MESA 0x8183
  574. #define GLX_RENDERER_VERSION_MESA 0x8185
  575. #define GLX_RENDERER_VIDEO_MEMORY_MESA 0x8187
  576. #define glXQueryCurrentRendererIntegerMESA _glplatform_glXQueryCurrentRendererIntegerMESA
  577. extern Bool (*glXQueryCurrentRendererIntegerMESA)(int , unsigned int *);
  578. #define glXQueryCurrentRendererStringMESA _glplatform_glXQueryCurrentRendererStringMESA
  579. extern const char * (*glXQueryCurrentRendererStringMESA)(int );
  580. #define glXQueryRendererIntegerMESA _glplatform_glXQueryRendererIntegerMESA
  581. extern Bool (*glXQueryRendererIntegerMESA)(Display *, int , int , int , unsigned int *);
  582. #define glXQueryRendererStringMESA _glplatform_glXQueryRendererStringMESA
  583. extern const char * (*glXQueryRendererStringMESA)(Display *, int , int , int );
  584. #endif
  585. #if defined(GLPLATFORM_ENABLE_GLX_MESA_release_buffers)
  586. extern bool GLPLATFORM_GLX_MESA_release_buffers;
  587. #ifndef GLPLATFORM_TYPE_Bool
  588. #define GLPLATFORM_TYPE_Bool
  589. #endif
  590. #ifndef GLPLATFORM_TYPE_Display
  591. #define GLPLATFORM_TYPE_Display
  592. #endif
  593. #ifndef GLPLATFORM_TYPE_GLXDrawable
  594. #define GLPLATFORM_TYPE_GLXDrawable
  595. typedef XID GLXDrawable;
  596. #endif
  597. #define glXReleaseBuffersMESA _glplatform_glXReleaseBuffersMESA
  598. extern Bool (*glXReleaseBuffersMESA)(Display *, GLXDrawable);
  599. #endif
  600. #if defined(GLPLATFORM_ENABLE_GLX_MESA_set_3dfx_mode)
  601. extern bool GLPLATFORM_GLX_MESA_set_3dfx_mode;
  602. #ifndef GLPLATFORM_TYPE_Bool
  603. #define GLPLATFORM_TYPE_Bool
  604. #endif
  605. #define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2
  606. #define GLX_3DFX_WINDOW_MODE_MESA 0x1
  607. #define glXSet3DfxModeMESA _glplatform_glXSet3DfxModeMESA
  608. extern Bool (*glXSet3DfxModeMESA)(int );
  609. #endif
  610. #if defined(GLPLATFORM_ENABLE_GLX_NV_copy_buffer)
  611. extern bool GLPLATFORM_GLX_NV_copy_buffer;
  612. #ifndef GLPLATFORM_TYPE_Display
  613. #define GLPLATFORM_TYPE_Display
  614. #endif
  615. #ifndef GLPLATFORM_TYPE_GLXContext
  616. #define GLPLATFORM_TYPE_GLXContext
  617. typedef struct __GLXcontextRec *GLXContext;
  618. #endif
  619. #define glXCopyBufferSubDataNV _glplatform_glXCopyBufferSubDataNV
  620. extern void (*glXCopyBufferSubDataNV)(Display *, GLXContext, GLXContext, GLenum, GLenum, GLintptr, GLintptr, GLsizeiptr);
  621. #define glXNamedCopyBufferSubDataNV _glplatform_glXNamedCopyBufferSubDataNV
  622. extern void (*glXNamedCopyBufferSubDataNV)(Display *, GLXContext, GLXContext, GLuint, GLuint, GLintptr, GLintptr, GLsizeiptr);
  623. #endif
  624. #if defined(GLPLATFORM_ENABLE_GLX_NV_copy_image)
  625. extern bool GLPLATFORM_GLX_NV_copy_image;
  626. #ifndef GLPLATFORM_TYPE_Display
  627. #define GLPLATFORM_TYPE_Display
  628. #endif
  629. #ifndef GLPLATFORM_TYPE_GLXContext
  630. #define GLPLATFORM_TYPE_GLXContext
  631. typedef struct __GLXcontextRec *GLXContext;
  632. #endif
  633. #define glXCopyImageSubDataNV _glplatform_glXCopyImageSubDataNV
  634. extern void (*glXCopyImageSubDataNV)(Display *, GLXContext, GLuint, GLenum, GLint, GLint, GLint, GLint, GLXContext, GLuint, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei);
  635. #endif
  636. #if defined(GLPLATFORM_ENABLE_GLX_NV_delay_before_swap)
  637. extern bool GLPLATFORM_GLX_NV_delay_before_swap;
  638. #ifndef GLPLATFORM_TYPE_Bool
  639. #define GLPLATFORM_TYPE_Bool
  640. #endif
  641. #ifndef GLPLATFORM_TYPE_Display
  642. #define GLPLATFORM_TYPE_Display
  643. #endif
  644. #ifndef GLPLATFORM_TYPE_GLXDrawable
  645. #define GLPLATFORM_TYPE_GLXDrawable
  646. typedef XID GLXDrawable;
  647. #endif
  648. #define glXDelayBeforeSwapNV _glplatform_glXDelayBeforeSwapNV
  649. extern Bool (*glXDelayBeforeSwapNV)(Display *, GLXDrawable, GLfloat);
  650. #endif
  651. #if defined(GLPLATFORM_ENABLE_GLX_NV_float_buffer)
  652. extern bool GLPLATFORM_GLX_NV_float_buffer;
  653. #define GLX_FLOAT_COMPONENTS_NV 0x20b0
  654. #endif
  655. #if defined(GLPLATFORM_ENABLE_GLX_NV_multisample_coverage)
  656. extern bool GLPLATFORM_GLX_NV_multisample_coverage;
  657. #define GLX_COLOR_SAMPLES_NV 0x20b3
  658. #define GLX_COVERAGE_SAMPLES_NV 0x186a1
  659. #endif
  660. #if defined(GLPLATFORM_ENABLE_GLX_NV_present_video)
  661. extern bool GLPLATFORM_GLX_NV_present_video;
  662. #ifndef GLPLATFORM_TYPE_Display
  663. #define GLPLATFORM_TYPE_Display
  664. #endif
  665. #define GLX_NUM_VIDEO_SLOTS_NV 0x20f0
  666. #define glXBindVideoDeviceNV _glplatform_glXBindVideoDeviceNV
  667. extern int (*glXBindVideoDeviceNV)(Display *, unsigned int , unsigned int , const int *);
  668. #define glXEnumerateVideoDevicesNV _glplatform_glXEnumerateVideoDevicesNV
  669. extern unsigned int * (*glXEnumerateVideoDevicesNV)(Display *, int , int *);
  670. #endif
  671. #if defined(GLPLATFORM_ENABLE_GLX_NV_swap_group)
  672. extern bool GLPLATFORM_GLX_NV_swap_group;
  673. #ifndef GLPLATFORM_TYPE_Bool
  674. #define GLPLATFORM_TYPE_Bool
  675. #endif
  676. #ifndef GLPLATFORM_TYPE_Display
  677. #define GLPLATFORM_TYPE_Display
  678. #endif
  679. #ifndef GLPLATFORM_TYPE_GLXDrawable
  680. #define GLPLATFORM_TYPE_GLXDrawable
  681. typedef XID GLXDrawable;
  682. #endif
  683. #define glXBindSwapBarrierNV _glplatform_glXBindSwapBarrierNV
  684. extern Bool (*glXBindSwapBarrierNV)(Display *, GLuint, GLuint);
  685. #define glXJoinSwapGroupNV _glplatform_glXJoinSwapGroupNV
  686. extern Bool (*glXJoinSwapGroupNV)(Display *, GLXDrawable, GLuint);
  687. #define glXQueryFrameCountNV _glplatform_glXQueryFrameCountNV
  688. extern Bool (*glXQueryFrameCountNV)(Display *, int , GLuint *);
  689. #define glXQueryMaxSwapGroupsNV _glplatform_glXQueryMaxSwapGroupsNV
  690. extern Bool (*glXQueryMaxSwapGroupsNV)(Display *, int , GLuint *, GLuint *);
  691. #define glXQuerySwapGroupNV _glplatform_glXQuerySwapGroupNV
  692. extern Bool (*glXQuerySwapGroupNV)(Display *, GLXDrawable, GLuint *, GLuint *);
  693. #define glXResetFrameCountNV _glplatform_glXResetFrameCountNV
  694. extern Bool (*glXResetFrameCountNV)(Display *, int );
  695. #endif
  696. #if defined(GLPLATFORM_ENABLE_GLX_NV_video_capture)
  697. extern bool GLPLATFORM_GLX_NV_video_capture;
  698. #ifndef GLPLATFORM_TYPE_Display
  699. #define GLPLATFORM_TYPE_Display
  700. #endif
  701. #ifndef GLPLATFORM_TYPE_GLXVideoCaptureDeviceNV
  702. #define GLPLATFORM_TYPE_GLXVideoCaptureDeviceNV
  703. typedef XID GLXVideoCaptureDeviceNV;
  704. #endif
  705. #define GLX_DEVICE_ID_NV 0x20cd
  706. #define GLX_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20cf
  707. #define GLX_UNIQUE_ID_NV 0x20ce
  708. #define glXBindVideoCaptureDeviceNV _glplatform_glXBindVideoCaptureDeviceNV
  709. extern int (*glXBindVideoCaptureDeviceNV)(Display *, unsigned int , GLXVideoCaptureDeviceNV);
  710. #define glXEnumerateVideoCaptureDevicesNV _glplatform_glXEnumerateVideoCaptureDevicesNV
  711. extern GLXVideoCaptureDeviceNV * (*glXEnumerateVideoCaptureDevicesNV)(Display *, int , int *);
  712. #define glXLockVideoCaptureDeviceNV _glplatform_glXLockVideoCaptureDeviceNV
  713. extern void (*glXLockVideoCaptureDeviceNV)(Display *, GLXVideoCaptureDeviceNV);
  714. #define glXQueryVideoCaptureDeviceNV _glplatform_glXQueryVideoCaptureDeviceNV
  715. extern int (*glXQueryVideoCaptureDeviceNV)(Display *, GLXVideoCaptureDeviceNV, int , int *);
  716. #define glXReleaseVideoCaptureDeviceNV _glplatform_glXReleaseVideoCaptureDeviceNV
  717. extern void (*glXReleaseVideoCaptureDeviceNV)(Display *, GLXVideoCaptureDeviceNV);
  718. #endif
  719. #if defined(GLPLATFORM_ENABLE_GLX_NV_video_out)
  720. extern bool GLPLATFORM_GLX_NV_video_out;
  721. #ifndef GLPLATFORM_TYPE_Display
  722. #define GLPLATFORM_TYPE_Display
  723. #endif
  724. #ifndef GLPLATFORM_TYPE_GLXPbuffer
  725. #define GLPLATFORM_TYPE_GLXPbuffer
  726. typedef XID GLXPbuffer;
  727. #endif
  728. #ifndef GLPLATFORM_TYPE_GLXVideoDeviceNV
  729. #define GLPLATFORM_TYPE_GLXVideoDeviceNV
  730. typedef unsigned int GLXVideoDeviceNV;
  731. #endif
  732. #define GLX_VIDEO_OUT_ALPHA_NV 0x20c4
  733. #define GLX_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20c6
  734. #define GLX_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20c7
  735. #define GLX_VIDEO_OUT_COLOR_NV 0x20c3
  736. #define GLX_VIDEO_OUT_DEPTH_NV 0x20c5
  737. #define GLX_VIDEO_OUT_FIELD_1_NV 0x20c9
  738. #define GLX_VIDEO_OUT_FIELD_2_NV 0x20ca
  739. #define GLX_VIDEO_OUT_FRAME_NV 0x20c8
  740. #define GLX_VIDEO_OUT_STACKED_FIELDS_1_2_NV 0x20cb
  741. #define GLX_VIDEO_OUT_STACKED_FIELDS_2_1_NV 0x20cc
  742. #define glXBindVideoImageNV _glplatform_glXBindVideoImageNV
  743. extern int (*glXBindVideoImageNV)(Display *, GLXVideoDeviceNV, GLXPbuffer, int );
  744. #define glXGetVideoDeviceNV _glplatform_glXGetVideoDeviceNV
  745. extern int (*glXGetVideoDeviceNV)(Display *, int , int , GLXVideoDeviceNV *);
  746. #define glXGetVideoInfoNV _glplatform_glXGetVideoInfoNV
  747. extern int (*glXGetVideoInfoNV)(Display *, int , GLXVideoDeviceNV, unsigned long *, unsigned long *);
  748. #define glXReleaseVideoDeviceNV _glplatform_glXReleaseVideoDeviceNV
  749. extern int (*glXReleaseVideoDeviceNV)(Display *, int , GLXVideoDeviceNV);
  750. #define glXReleaseVideoImageNV _glplatform_glXReleaseVideoImageNV
  751. extern int (*glXReleaseVideoImageNV)(Display *, GLXPbuffer);
  752. #define glXSendPbufferToVideoNV _glplatform_glXSendPbufferToVideoNV
  753. extern int (*glXSendPbufferToVideoNV)(Display *, GLXPbuffer, int , unsigned long *, GLboolean);
  754. #endif
  755. #if defined(GLPLATFORM_ENABLE_GLX_OML_swap_method)
  756. extern bool GLPLATFORM_GLX_OML_swap_method;
  757. #define GLX_SWAP_COPY_OML 0x8062
  758. #define GLX_SWAP_EXCHANGE_OML 0x8061
  759. #define GLX_SWAP_METHOD_OML 0x8060
  760. #define GLX_SWAP_UNDEFINED_OML 0x8063
  761. #endif
  762. #if defined(GLPLATFORM_ENABLE_GLX_OML_sync_control)
  763. extern bool GLPLATFORM_GLX_OML_sync_control;
  764. #ifndef GLPLATFORM_TYPE_Bool
  765. #define GLPLATFORM_TYPE_Bool
  766. #endif
  767. #ifndef GLPLATFORM_TYPE_Display
  768. #define GLPLATFORM_TYPE_Display
  769. #endif
  770. #ifndef GLPLATFORM_TYPE_GLXDrawable
  771. #define GLPLATFORM_TYPE_GLXDrawable
  772. typedef XID GLXDrawable;
  773. #endif
  774. #ifndef GLPLATFORM_TYPE_int32_t
  775. #define GLPLATFORM_TYPE_int32_t
  776. #endif
  777. #ifndef GLPLATFORM_TYPE_int64_t
  778. #define GLPLATFORM_TYPE_int64_t
  779. #endif
  780. #define glXGetMscRateOML _glplatform_glXGetMscRateOML
  781. extern Bool (*glXGetMscRateOML)(Display *, GLXDrawable, int32_t *, int32_t *);
  782. #define glXGetSyncValuesOML _glplatform_glXGetSyncValuesOML
  783. extern Bool (*glXGetSyncValuesOML)(Display *, GLXDrawable, int64_t *, int64_t *, int64_t *);
  784. #define glXSwapBuffersMscOML _glplatform_glXSwapBuffersMscOML
  785. extern int64_t (*glXSwapBuffersMscOML)(Display *, GLXDrawable, int64_t, int64_t, int64_t);
  786. #define glXWaitForMscOML _glplatform_glXWaitForMscOML
  787. extern Bool (*glXWaitForMscOML)(Display *, GLXDrawable, int64_t, int64_t, int64_t, int64_t *, int64_t *, int64_t *);
  788. #define glXWaitForSbcOML _glplatform_glXWaitForSbcOML
  789. extern Bool (*glXWaitForSbcOML)(Display *, GLXDrawable, int64_t, int64_t *, int64_t *, int64_t *);
  790. #endif
  791. #if defined(GLPLATFORM_ENABLE_GLX_SGI_swap_control)
  792. extern bool GLPLATFORM_GLX_SGI_swap_control;
  793. #define glXSwapIntervalSGI _glplatform_glXSwapIntervalSGI
  794. extern int (*glXSwapIntervalSGI)(int );
  795. #endif
  796. #if defined(GLPLATFORM_ENABLE_GLX_SUN_get_transparent_index)
  797. extern bool GLPLATFORM_GLX_SUN_get_transparent_index;
  798. #ifndef GLPLATFORM_TYPE_Display
  799. #define GLPLATFORM_TYPE_Display
  800. #endif
  801. #ifndef GLPLATFORM_TYPE_Status
  802. #define GLPLATFORM_TYPE_Status
  803. #endif
  804. #ifndef GLPLATFORM_TYPE_Window
  805. #define GLPLATFORM_TYPE_Window
  806. #endif
  807. #define glXGetTransparentIndexSUN _glplatform_glXGetTransparentIndexSUN
  808. extern Status (*glXGetTransparentIndexSUN)(Display *, Window, Window, long *);
  809. #endif
  810. bool glplatform_glx_init(int maj, int min);
  811. #ifdef __cplusplus
  812. }
  813. #endif
  814. #endif