gl2ext.h 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666
  1. #ifndef __gl2ext_h_
  2. #define __gl2ext_h_
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. /*
  7. * This document is licensed under the SGI Free Software B License Version
  8. * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
  9. */
  10. #ifndef GL_APIENTRYP
  11. # define GL_APIENTRYP GL_APIENTRY*
  12. #endif
  13. /*------------------------------------------------------------------------*
  14. * OES extension tokens
  15. *------------------------------------------------------------------------*/
  16. /* GL_OES_compressed_ETC1_RGB8_texture */
  17. #ifndef GL_OES_compressed_ETC1_RGB8_texture
  18. #define GL_ETC1_RGB8_OES 0x8D64
  19. #endif
  20. /* GL_OES_compressed_paletted_texture */
  21. #ifndef GL_OES_compressed_paletted_texture
  22. #define GL_PALETTE4_RGB8_OES 0x8B90
  23. #define GL_PALETTE4_RGBA8_OES 0x8B91
  24. #define GL_PALETTE4_R5_G6_B5_OES 0x8B92
  25. #define GL_PALETTE4_RGBA4_OES 0x8B93
  26. #define GL_PALETTE4_RGB5_A1_OES 0x8B94
  27. #define GL_PALETTE8_RGB8_OES 0x8B95
  28. #define GL_PALETTE8_RGBA8_OES 0x8B96
  29. #define GL_PALETTE8_R5_G6_B5_OES 0x8B97
  30. #define GL_PALETTE8_RGBA4_OES 0x8B98
  31. #define GL_PALETTE8_RGB5_A1_OES 0x8B99
  32. #endif
  33. /* GL_OES_depth24 */
  34. #ifndef GL_OES_depth24
  35. #define GL_DEPTH_COMPONENT24_OES 0x81A6
  36. #endif
  37. /* GL_OES_depth32 */
  38. #ifndef GL_OES_depth32
  39. #define GL_DEPTH_COMPONENT32_OES 0x81A7
  40. #endif
  41. /* GL_OES_depth_texture */
  42. /* No new tokens introduced by this extension. */
  43. /* GL_OES_EGL_image */
  44. #ifndef GL_OES_EGL_image
  45. typedef void* GLeglImageOES;
  46. #endif
  47. /* GL_OES_get_program_binary */
  48. #ifndef GL_OES_get_program_binary
  49. #define GL_PROGRAM_BINARY_LENGTH_OES 0x8741
  50. #define GL_NUM_PROGRAM_BINARY_FORMATS_OES 0x87FE
  51. #define GL_PROGRAM_BINARY_FORMATS_OES 0x87FF
  52. #endif
  53. /* GL_OES_mapbuffer */
  54. #ifndef GL_OES_mapbuffer
  55. #define GL_WRITE_ONLY_OES 0x88B9
  56. #define GL_BUFFER_ACCESS_OES 0x88BB
  57. #define GL_BUFFER_MAPPED_OES 0x88BC
  58. #define GL_BUFFER_MAP_POINTER_OES 0x88BD
  59. #endif
  60. /* GL_OES_packed_depth_stencil */
  61. #ifndef GL_OES_packed_depth_stencil
  62. #define GL_DEPTH_STENCIL_OES 0x84F9
  63. #define GL_UNSIGNED_INT_24_8_OES 0x84FA
  64. #define GL_DEPTH24_STENCIL8_OES 0x88F0
  65. #endif
  66. /* GL_OES_rgb8_rgba8 */
  67. #ifndef GL_OES_rgb8_rgba8
  68. #define GL_RGB8_OES 0x8051
  69. #define GL_RGBA8_OES 0x8058
  70. #endif
  71. /* GL_OES_standard_derivatives */
  72. #ifndef GL_OES_standard_derivatives
  73. #define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES 0x8B8B
  74. #endif
  75. /* GL_OES_stencil1 */
  76. #ifndef GL_OES_stencil1
  77. #define GL_STENCIL_INDEX1_OES 0x8D46
  78. #endif
  79. /* GL_OES_stencil4 */
  80. #ifndef GL_OES_stencil4
  81. #define GL_STENCIL_INDEX4_OES 0x8D47
  82. #endif
  83. /* GL_OES_texture_3D */
  84. #ifndef GL_OES_texture_3D
  85. #define GL_TEXTURE_WRAP_R_OES 0x8072
  86. #define GL_TEXTURE_3D_OES 0x806F
  87. #define GL_TEXTURE_BINDING_3D_OES 0x806A
  88. #define GL_MAX_3D_TEXTURE_SIZE_OES 0x8073
  89. #define GL_SAMPLER_3D_OES 0x8B5F
  90. #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES 0x8CD4
  91. #endif
  92. /* GL_OES_texture_float */
  93. /* No new tokens introduced by this extension. */
  94. /* GL_OES_texture_float_linear */
  95. /* No new tokens introduced by this extension. */
  96. /* GL_OES_texture_half_float */
  97. #ifndef GL_OES_texture_half_float
  98. #define GL_HALF_FLOAT_OES 0x8D61
  99. #endif
  100. /* GL_OES_texture_half_float_linear */
  101. /* No new tokens introduced by this extension. */
  102. /* GL_OES_texture_npot */
  103. /* No new tokens introduced by this extension. */
  104. /* GL_OES_vertex_half_float */
  105. /* GL_HALF_FLOAT_OES defined in GL_OES_texture_half_float already. */
  106. /* GL_OES_vertex_type_10_10_10_2 */
  107. #ifndef GL_OES_vertex_type_10_10_10_2
  108. #define GL_UNSIGNED_INT_10_10_10_2_OES 0x8DF6
  109. #define GL_INT_10_10_10_2_OES 0x8DF7
  110. #endif
  111. /*------------------------------------------------------------------------*
  112. * AMD extension tokens
  113. *------------------------------------------------------------------------*/
  114. /* GL_AMD_compressed_3DC_texture */
  115. #ifndef GL_AMD_compressed_3DC_texture
  116. #define GL_3DC_X_AMD 0x87F9
  117. #define GL_3DC_XY_AMD 0x87FA
  118. #endif
  119. /* GL_AMD_compressed_ATC_texture */
  120. #ifndef GL_AMD_compressed_ATC_texture
  121. #define GL_ATC_RGB_AMD 0x8C92
  122. #define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93
  123. #define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE
  124. #endif
  125. /* GL_AMD_performance_monitor */
  126. #ifndef GL_AMD_performance_monitor
  127. #define GL_COUNTER_TYPE_AMD 0x8BC0
  128. #define GL_COUNTER_RANGE_AMD 0x8BC1
  129. #define GL_UNSIGNED_INT64_AMD 0x8BC2
  130. #define GL_PERCENTAGE_AMD 0x8BC3
  131. #define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4
  132. #define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5
  133. #define GL_PERFMON_RESULT_AMD 0x8BC6
  134. #endif
  135. /* GL_AMD_program_binary_Z400 */
  136. #ifndef GL_AMD_program_binary_Z400
  137. #define GL_Z400_BINARY_AMD 0x8740
  138. #endif
  139. /*------------------------------------------------------------------------*
  140. * EXT extension tokens
  141. *------------------------------------------------------------------------*/
  142. /* GL_EXT_blend_minmax */
  143. #ifndef GL_EXT_blend_minmax
  144. #define GL_MIN_EXT 0x8007
  145. #define GL_MAX_EXT 0x8008
  146. #endif
  147. /* GL_EXT_discard_framebuffer */
  148. #ifndef GL_EXT_discard_framebuffer
  149. #define GL_COLOR_EXT 0x1800
  150. #define GL_DEPTH_EXT 0x1801
  151. #define GL_STENCIL_EXT 0x1802
  152. #endif
  153. /* GL_EXT_multi_draw_arrays */
  154. /* No new tokens introduced by this extension. */
  155. /* GL_EXT_read_format_bgra */
  156. #ifndef GL_EXT_read_format_bgra
  157. #define GL_BGRA_EXT 0x80E1
  158. #define GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT 0x8365
  159. #define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT 0x8366
  160. #endif
  161. /* GL_EXT_texture_filter_anisotropic */
  162. #ifndef GL_EXT_texture_filter_anisotropic
  163. #define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
  164. #define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
  165. #endif
  166. /* GL_EXT_texture_format_BGRA8888 */
  167. #ifndef GL_EXT_texture_format_BGRA8888
  168. #define GL_BGRA_EXT 0x80E1
  169. #endif
  170. /* GL_EXT_texture_type_2_10_10_10_REV */
  171. #ifndef GL_EXT_texture_type_2_10_10_10_REV
  172. #define GL_UNSIGNED_INT_2_10_10_10_REV_EXT 0x8368
  173. #endif
  174. /*------------------------------------------------------------------------*
  175. * IMG extension tokens
  176. *------------------------------------------------------------------------*/
  177. /* GL_IMG_program_binary */
  178. #ifndef GL_IMG_program_binary
  179. #define GL_SGX_PROGRAM_BINARY_IMG 0x9130
  180. #endif
  181. /* GL_IMG_read_format */
  182. #ifndef GL_IMG_read_format
  183. #define GL_BGRA_IMG 0x80E1
  184. #define GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG 0x8365
  185. #endif
  186. /* GL_IMG_shader_binary */
  187. #ifndef GL_IMG_shader_binary
  188. #define GL_SGX_BINARY_IMG 0x8C0A
  189. #endif
  190. /* GL_IMG_texture_compression_pvrtc */
  191. #ifndef GL_IMG_texture_compression_pvrtc
  192. #define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00
  193. #define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01
  194. #define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02
  195. #define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03
  196. #endif
  197. /*------------------------------------------------------------------------*
  198. * NV extension tokens
  199. *------------------------------------------------------------------------*/
  200. /* GL_NV_fence */
  201. #ifndef GL_NV_fence
  202. #define GL_ALL_COMPLETED_NV 0x84F2
  203. #define GL_FENCE_STATUS_NV 0x84F3
  204. #define GL_FENCE_CONDITION_NV 0x84F4
  205. #endif
  206. /*------------------------------------------------------------------------*
  207. * QCOM extension tokens
  208. *------------------------------------------------------------------------*/
  209. /* GL_QCOM_driver_control */
  210. /* No new tokens introduced by this extension. */
  211. /* GL_QCOM_extended_get */
  212. #ifndef GL_QCOM_extended_get
  213. #define GL_TEXTURE_WIDTH_QCOM 0x8BD2
  214. #define GL_TEXTURE_HEIGHT_QCOM 0x8BD3
  215. #define GL_TEXTURE_DEPTH_QCOM 0x8BD4
  216. #define GL_TEXTURE_INTERNAL_FORMAT_QCOM 0x8BD5
  217. #define GL_TEXTURE_FORMAT_QCOM 0x8BD6
  218. #define GL_TEXTURE_TYPE_QCOM 0x8BD7
  219. #define GL_TEXTURE_IMAGE_VALID_QCOM 0x8BD8
  220. #define GL_TEXTURE_NUM_LEVELS_QCOM 0x8BD9
  221. #define GL_TEXTURE_TARGET_QCOM 0x8BDA
  222. #define GL_TEXTURE_OBJECT_VALID_QCOM 0x8BDB
  223. #define GL_STATE_RESTORE 0x8BDC
  224. #endif
  225. /* GL_QCOM_extended_get2 */
  226. /* No new tokens introduced by this extension. */
  227. /* GL_QCOM_perfmon_global_mode */
  228. #ifndef GL_QCOM_perfmon_global_mode
  229. #define GL_PERFMON_GLOBAL_MODE_QCOM 0x8FA0
  230. #endif
  231. /* GL_QCOM_writeonly_rendering */
  232. #ifndef GL_QCOM_writeonly_rendering
  233. #define GL_WRITEONLY_RENDERING_QCOM 0x8823
  234. #endif
  235. /*------------------------------------------------------------------------*
  236. * End of extension tokens, start of corresponding extension functions
  237. *------------------------------------------------------------------------*/
  238. /*------------------------------------------------------------------------*
  239. * OES extension functions
  240. *------------------------------------------------------------------------*/
  241. /* GL_OES_compressed_ETC1_RGB8_texture */
  242. #ifndef GL_OES_compressed_ETC1_RGB8_texture
  243. #define GL_OES_compressed_ETC1_RGB8_texture 1
  244. #endif
  245. /* GL_OES_compressed_paletted_texture */
  246. #ifndef GL_OES_compressed_paletted_texture
  247. #define GL_OES_compressed_paletted_texture 1
  248. #endif
  249. /* GL_OES_depth24 */
  250. #ifndef GL_OES_depth24
  251. #define GL_OES_depth24 1
  252. #endif
  253. /* GL_OES_depth32 */
  254. #ifndef GL_OES_depth32
  255. #define GL_OES_depth32 1
  256. #endif
  257. /* GL_OES_depth_texture */
  258. #ifndef GL_OES_depth_texture
  259. #define GL_OES_depth_texture 1
  260. #endif
  261. /* GL_OES_EGL_image */
  262. #ifndef GL_OES_EGL_image
  263. #define GL_OES_EGL_image 1
  264. #ifdef GL_GLEXT_PROTOTYPES
  265. GL_APICALL void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image);
  266. GL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image);
  267. #endif
  268. typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);
  269. typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
  270. #endif
  271. /* GL_OES_element_index_uint */
  272. #ifndef GL_OES_element_index_uint
  273. #define GL_OES_element_index_uint 1
  274. #endif
  275. /* GL_OES_fbo_render_mipmap */
  276. #ifndef GL_OES_fbo_render_mipmap
  277. #define GL_OES_fbo_render_mipmap 1
  278. #endif
  279. /* GL_OES_fragment_precision_high */
  280. #ifndef GL_OES_fragment_precision_high
  281. #define GL_OES_fragment_precision_high 1
  282. #endif
  283. /* GL_OES_get_program_binary */
  284. #ifndef GL_OES_get_program_binary
  285. #define GL_OES_get_program_binary 1
  286. #ifdef GL_GLEXT_PROTOTYPES
  287. GL_APICALL void GL_APIENTRY glGetProgramBinaryOES (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
  288. GL_APICALL void GL_APIENTRY glProgramBinaryOES (GLuint program, GLenum binaryFormat, const void *binary, GLint length);
  289. #endif
  290. typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYOESPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
  291. typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYOESPROC) (GLuint program, GLenum binaryFormat, const void *binary, GLint length);
  292. #endif
  293. /* GL_OES_mapbuffer */
  294. #ifndef GL_OES_mapbuffer
  295. #define GL_OES_mapbuffer 1
  296. #ifdef GL_GLEXT_PROTOTYPES
  297. GL_APICALL void* GL_APIENTRY glMapBufferOES (GLenum target, GLenum access);
  298. GL_APICALL GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target);
  299. GL_APICALL void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, void** params);
  300. #endif
  301. typedef void* (GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access);
  302. typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target);
  303. typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, void** params);
  304. #endif
  305. /* GL_OES_packed_depth_stencil */
  306. #ifndef GL_OES_packed_depth_stencil
  307. #define GL_OES_packed_depth_stencil 1
  308. #endif
  309. /* GL_OES_rgb8_rgba8 */
  310. #ifndef GL_OES_rgb8_rgba8
  311. #define GL_OES_rgb8_rgba8 1
  312. #endif
  313. /* GL_OES_standard_derivatives */
  314. #ifndef GL_OES_standard_derivatives
  315. #define GL_OES_standard_derivatives 1
  316. #endif
  317. /* GL_OES_stencil1 */
  318. #ifndef GL_OES_stencil1
  319. #define GL_OES_stencil1 1
  320. #endif
  321. /* GL_OES_stencil4 */
  322. #ifndef GL_OES_stencil4
  323. #define GL_OES_stencil4 1
  324. #endif
  325. /* GL_OES_texture_3D */
  326. #ifndef GL_OES_texture_3D
  327. #define GL_OES_texture_3D 1
  328. #ifdef GL_GLEXT_PROTOTYPES
  329. GL_APICALL void GL_APIENTRY glTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void* pixels);
  330. GL_APICALL void GL_APIENTRY glTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void* pixels);
  331. GL_APICALL void GL_APIENTRY glCopyTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
  332. GL_APICALL void GL_APIENTRY glCompressedTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void* data);
  333. GL_APICALL void GL_APIENTRY glCompressedTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void* data);
  334. GL_APICALL void GL_APIENTRY glFramebufferTexture3DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
  335. #endif
  336. typedef void (GL_APIENTRYP PFNGLTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
  337. typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void* pixels);
  338. typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
  339. typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void* data);
  340. typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void* data);
  341. typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DOES) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
  342. #endif
  343. /* GL_OES_texture_float */
  344. #ifndef GL_OES_texture_float
  345. #define GL_OES_texture_float 1
  346. #endif
  347. /* GL_OES_texture_float_linear */
  348. #ifndef GL_OES_texture_float_linear
  349. #define GL_OES_texture_float_linear 1
  350. #endif
  351. /* GL_OES_texture_half_float */
  352. #ifndef GL_OES_texture_half_float
  353. #define GL_OES_texture_half_float 1
  354. #endif
  355. /* GL_OES_texture_half_float_linear */
  356. #ifndef GL_OES_texture_half_float_linear
  357. #define GL_OES_texture_half_float_linear 1
  358. #endif
  359. /* GL_OES_texture_npot */
  360. #ifndef GL_OES_texture_npot
  361. #define GL_OES_texture_npot 1
  362. #endif
  363. /* GL_OES_vertex_half_float */
  364. #ifndef GL_OES_vertex_half_float
  365. #define GL_OES_vertex_half_float 1
  366. #endif
  367. /* GL_OES_vertex_type_10_10_10_2 */
  368. #ifndef GL_OES_vertex_type_10_10_10_2
  369. #define GL_OES_vertex_type_10_10_10_2 1
  370. #endif
  371. /*------------------------------------------------------------------------*
  372. * AMD extension functions
  373. *------------------------------------------------------------------------*/
  374. /* GL_AMD_compressed_3DC_texture */
  375. #ifndef GL_AMD_compressed_3DC_texture
  376. #define GL_AMD_compressed_3DC_texture 1
  377. #endif
  378. /* GL_AMD_compressed_ATC_texture */
  379. #ifndef GL_AMD_compressed_ATC_texture
  380. #define GL_AMD_compressed_ATC_texture 1
  381. #endif
  382. /* AMD_performance_monitor */
  383. #ifndef GL_AMD_performance_monitor
  384. #define GL_AMD_performance_monitor 1
  385. #ifdef GL_GLEXT_PROTOTYPES
  386. GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
  387. GL_APICALL void GL_APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
  388. GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, char *groupString);
  389. GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, char *counterString);
  390. GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, void *data);
  391. GL_APICALL void GL_APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors);
  392. GL_APICALL void GL_APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors);
  393. GL_APICALL void GL_APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList);
  394. GL_APICALL void GL_APIENTRY glBeginPerfMonitorAMD (GLuint monitor);
  395. GL_APICALL void GL_APIENTRY glEndPerfMonitorAMD (GLuint monitor);
  396. GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
  397. #endif
  398. typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
  399. typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
  400. typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, char *groupString);
  401. typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, char *counterString);
  402. typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, void *data);
  403. typedef void (GL_APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
  404. typedef void (GL_APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
  405. typedef void (GL_APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList);
  406. typedef void (GL_APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor);
  407. typedef void (GL_APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor);
  408. typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
  409. #endif
  410. /* GL_AMD_program_binary_Z400 */
  411. #ifndef GL_AMD_program_binary_Z400
  412. #define GL_AMD_program_binary_Z400 1
  413. #endif
  414. /*------------------------------------------------------------------------*
  415. * EXT extension functions
  416. *------------------------------------------------------------------------*/
  417. /* GL_EXT_blend_minmax */
  418. #ifndef GL_EXT_blend_minmax
  419. #define GL_EXT_blend_minmax 1
  420. #endif
  421. /* GL_EXT_discard_framebuffer */
  422. #ifndef GL_EXT_discard_framebuffer
  423. #define GL_EXT_discard_framebuffer 1
  424. #ifdef GL_GLEXT_PROTOTYPES
  425. GL_APICALL void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, GLsizei numAttachments, const GLenum *attachments);
  426. #endif
  427. typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments);
  428. #endif
  429. #ifndef GL_EXT_multi_draw_arrays
  430. #define GL_EXT_multi_draw_arrays 1
  431. #ifdef GL_GLEXT_PROTOTYPES
  432. GL_APICALL void GL_APIENTRY glMultiDrawArraysEXT (GLenum, GLint *, GLsizei *, GLsizei);
  433. GL_APICALL void GL_APIENTRY glMultiDrawElementsEXT (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei);
  434. #endif /* GL_GLEXT_PROTOTYPES */
  435. typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
  436. typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
  437. #endif
  438. /* GL_EXT_read_format_bgra */
  439. #ifndef GL_EXT_read_format_bgra
  440. #define GL_EXT_read_format_bgra 1
  441. #endif
  442. /* GL_EXT_texture_filter_anisotropic */
  443. #ifndef GL_EXT_texture_filter_anisotropic
  444. #define GL_EXT_texture_filter_anisotropic 1
  445. #endif
  446. /* GL_EXT_texture_format_BGRA8888 */
  447. #ifndef GL_EXT_texture_format_BGRA8888
  448. #define GL_EXT_texture_format_BGRA8888 1
  449. #endif
  450. /* GL_EXT_texture_type_2_10_10_10_REV */
  451. #ifndef GL_EXT_texture_type_2_10_10_10_REV
  452. #define GL_EXT_texture_type_2_10_10_10_REV 1
  453. #endif
  454. /*------------------------------------------------------------------------*
  455. * IMG extension functions
  456. *------------------------------------------------------------------------*/
  457. /* GL_IMG_program_binary */
  458. #ifndef GL_IMG_program_binary
  459. #define GL_IMG_program_binary 1
  460. #endif
  461. /* GL_IMG_read_format */
  462. #ifndef GL_IMG_read_format
  463. #define GL_IMG_read_format 1
  464. #endif
  465. /* GL_IMG_shader_binary */
  466. #ifndef GL_IMG_shader_binary
  467. #define GL_IMG_shader_binary 1
  468. #endif
  469. /* GL_IMG_texture_compression_pvrtc */
  470. #ifndef GL_IMG_texture_compression_pvrtc
  471. #define GL_IMG_texture_compression_pvrtc 1
  472. #endif
  473. /*------------------------------------------------------------------------*
  474. * NV extension functions
  475. *------------------------------------------------------------------------*/
  476. /* GL_NV_fence */
  477. #ifndef GL_NV_fence
  478. #define GL_NV_fence 1
  479. #ifdef GL_GLEXT_PROTOTYPES
  480. GL_APICALL void GL_APIENTRY glDeleteFencesNV (GLsizei, const GLuint *);
  481. GL_APICALL void GL_APIENTRY glGenFencesNV (GLsizei, GLuint *);
  482. GL_APICALL GLboolean GL_APIENTRY glIsFenceNV (GLuint);
  483. GL_APICALL GLboolean GL_APIENTRY glTestFenceNV (GLuint);
  484. GL_APICALL void GL_APIENTRY glGetFenceivNV (GLuint, GLenum, GLint *);
  485. GL_APICALL void GL_APIENTRY glFinishFenceNV (GLuint);
  486. GL_APICALL void GL_APIENTRY glSetFenceNV (GLuint, GLenum);
  487. #endif
  488. typedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);
  489. typedef void (GL_APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);
  490. typedef GLboolean (GL_APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);
  491. typedef GLboolean (GL_APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence);
  492. typedef void (GL_APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);
  493. typedef void (GL_APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);
  494. typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
  495. #endif
  496. /*------------------------------------------------------------------------*
  497. * QCOM extension functions
  498. *------------------------------------------------------------------------*/
  499. /* GL_QCOM_driver_control */
  500. #ifndef GL_QCOM_driver_control
  501. #define GL_QCOM_driver_control 1
  502. #ifdef GL_GLEXT_PROTOTYPES
  503. GL_APICALL void GL_APIENTRY glGetDriverControlsQCOM (GLint *num, GLsizei size, GLuint *driverControls);
  504. GL_APICALL void GL_APIENTRY glGetDriverControlStringQCOM (GLuint driverControl, GLsizei bufSize, GLsizei *length, char *driverControlString);
  505. GL_APICALL void GL_APIENTRY glEnableDriverControlQCOM (GLuint driverControl);
  506. GL_APICALL void GL_APIENTRY glDisableDriverControlQCOM (GLuint driverControl);
  507. #endif
  508. typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC) (GLint *num, GLsizei size, GLuint *driverControls);
  509. typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei *length, char *driverControlString);
  510. typedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
  511. typedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
  512. #endif
  513. /* GL_QCOM_extended_get */
  514. #ifndef GL_QCOM_extended_get
  515. #define GL_QCOM_extended_get 1
  516. #ifdef GL_GLEXT_PROTOTYPES
  517. GL_APICALL void GL_APIENTRY glExtGetTexturesQCOM (GLuint *textures, GLint maxTextures, GLint *numTextures);
  518. GL_APICALL void GL_APIENTRY glExtGetBuffersQCOM (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
  519. GL_APICALL void GL_APIENTRY glExtGetRenderbuffersQCOM (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
  520. GL_APICALL void GL_APIENTRY glExtGetFramebuffersQCOM (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
  521. GL_APICALL void GL_APIENTRY glExtGetTexLevelParameterivQCOM (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
  522. GL_APICALL void GL_APIENTRY glExtTexObjectStateOverrideiQCOM (GLenum target, GLenum pname, GLint param);
  523. GL_APICALL void GL_APIENTRY glExtGetTexSubImageQCOM (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, void *texels);
  524. GL_APICALL void GL_APIENTRY glExtGetBufferPointervQCOM (GLenum target, void **params);
  525. #endif
  526. typedef void (GL_APIENTRYP PFNGLEXTGETTEXTURESQCOMPROC) (GLuint *textures, GLint maxTextures, GLint *numTextures);
  527. typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERSQCOMPROC) (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
  528. typedef void (GL_APIENTRYP PFNGLEXTGETRENDERBUFFERSQCOMPROC) (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
  529. typedef void (GL_APIENTRYP PFNGLEXTGETFRAMEBUFFERSQCOMPROC) (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
  530. typedef void (GL_APIENTRYP PFNGLEXTGETTEXLEVELPARAMETERIVQCOMPROC) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
  531. typedef void (GL_APIENTRYP PFNGLEXTTEXOBJECTSTATEOVERRIDEIQCOMPROC) (GLenum target, GLenum pname, GLint param);
  532. typedef void (GL_APIENTRYP PFNGLEXTGETTEXSUBIMAGEQCOMPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, void *texels);
  533. typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERPOINTERVQCOMPROC) (GLenum target, void **params);
  534. #endif
  535. /* GL_QCOM_extended_get2 */
  536. #ifndef GL_QCOM_extended_get2
  537. #define GL_QCOM_extended_get2 1
  538. #ifdef GL_GLEXT_PROTOTYPES
  539. GL_APICALL void GL_APIENTRY glExtGetShadersQCOM (GLuint *shaders, GLint maxShaders, GLint *numShaders);
  540. GL_APICALL void GL_APIENTRY glExtGetProgramsQCOM (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
  541. GL_APICALL GLboolean GL_APIENTRY glExtIsProgramBinaryQCOM (GLuint program);
  542. GL_APICALL void GL_APIENTRY glExtGetProgramBinarySourceQCOM (GLuint program, GLenum shadertype, char *source, GLint *length);
  543. #endif
  544. typedef void (GL_APIENTRYP PFNGLEXTGETSHADERSQCOMPROC) (GLuint *shaders, GLint maxShaders, GLint *numShaders);
  545. typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMSQCOMPROC) (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
  546. typedef GLboolean (GL_APIENTRYP PFNGLEXTISPROGRAMBINARYQCOMPROC) (GLuint program);
  547. typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC) (GLuint program, GLenum shadertype, char *source, GLint *length);
  548. #endif
  549. /* GL_QCOM_perfmon_global_mode */
  550. #ifndef GL_QCOM_perfmon_global_mode
  551. #define GL_QCOM_perfmon_global_mode 1
  552. #endif
  553. /* GL_QCOM_writeonly_rendering */
  554. #ifndef GL_QCOM_writeonly_rendering
  555. #define GL_QCOM_writeonly_rendering 1
  556. #endif
  557. #ifdef __cplusplus
  558. }
  559. #endif
  560. #endif /* __gl2ext_h_ */