SDL_opengles2.h 129 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790
  1. /*
  2. Simple DirectMedia Layer
  3. Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
  4. This software is provided 'as-is', without any express or implied
  5. warranty. In no event will the authors be held liable for any damages
  6. arising from the use of this software.
  7. Permission is granted to anyone to use this software for any purpose,
  8. including commercial applications, and to alter it and redistribute it
  9. freely, subject to the following restrictions:
  10. 1. The origin of this software must not be misrepresented; you must not
  11. claim that you wrote the original software. If you use this software
  12. in a product, an acknowledgment in the product documentation would be
  13. appreciated but is not required.
  14. 2. Altered source versions must be plainly marked as such, and must not be
  15. misrepresented as being the original software.
  16. 3. This notice may not be removed or altered from any source distribution.
  17. */
  18. /**
  19. * \file SDL_opengles.h
  20. *
  21. * This is a simple file to encapsulate the OpenGL ES 2.0 API headers.
  22. */
  23. #ifndef _MSC_VER
  24. #ifdef __IPHONEOS__
  25. #include <OpenGLES/ES2/gl.h>
  26. #include <OpenGLES/ES2/glext.h>
  27. #else
  28. #include <GLES2/gl2.h>
  29. #include <GLES2/gl2ext.h>
  30. #endif
  31. #else /* _MSC_VER */
  32. /* OpenGL ES2 headers for Visual Studio */
  33. #ifndef __khrplatform_h_
  34. #define __khrplatform_h_
  35. /*
  36. ** Copyright (c) 2008-2009 The Khronos Group Inc.
  37. **
  38. ** Permission is hereby granted, free of charge, to any person obtaining a
  39. ** copy of this software and/or associated documentation files (the
  40. ** "Materials"), to deal in the Materials without restriction, including
  41. ** without limitation the rights to use, copy, modify, merge, publish,
  42. ** distribute, sublicense, and/or sell copies of the Materials, and to
  43. ** permit persons to whom the Materials are furnished to do so, subject to
  44. ** the following conditions:
  45. **
  46. ** The above copyright notice and this permission notice shall be included
  47. ** in all copies or substantial portions of the Materials.
  48. **
  49. ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  50. ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  51. ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  52. ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
  53. ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  54. ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  55. ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
  56. */
  57. /* Khronos platform-specific types and definitions.
  58. *
  59. * $Revision: 23298 $ on $Date: 2013-09-30 17:07:13 -0700 (Mon, 30 Sep 2013) $
  60. *
  61. * Adopters may modify this file to suit their platform. Adopters are
  62. * encouraged to submit platform specific modifications to the Khronos
  63. * group so that they can be included in future versions of this file.
  64. * Please submit changes by sending them to the public Khronos Bugzilla
  65. * (http://khronos.org/bugzilla) by filing a bug against product
  66. * "Khronos (general)" component "Registry".
  67. *
  68. * A predefined template which fills in some of the bug fields can be
  69. * reached using http://tinyurl.com/khrplatform-h-bugreport, but you
  70. * must create a Bugzilla login first.
  71. *
  72. *
  73. * See the Implementer's Guidelines for information about where this file
  74. * should be located on your system and for more details of its use:
  75. * http://www.khronos.org/registry/implementers_guide.pdf
  76. *
  77. * This file should be included as
  78. * #include <KHR/khrplatform.h>
  79. * by Khronos client API header files that use its types and defines.
  80. *
  81. * The types in khrplatform.h should only be used to define API-specific types.
  82. *
  83. * Types defined in khrplatform.h:
  84. * khronos_int8_t signed 8 bit
  85. * khronos_uint8_t unsigned 8 bit
  86. * khronos_int16_t signed 16 bit
  87. * khronos_uint16_t unsigned 16 bit
  88. * khronos_int32_t signed 32 bit
  89. * khronos_uint32_t unsigned 32 bit
  90. * khronos_int64_t signed 64 bit
  91. * khronos_uint64_t unsigned 64 bit
  92. * khronos_intptr_t signed same number of bits as a pointer
  93. * khronos_uintptr_t unsigned same number of bits as a pointer
  94. * khronos_ssize_t signed size
  95. * khronos_usize_t unsigned size
  96. * khronos_float_t signed 32 bit floating point
  97. * khronos_time_ns_t unsigned 64 bit time in nanoseconds
  98. * khronos_utime_nanoseconds_t unsigned time interval or absolute time in
  99. * nanoseconds
  100. * khronos_stime_nanoseconds_t signed time interval in nanoseconds
  101. * khronos_boolean_enum_t enumerated boolean type. This should
  102. * only be used as a base type when a client API's boolean type is
  103. * an enum. Client APIs which use an integer or other type for
  104. * booleans cannot use this as the base type for their boolean.
  105. *
  106. * Tokens defined in khrplatform.h:
  107. *
  108. * KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values.
  109. *
  110. * KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0.
  111. * KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0.
  112. *
  113. * Calling convention macros defined in this file:
  114. * KHRONOS_APICALL
  115. * KHRONOS_APIENTRY
  116. * KHRONOS_APIATTRIBUTES
  117. *
  118. * These may be used in function prototypes as:
  119. *
  120. * KHRONOS_APICALL void KHRONOS_APIENTRY funcname(
  121. * int arg1,
  122. * int arg2) KHRONOS_APIATTRIBUTES;
  123. */
  124. /*-------------------------------------------------------------------------
  125. * Definition of KHRONOS_APICALL
  126. *-------------------------------------------------------------------------
  127. * This precedes the return type of the function in the function prototype.
  128. */
  129. #if defined(_WIN32) && !defined(__SCITECH_SNAP__)
  130. # define KHRONOS_APICALL __declspec(dllimport)
  131. #elif defined (__SYMBIAN32__)
  132. # define KHRONOS_APICALL IMPORT_C
  133. #else
  134. # define KHRONOS_APICALL
  135. #endif
  136. /*-------------------------------------------------------------------------
  137. * Definition of KHRONOS_APIENTRY
  138. *-------------------------------------------------------------------------
  139. * This follows the return type of the function and precedes the function
  140. * name in the function prototype.
  141. */
  142. #if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)
  143. /* Win32 but not WinCE */
  144. # define KHRONOS_APIENTRY __stdcall
  145. #else
  146. # define KHRONOS_APIENTRY
  147. #endif
  148. /*-------------------------------------------------------------------------
  149. * Definition of KHRONOS_APIATTRIBUTES
  150. *-------------------------------------------------------------------------
  151. * This follows the closing parenthesis of the function prototype arguments.
  152. */
  153. #if defined (__ARMCC_2__)
  154. #define KHRONOS_APIATTRIBUTES __softfp
  155. #else
  156. #define KHRONOS_APIATTRIBUTES
  157. #endif
  158. /*-------------------------------------------------------------------------
  159. * basic type definitions
  160. *-----------------------------------------------------------------------*/
  161. #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__)
  162. /*
  163. * Using <stdint.h>
  164. */
  165. #include <stdint.h>
  166. typedef int32_t khronos_int32_t;
  167. typedef uint32_t khronos_uint32_t;
  168. typedef int64_t khronos_int64_t;
  169. typedef uint64_t khronos_uint64_t;
  170. #define KHRONOS_SUPPORT_INT64 1
  171. #define KHRONOS_SUPPORT_FLOAT 1
  172. #elif defined(__VMS ) || defined(__sgi)
  173. /*
  174. * Using <inttypes.h>
  175. */
  176. #include <inttypes.h>
  177. typedef int32_t khronos_int32_t;
  178. typedef uint32_t khronos_uint32_t;
  179. typedef int64_t khronos_int64_t;
  180. typedef uint64_t khronos_uint64_t;
  181. #define KHRONOS_SUPPORT_INT64 1
  182. #define KHRONOS_SUPPORT_FLOAT 1
  183. #elif defined(_WIN32) && !defined(__SCITECH_SNAP__)
  184. /*
  185. * Win32
  186. */
  187. typedef __int32 khronos_int32_t;
  188. typedef unsigned __int32 khronos_uint32_t;
  189. typedef __int64 khronos_int64_t;
  190. typedef unsigned __int64 khronos_uint64_t;
  191. #define KHRONOS_SUPPORT_INT64 1
  192. #define KHRONOS_SUPPORT_FLOAT 1
  193. #elif defined(__sun__) || defined(__digital__)
  194. /*
  195. * Sun or Digital
  196. */
  197. typedef int khronos_int32_t;
  198. typedef unsigned int khronos_uint32_t;
  199. #if defined(__arch64__) || defined(_LP64)
  200. typedef long int khronos_int64_t;
  201. typedef unsigned long int khronos_uint64_t;
  202. #else
  203. typedef long long int khronos_int64_t;
  204. typedef unsigned long long int khronos_uint64_t;
  205. #endif /* __arch64__ */
  206. #define KHRONOS_SUPPORT_INT64 1
  207. #define KHRONOS_SUPPORT_FLOAT 1
  208. #elif 0
  209. /*
  210. * Hypothetical platform with no float or int64 support
  211. */
  212. typedef int khronos_int32_t;
  213. typedef unsigned int khronos_uint32_t;
  214. #define KHRONOS_SUPPORT_INT64 0
  215. #define KHRONOS_SUPPORT_FLOAT 0
  216. #else
  217. /*
  218. * Generic fallback
  219. */
  220. #include <stdint.h>
  221. typedef int32_t khronos_int32_t;
  222. typedef uint32_t khronos_uint32_t;
  223. typedef int64_t khronos_int64_t;
  224. typedef uint64_t khronos_uint64_t;
  225. #define KHRONOS_SUPPORT_INT64 1
  226. #define KHRONOS_SUPPORT_FLOAT 1
  227. #endif
  228. /*
  229. * Types that are (so far) the same on all platforms
  230. */
  231. typedef signed char khronos_int8_t;
  232. typedef unsigned char khronos_uint8_t;
  233. typedef signed short int khronos_int16_t;
  234. typedef unsigned short int khronos_uint16_t;
  235. /*
  236. * Types that differ between LLP64 and LP64 architectures - in LLP64,
  237. * pointers are 64 bits, but 'long' is still 32 bits. Win64 appears
  238. * to be the only LLP64 architecture in current use.
  239. */
  240. #ifdef _WIN64
  241. typedef signed long long int khronos_intptr_t;
  242. typedef unsigned long long int khronos_uintptr_t;
  243. typedef signed long long int khronos_ssize_t;
  244. typedef unsigned long long int khronos_usize_t;
  245. #else
  246. typedef signed long int khronos_intptr_t;
  247. typedef unsigned long int khronos_uintptr_t;
  248. typedef signed long int khronos_ssize_t;
  249. typedef unsigned long int khronos_usize_t;
  250. #endif
  251. #if KHRONOS_SUPPORT_FLOAT
  252. /*
  253. * Float type
  254. */
  255. typedef float khronos_float_t;
  256. #endif
  257. #if KHRONOS_SUPPORT_INT64
  258. /* Time types
  259. *
  260. * These types can be used to represent a time interval in nanoseconds or
  261. * an absolute Unadjusted System Time. Unadjusted System Time is the number
  262. * of nanoseconds since some arbitrary system event (e.g. since the last
  263. * time the system booted). The Unadjusted System Time is an unsigned
  264. * 64 bit value that wraps back to 0 every 584 years. Time intervals
  265. * may be either signed or unsigned.
  266. */
  267. typedef khronos_uint64_t khronos_utime_nanoseconds_t;
  268. typedef khronos_int64_t khronos_stime_nanoseconds_t;
  269. #endif
  270. /*
  271. * Dummy value used to pad enum types to 32 bits.
  272. */
  273. #ifndef KHRONOS_MAX_ENUM
  274. #define KHRONOS_MAX_ENUM 0x7FFFFFFF
  275. #endif
  276. /*
  277. * Enumerated boolean type
  278. *
  279. * Values other than zero should be considered to be true. Therefore
  280. * comparisons should not be made against KHRONOS_TRUE.
  281. */
  282. typedef enum {
  283. KHRONOS_FALSE = 0,
  284. KHRONOS_TRUE = 1,
  285. KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM
  286. } khronos_boolean_enum_t;
  287. #endif /* __khrplatform_h_ */
  288. #ifndef __gl2platform_h_
  289. #define __gl2platform_h_
  290. /* $Revision: 10602 $ on $Date:: 2010-03-04 22:35:34 -0800 #$ */
  291. /*
  292. * This document is licensed under the SGI Free Software B License Version
  293. * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
  294. */
  295. /* Platform-specific types and definitions for OpenGL ES 2.X gl2.h
  296. *
  297. * Adopters may modify khrplatform.h and this file to suit their platform.
  298. * You are encouraged to submit all modifications to the Khronos group so that
  299. * they can be included in future versions of this file. Please submit changes
  300. * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)
  301. * by filing a bug against product "OpenGL-ES" component "Registry".
  302. */
  303. /*#include <KHR/khrplatform.h>*/
  304. #ifndef GL_APICALL
  305. #define GL_APICALL KHRONOS_APICALL
  306. #endif
  307. #ifndef GL_APIENTRY
  308. #define GL_APIENTRY KHRONOS_APIENTRY
  309. #endif
  310. #endif /* __gl2platform_h_ */
  311. #ifndef __gl2_h_
  312. #define __gl2_h_
  313. /* $Revision: 16803 $ on $Date:: 2012-02-02 09:49:18 -0800 #$ */
  314. /*#include <GLES2/gl2platform.h>*/
  315. #ifdef __cplusplus
  316. extern "C" {
  317. #endif
  318. /*
  319. * This document is licensed under the SGI Free Software B License Version
  320. * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
  321. */
  322. /*-------------------------------------------------------------------------
  323. * Data type definitions
  324. *-----------------------------------------------------------------------*/
  325. typedef void GLvoid;
  326. typedef char GLchar;
  327. typedef unsigned int GLenum;
  328. typedef unsigned char GLboolean;
  329. typedef unsigned int GLbitfield;
  330. typedef khronos_int8_t GLbyte;
  331. typedef short GLshort;
  332. typedef int GLint;
  333. typedef int GLsizei;
  334. typedef khronos_uint8_t GLubyte;
  335. typedef unsigned short GLushort;
  336. typedef unsigned int GLuint;
  337. typedef khronos_float_t GLfloat;
  338. typedef khronos_float_t GLclampf;
  339. typedef khronos_int32_t GLfixed;
  340. /* GL types for handling large vertex buffer objects */
  341. typedef khronos_intptr_t GLintptr;
  342. typedef khronos_ssize_t GLsizeiptr;
  343. /* OpenGL ES core versions */
  344. #define GL_ES_VERSION_2_0 1
  345. /* ClearBufferMask */
  346. #define GL_DEPTH_BUFFER_BIT 0x00000100
  347. #define GL_STENCIL_BUFFER_BIT 0x00000400
  348. #define GL_COLOR_BUFFER_BIT 0x00004000
  349. /* Boolean */
  350. #define GL_FALSE 0
  351. #define GL_TRUE 1
  352. /* BeginMode */
  353. #define GL_POINTS 0x0000
  354. #define GL_LINES 0x0001
  355. #define GL_LINE_LOOP 0x0002
  356. #define GL_LINE_STRIP 0x0003
  357. #define GL_TRIANGLES 0x0004
  358. #define GL_TRIANGLE_STRIP 0x0005
  359. #define GL_TRIANGLE_FAN 0x0006
  360. /* AlphaFunction (not supported in ES20) */
  361. /* GL_NEVER */
  362. /* GL_LESS */
  363. /* GL_EQUAL */
  364. /* GL_LEQUAL */
  365. /* GL_GREATER */
  366. /* GL_NOTEQUAL */
  367. /* GL_GEQUAL */
  368. /* GL_ALWAYS */
  369. /* BlendingFactorDest */
  370. #define GL_ZERO 0
  371. #define GL_ONE 1
  372. #define GL_SRC_COLOR 0x0300
  373. #define GL_ONE_MINUS_SRC_COLOR 0x0301
  374. #define GL_SRC_ALPHA 0x0302
  375. #define GL_ONE_MINUS_SRC_ALPHA 0x0303
  376. #define GL_DST_ALPHA 0x0304
  377. #define GL_ONE_MINUS_DST_ALPHA 0x0305
  378. /* BlendingFactorSrc */
  379. /* GL_ZERO */
  380. /* GL_ONE */
  381. #define GL_DST_COLOR 0x0306
  382. #define GL_ONE_MINUS_DST_COLOR 0x0307
  383. #define GL_SRC_ALPHA_SATURATE 0x0308
  384. /* GL_SRC_ALPHA */
  385. /* GL_ONE_MINUS_SRC_ALPHA */
  386. /* GL_DST_ALPHA */
  387. /* GL_ONE_MINUS_DST_ALPHA */
  388. /* BlendEquationSeparate */
  389. #define GL_FUNC_ADD 0x8006
  390. #define GL_BLEND_EQUATION 0x8009
  391. #define GL_BLEND_EQUATION_RGB 0x8009 /* same as BLEND_EQUATION */
  392. #define GL_BLEND_EQUATION_ALPHA 0x883D
  393. /* BlendSubtract */
  394. #define GL_FUNC_SUBTRACT 0x800A
  395. #define GL_FUNC_REVERSE_SUBTRACT 0x800B
  396. /* Separate Blend Functions */
  397. #define GL_BLEND_DST_RGB 0x80C8
  398. #define GL_BLEND_SRC_RGB 0x80C9
  399. #define GL_BLEND_DST_ALPHA 0x80CA
  400. #define GL_BLEND_SRC_ALPHA 0x80CB
  401. #define GL_CONSTANT_COLOR 0x8001
  402. #define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
  403. #define GL_CONSTANT_ALPHA 0x8003
  404. #define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
  405. #define GL_BLEND_COLOR 0x8005
  406. /* Buffer Objects */
  407. #define GL_ARRAY_BUFFER 0x8892
  408. #define GL_ELEMENT_ARRAY_BUFFER 0x8893
  409. #define GL_ARRAY_BUFFER_BINDING 0x8894
  410. #define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
  411. #define GL_STREAM_DRAW 0x88E0
  412. #define GL_STATIC_DRAW 0x88E4
  413. #define GL_DYNAMIC_DRAW 0x88E8
  414. #define GL_BUFFER_SIZE 0x8764
  415. #define GL_BUFFER_USAGE 0x8765
  416. #define GL_CURRENT_VERTEX_ATTRIB 0x8626
  417. /* CullFaceMode */
  418. #define GL_FRONT 0x0404
  419. #define GL_BACK 0x0405
  420. #define GL_FRONT_AND_BACK 0x0408
  421. /* DepthFunction */
  422. /* GL_NEVER */
  423. /* GL_LESS */
  424. /* GL_EQUAL */
  425. /* GL_LEQUAL */
  426. /* GL_GREATER */
  427. /* GL_NOTEQUAL */
  428. /* GL_GEQUAL */
  429. /* GL_ALWAYS */
  430. /* EnableCap */
  431. #define GL_TEXTURE_2D 0x0DE1
  432. #define GL_CULL_FACE 0x0B44
  433. #define GL_BLEND 0x0BE2
  434. #define GL_DITHER 0x0BD0
  435. #define GL_STENCIL_TEST 0x0B90
  436. #define GL_DEPTH_TEST 0x0B71
  437. #define GL_SCISSOR_TEST 0x0C11
  438. #define GL_POLYGON_OFFSET_FILL 0x8037
  439. #define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
  440. #define GL_SAMPLE_COVERAGE 0x80A0
  441. /* ErrorCode */
  442. #define GL_NO_ERROR 0
  443. #define GL_INVALID_ENUM 0x0500
  444. #define GL_INVALID_VALUE 0x0501
  445. #define GL_INVALID_OPERATION 0x0502
  446. #define GL_OUT_OF_MEMORY 0x0505
  447. /* FrontFaceDirection */
  448. #define GL_CW 0x0900
  449. #define GL_CCW 0x0901
  450. /* GetPName */
  451. #define GL_LINE_WIDTH 0x0B21
  452. #define GL_ALIASED_POINT_SIZE_RANGE 0x846D
  453. #define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
  454. #define GL_CULL_FACE_MODE 0x0B45
  455. #define GL_FRONT_FACE 0x0B46
  456. #define GL_DEPTH_RANGE 0x0B70
  457. #define GL_DEPTH_WRITEMASK 0x0B72
  458. #define GL_DEPTH_CLEAR_VALUE 0x0B73
  459. #define GL_DEPTH_FUNC 0x0B74
  460. #define GL_STENCIL_CLEAR_VALUE 0x0B91
  461. #define GL_STENCIL_FUNC 0x0B92
  462. #define GL_STENCIL_FAIL 0x0B94
  463. #define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
  464. #define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
  465. #define GL_STENCIL_REF 0x0B97
  466. #define GL_STENCIL_VALUE_MASK 0x0B93
  467. #define GL_STENCIL_WRITEMASK 0x0B98
  468. #define GL_STENCIL_BACK_FUNC 0x8800
  469. #define GL_STENCIL_BACK_FAIL 0x8801
  470. #define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
  471. #define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
  472. #define GL_STENCIL_BACK_REF 0x8CA3
  473. #define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
  474. #define GL_STENCIL_BACK_WRITEMASK 0x8CA5
  475. #define GL_VIEWPORT 0x0BA2
  476. #define GL_SCISSOR_BOX 0x0C10
  477. /* GL_SCISSOR_TEST */
  478. #define GL_COLOR_CLEAR_VALUE 0x0C22
  479. #define GL_COLOR_WRITEMASK 0x0C23
  480. #define GL_UNPACK_ALIGNMENT 0x0CF5
  481. #define GL_PACK_ALIGNMENT 0x0D05
  482. #define GL_MAX_TEXTURE_SIZE 0x0D33
  483. #define GL_MAX_VIEWPORT_DIMS 0x0D3A
  484. #define GL_SUBPIXEL_BITS 0x0D50
  485. #define GL_RED_BITS 0x0D52
  486. #define GL_GREEN_BITS 0x0D53
  487. #define GL_BLUE_BITS 0x0D54
  488. #define GL_ALPHA_BITS 0x0D55
  489. #define GL_DEPTH_BITS 0x0D56
  490. #define GL_STENCIL_BITS 0x0D57
  491. #define GL_POLYGON_OFFSET_UNITS 0x2A00
  492. /* GL_POLYGON_OFFSET_FILL */
  493. #define GL_POLYGON_OFFSET_FACTOR 0x8038
  494. #define GL_TEXTURE_BINDING_2D 0x8069
  495. #define GL_SAMPLE_BUFFERS 0x80A8
  496. #define GL_SAMPLES 0x80A9
  497. #define GL_SAMPLE_COVERAGE_VALUE 0x80AA
  498. #define GL_SAMPLE_COVERAGE_INVERT 0x80AB
  499. /* GetTextureParameter */
  500. /* GL_TEXTURE_MAG_FILTER */
  501. /* GL_TEXTURE_MIN_FILTER */
  502. /* GL_TEXTURE_WRAP_S */
  503. /* GL_TEXTURE_WRAP_T */
  504. #define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
  505. #define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
  506. /* HintMode */
  507. #define GL_DONT_CARE 0x1100
  508. #define GL_FASTEST 0x1101
  509. #define GL_NICEST 0x1102
  510. /* HintTarget */
  511. #define GL_GENERATE_MIPMAP_HINT 0x8192
  512. /* DataType */
  513. #define GL_BYTE 0x1400
  514. #define GL_UNSIGNED_BYTE 0x1401
  515. #define GL_SHORT 0x1402
  516. #define GL_UNSIGNED_SHORT 0x1403
  517. #define GL_INT 0x1404
  518. #define GL_UNSIGNED_INT 0x1405
  519. #define GL_FLOAT 0x1406
  520. #define GL_FIXED 0x140C
  521. /* PixelFormat */
  522. #define GL_DEPTH_COMPONENT 0x1902
  523. #define GL_ALPHA 0x1906
  524. #define GL_RGB 0x1907
  525. #define GL_RGBA 0x1908
  526. #define GL_LUMINANCE 0x1909
  527. #define GL_LUMINANCE_ALPHA 0x190A
  528. /* PixelType */
  529. /* GL_UNSIGNED_BYTE */
  530. #define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
  531. #define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
  532. #define GL_UNSIGNED_SHORT_5_6_5 0x8363
  533. /* Shaders */
  534. #define GL_FRAGMENT_SHADER 0x8B30
  535. #define GL_VERTEX_SHADER 0x8B31
  536. #define GL_MAX_VERTEX_ATTRIBS 0x8869
  537. #define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB
  538. #define GL_MAX_VARYING_VECTORS 0x8DFC
  539. #define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
  540. #define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
  541. #define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
  542. #define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD
  543. #define GL_SHADER_TYPE 0x8B4F
  544. #define GL_DELETE_STATUS 0x8B80
  545. #define GL_LINK_STATUS 0x8B82
  546. #define GL_VALIDATE_STATUS 0x8B83
  547. #define GL_ATTACHED_SHADERS 0x8B85
  548. #define GL_ACTIVE_UNIFORMS 0x8B86
  549. #define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
  550. #define GL_ACTIVE_ATTRIBUTES 0x8B89
  551. #define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
  552. #define GL_SHADING_LANGUAGE_VERSION 0x8B8C
  553. #define GL_CURRENT_PROGRAM 0x8B8D
  554. /* StencilFunction */
  555. #define GL_NEVER 0x0200
  556. #define GL_LESS 0x0201
  557. #define GL_EQUAL 0x0202
  558. #define GL_LEQUAL 0x0203
  559. #define GL_GREATER 0x0204
  560. #define GL_NOTEQUAL 0x0205
  561. #define GL_GEQUAL 0x0206
  562. #define GL_ALWAYS 0x0207
  563. /* StencilOp */
  564. /* GL_ZERO */
  565. #define GL_KEEP 0x1E00
  566. #define GL_REPLACE 0x1E01
  567. #define GL_INCR 0x1E02
  568. #define GL_DECR 0x1E03
  569. #define GL_INVERT 0x150A
  570. #define GL_INCR_WRAP 0x8507
  571. #define GL_DECR_WRAP 0x8508
  572. /* StringName */
  573. #define GL_VENDOR 0x1F00
  574. #define GL_RENDERER 0x1F01
  575. #define GL_VERSION 0x1F02
  576. #define GL_EXTENSIONS 0x1F03
  577. /* TextureMagFilter */
  578. #define GL_NEAREST 0x2600
  579. #define GL_LINEAR 0x2601
  580. /* TextureMinFilter */
  581. /* GL_NEAREST */
  582. /* GL_LINEAR */
  583. #define GL_NEAREST_MIPMAP_NEAREST 0x2700
  584. #define GL_LINEAR_MIPMAP_NEAREST 0x2701
  585. #define GL_NEAREST_MIPMAP_LINEAR 0x2702
  586. #define GL_LINEAR_MIPMAP_LINEAR 0x2703
  587. /* TextureParameterName */
  588. #define GL_TEXTURE_MAG_FILTER 0x2800
  589. #define GL_TEXTURE_MIN_FILTER 0x2801
  590. #define GL_TEXTURE_WRAP_S 0x2802
  591. #define GL_TEXTURE_WRAP_T 0x2803
  592. /* TextureTarget */
  593. /* GL_TEXTURE_2D */
  594. #define GL_TEXTURE 0x1702
  595. #define GL_TEXTURE_CUBE_MAP 0x8513
  596. #define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
  597. #define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
  598. #define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
  599. #define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
  600. #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
  601. #define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
  602. #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
  603. #define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
  604. /* TextureUnit */
  605. #define GL_TEXTURE0 0x84C0
  606. #define GL_TEXTURE1 0x84C1
  607. #define GL_TEXTURE2 0x84C2
  608. #define GL_TEXTURE3 0x84C3
  609. #define GL_TEXTURE4 0x84C4
  610. #define GL_TEXTURE5 0x84C5
  611. #define GL_TEXTURE6 0x84C6
  612. #define GL_TEXTURE7 0x84C7
  613. #define GL_TEXTURE8 0x84C8
  614. #define GL_TEXTURE9 0x84C9
  615. #define GL_TEXTURE10 0x84CA
  616. #define GL_TEXTURE11 0x84CB
  617. #define GL_TEXTURE12 0x84CC
  618. #define GL_TEXTURE13 0x84CD
  619. #define GL_TEXTURE14 0x84CE
  620. #define GL_TEXTURE15 0x84CF
  621. #define GL_TEXTURE16 0x84D0
  622. #define GL_TEXTURE17 0x84D1
  623. #define GL_TEXTURE18 0x84D2
  624. #define GL_TEXTURE19 0x84D3
  625. #define GL_TEXTURE20 0x84D4
  626. #define GL_TEXTURE21 0x84D5
  627. #define GL_TEXTURE22 0x84D6
  628. #define GL_TEXTURE23 0x84D7
  629. #define GL_TEXTURE24 0x84D8
  630. #define GL_TEXTURE25 0x84D9
  631. #define GL_TEXTURE26 0x84DA
  632. #define GL_TEXTURE27 0x84DB
  633. #define GL_TEXTURE28 0x84DC
  634. #define GL_TEXTURE29 0x84DD
  635. #define GL_TEXTURE30 0x84DE
  636. #define GL_TEXTURE31 0x84DF
  637. #define GL_ACTIVE_TEXTURE 0x84E0
  638. /* TextureWrapMode */
  639. #define GL_REPEAT 0x2901
  640. #define GL_CLAMP_TO_EDGE 0x812F
  641. #define GL_MIRRORED_REPEAT 0x8370
  642. /* Uniform Types */
  643. #define GL_FLOAT_VEC2 0x8B50
  644. #define GL_FLOAT_VEC3 0x8B51
  645. #define GL_FLOAT_VEC4 0x8B52
  646. #define GL_INT_VEC2 0x8B53
  647. #define GL_INT_VEC3 0x8B54
  648. #define GL_INT_VEC4 0x8B55
  649. #define GL_BOOL 0x8B56
  650. #define GL_BOOL_VEC2 0x8B57
  651. #define GL_BOOL_VEC3 0x8B58
  652. #define GL_BOOL_VEC4 0x8B59
  653. #define GL_FLOAT_MAT2 0x8B5A
  654. #define GL_FLOAT_MAT3 0x8B5B
  655. #define GL_FLOAT_MAT4 0x8B5C
  656. #define GL_SAMPLER_2D 0x8B5E
  657. #define GL_SAMPLER_CUBE 0x8B60
  658. /* Vertex Arrays */
  659. #define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
  660. #define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
  661. #define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
  662. #define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
  663. #define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
  664. #define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
  665. #define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
  666. /* Read Format */
  667. #define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A
  668. #define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
  669. /* Shader Source */
  670. #define GL_COMPILE_STATUS 0x8B81
  671. #define GL_INFO_LOG_LENGTH 0x8B84
  672. #define GL_SHADER_SOURCE_LENGTH 0x8B88
  673. #define GL_SHADER_COMPILER 0x8DFA
  674. /* Shader Binary */
  675. #define GL_SHADER_BINARY_FORMATS 0x8DF8
  676. #define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9
  677. /* Shader Precision-Specified Types */
  678. #define GL_LOW_FLOAT 0x8DF0
  679. #define GL_MEDIUM_FLOAT 0x8DF1
  680. #define GL_HIGH_FLOAT 0x8DF2
  681. #define GL_LOW_INT 0x8DF3
  682. #define GL_MEDIUM_INT 0x8DF4
  683. #define GL_HIGH_INT 0x8DF5
  684. /* Framebuffer Object. */
  685. #define GL_FRAMEBUFFER 0x8D40
  686. #define GL_RENDERBUFFER 0x8D41
  687. #define GL_RGBA4 0x8056
  688. #define GL_RGB5_A1 0x8057
  689. #define GL_RGB565 0x8D62
  690. #define GL_DEPTH_COMPONENT16 0x81A5
  691. #define GL_STENCIL_INDEX8 0x8D48
  692. #define GL_RENDERBUFFER_WIDTH 0x8D42
  693. #define GL_RENDERBUFFER_HEIGHT 0x8D43
  694. #define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44
  695. #define GL_RENDERBUFFER_RED_SIZE 0x8D50
  696. #define GL_RENDERBUFFER_GREEN_SIZE 0x8D51
  697. #define GL_RENDERBUFFER_BLUE_SIZE 0x8D52
  698. #define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53
  699. #define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54
  700. #define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55
  701. #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
  702. #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
  703. #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
  704. #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
  705. #define GL_COLOR_ATTACHMENT0 0x8CE0
  706. #define GL_DEPTH_ATTACHMENT 0x8D00
  707. #define GL_STENCIL_ATTACHMENT 0x8D20
  708. #define GL_NONE 0
  709. #define GL_FRAMEBUFFER_COMPLETE 0x8CD5
  710. #define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
  711. #define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
  712. #define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9
  713. #define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
  714. #define GL_FRAMEBUFFER_BINDING 0x8CA6
  715. #define GL_RENDERBUFFER_BINDING 0x8CA7
  716. #define GL_MAX_RENDERBUFFER_SIZE 0x84E8
  717. #define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506
  718. /*-------------------------------------------------------------------------
  719. * GL core functions.
  720. *-----------------------------------------------------------------------*/
  721. GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture);
  722. GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader);
  723. GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar* name);
  724. GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer);
  725. GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);
  726. GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);
  727. GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture);
  728. GL_APICALL void GL_APIENTRY glBlendColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
  729. GL_APICALL void GL_APIENTRY glBlendEquation ( GLenum mode );
  730. GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
  731. GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
  732. GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
  733. GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage);
  734. GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data);
  735. GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target);
  736. GL_APICALL void GL_APIENTRY glClear (GLbitfield mask);
  737. GL_APICALL void GL_APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
  738. GL_APICALL void GL_APIENTRY glClearDepthf (GLclampf depth);
  739. GL_APICALL void GL_APIENTRY glClearStencil (GLint s);
  740. GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
  741. GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader);
  742. GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data);
  743. GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data);
  744. GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
  745. GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
  746. GL_APICALL GLuint GL_APIENTRY glCreateProgram (void);
  747. GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type);
  748. GL_APICALL void GL_APIENTRY glCullFace (GLenum mode);
  749. GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint* buffers);
  750. GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint* framebuffers);
  751. GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program);
  752. GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint* renderbuffers);
  753. GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader);
  754. GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint* textures);
  755. GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func);
  756. GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag);
  757. GL_APICALL void GL_APIENTRY glDepthRangef (GLclampf zNear, GLclampf zFar);
  758. GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader);
  759. GL_APICALL void GL_APIENTRY glDisable (GLenum cap);
  760. GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index);
  761. GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
  762. GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid* indices);
  763. GL_APICALL void GL_APIENTRY glEnable (GLenum cap);
  764. GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index);
  765. GL_APICALL void GL_APIENTRY glFinish (void);
  766. GL_APICALL void GL_APIENTRY glFlush (void);
  767. GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
  768. GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
  769. GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode);
  770. GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint* buffers);
  771. GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target);
  772. GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint* framebuffers);
  773. GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint* renderbuffers);
  774. GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint* textures);
  775. GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
  776. GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
  777. GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders);
  778. GL_APICALL int GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar* name);
  779. GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean* params);
  780. GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint* params);
  781. GL_APICALL GLenum GL_APIENTRY glGetError (void);
  782. GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat* params);
  783. GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint* params);
  784. GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint* params);
  785. GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint* params);
  786. GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog);
  787. GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint* params);
  788. GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint* params);
  789. GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog);
  790. GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
  791. GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source);
  792. GL_APICALL const GLubyte* GL_APIENTRY glGetString (GLenum name);
  793. GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat* params);
  794. GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint* params);
  795. GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat* params);
  796. GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint* params);
  797. GL_APICALL int GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar* name);
  798. GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat* params);
  799. GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint* params);
  800. GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, GLvoid** pointer);
  801. GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode);
  802. GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer);
  803. GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap);
  804. GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer (GLuint framebuffer);
  805. GL_APICALL GLboolean GL_APIENTRY glIsProgram (GLuint program);
  806. GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer);
  807. GL_APICALL GLboolean GL_APIENTRY glIsShader (GLuint shader);
  808. GL_APICALL GLboolean GL_APIENTRY glIsTexture (GLuint texture);
  809. GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width);
  810. GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program);
  811. GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param);
  812. GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
  813. GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels);
  814. GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void);
  815. GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
  816. GL_APICALL void GL_APIENTRY glSampleCoverage (GLclampf value, GLboolean invert);
  817. GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
  818. GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length);
  819. GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar* const* string, const GLint* length);
  820. GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
  821. GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);
  822. GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask);
  823. GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);
  824. GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
  825. GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
  826. GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
  827. GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
  828. GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat* params);
  829. GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
  830. GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint* params);
  831. GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels);
  832. GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat x);
  833. GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat* v);
  834. GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint x);
  835. GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint* v);
  836. GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat x, GLfloat y);
  837. GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat* v);
  838. GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint x, GLint y);
  839. GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint* v);
  840. GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat x, GLfloat y, GLfloat z);
  841. GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat* v);
  842. GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint x, GLint y, GLint z);
  843. GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint* v);
  844. GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
  845. GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat* v);
  846. GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint x, GLint y, GLint z, GLint w);
  847. GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint* v);
  848. GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
  849. GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
  850. GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
  851. GL_APICALL void GL_APIENTRY glUseProgram (GLuint program);
  852. GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program);
  853. GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint indx, GLfloat x);
  854. GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint indx, const GLfloat* values);
  855. GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint indx, GLfloat x, GLfloat y);
  856. GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint indx, const GLfloat* values);
  857. GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint indx, GLfloat x, GLfloat y, GLfloat z);
  858. GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint indx, const GLfloat* values);
  859. GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
  860. GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint indx, const GLfloat* values);
  861. GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr);
  862. GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
  863. #ifdef __cplusplus
  864. }
  865. #endif
  866. #endif /* __gl2_h_ */
  867. #ifndef __gl2ext_h_
  868. #define __gl2ext_h_
  869. /* $Revision: 19436 $ on $Date:: 2012-10-10 10:37:04 -0700 #$ */
  870. #ifdef __cplusplus
  871. extern "C" {
  872. #endif
  873. /*
  874. * This document is licensed under the SGI Free Software B License Version
  875. * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
  876. */
  877. #ifndef GL_APIENTRYP
  878. # define GL_APIENTRYP GL_APIENTRY*
  879. #endif
  880. /*------------------------------------------------------------------------*
  881. * OES extension tokens
  882. *------------------------------------------------------------------------*/
  883. /* GL_OES_compressed_ETC1_RGB8_texture */
  884. #ifndef GL_OES_compressed_ETC1_RGB8_texture
  885. #define GL_ETC1_RGB8_OES 0x8D64
  886. #endif
  887. /* GL_OES_compressed_paletted_texture */
  888. #ifndef GL_OES_compressed_paletted_texture
  889. #define GL_PALETTE4_RGB8_OES 0x8B90
  890. #define GL_PALETTE4_RGBA8_OES 0x8B91
  891. #define GL_PALETTE4_R5_G6_B5_OES 0x8B92
  892. #define GL_PALETTE4_RGBA4_OES 0x8B93
  893. #define GL_PALETTE4_RGB5_A1_OES 0x8B94
  894. #define GL_PALETTE8_RGB8_OES 0x8B95
  895. #define GL_PALETTE8_RGBA8_OES 0x8B96
  896. #define GL_PALETTE8_R5_G6_B5_OES 0x8B97
  897. #define GL_PALETTE8_RGBA4_OES 0x8B98
  898. #define GL_PALETTE8_RGB5_A1_OES 0x8B99
  899. #endif
  900. /* GL_OES_depth24 */
  901. #ifndef GL_OES_depth24
  902. #define GL_DEPTH_COMPONENT24_OES 0x81A6
  903. #endif
  904. /* GL_OES_depth32 */
  905. #ifndef GL_OES_depth32
  906. #define GL_DEPTH_COMPONENT32_OES 0x81A7
  907. #endif
  908. /* GL_OES_depth_texture */
  909. /* No new tokens introduced by this extension. */
  910. /* GL_OES_EGL_image */
  911. #ifndef GL_OES_EGL_image
  912. typedef void* GLeglImageOES;
  913. #endif
  914. /* GL_OES_EGL_image_external */
  915. #ifndef GL_OES_EGL_image_external
  916. /* GLeglImageOES defined in GL_OES_EGL_image already. */
  917. #define GL_TEXTURE_EXTERNAL_OES 0x8D65
  918. #define GL_SAMPLER_EXTERNAL_OES 0x8D66
  919. #define GL_TEXTURE_BINDING_EXTERNAL_OES 0x8D67
  920. #define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES 0x8D68
  921. #endif
  922. /* GL_OES_element_index_uint */
  923. #ifndef GL_OES_element_index_uint
  924. #define GL_UNSIGNED_INT 0x1405
  925. #endif
  926. /* GL_OES_get_program_binary */
  927. #ifndef GL_OES_get_program_binary
  928. #define GL_PROGRAM_BINARY_LENGTH_OES 0x8741
  929. #define GL_NUM_PROGRAM_BINARY_FORMATS_OES 0x87FE
  930. #define GL_PROGRAM_BINARY_FORMATS_OES 0x87FF
  931. #endif
  932. /* GL_OES_mapbuffer */
  933. #ifndef GL_OES_mapbuffer
  934. #define GL_WRITE_ONLY_OES 0x88B9
  935. #define GL_BUFFER_ACCESS_OES 0x88BB
  936. #define GL_BUFFER_MAPPED_OES 0x88BC
  937. #define GL_BUFFER_MAP_POINTER_OES 0x88BD
  938. #endif
  939. /* GL_OES_packed_depth_stencil */
  940. #ifndef GL_OES_packed_depth_stencil
  941. #define GL_DEPTH_STENCIL_OES 0x84F9
  942. #define GL_UNSIGNED_INT_24_8_OES 0x84FA
  943. #define GL_DEPTH24_STENCIL8_OES 0x88F0
  944. #endif
  945. /* GL_OES_required_internalformat */
  946. #ifndef GL_OES_required_internalformat
  947. #define GL_ALPHA8_OES 0x803C
  948. #define GL_DEPTH_COMPONENT16_OES 0x81A5
  949. /* reuse GL_DEPTH_COMPONENT24_OES */
  950. /* reuse GL_DEPTH24_STENCIL8_OES */
  951. /* reuse GL_DEPTH_COMPONENT32_OES */
  952. #define GL_LUMINANCE4_ALPHA4_OES 0x8043
  953. #define GL_LUMINANCE8_ALPHA8_OES 0x8045
  954. #define GL_LUMINANCE8_OES 0x8040
  955. #define GL_RGBA4_OES 0x8056
  956. #define GL_RGB5_A1_OES 0x8057
  957. #define GL_RGB565_OES 0x8D62
  958. /* reuse GL_RGB8_OES */
  959. /* reuse GL_RGBA8_OES */
  960. /* reuse GL_RGB10_EXT */
  961. /* reuse GL_RGB10_A2_EXT */
  962. #endif
  963. /* GL_OES_rgb8_rgba8 */
  964. #ifndef GL_OES_rgb8_rgba8
  965. #define GL_RGB8_OES 0x8051
  966. #define GL_RGBA8_OES 0x8058
  967. #endif
  968. /* GL_OES_standard_derivatives */
  969. #ifndef GL_OES_standard_derivatives
  970. #define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES 0x8B8B
  971. #endif
  972. /* GL_OES_stencil1 */
  973. #ifndef GL_OES_stencil1
  974. #define GL_STENCIL_INDEX1_OES 0x8D46
  975. #endif
  976. /* GL_OES_stencil4 */
  977. #ifndef GL_OES_stencil4
  978. #define GL_STENCIL_INDEX4_OES 0x8D47
  979. #endif
  980. #ifndef GL_OES_surfaceless_context
  981. #define GL_FRAMEBUFFER_UNDEFINED_OES 0x8219
  982. #endif
  983. /* GL_OES_texture_3D */
  984. #ifndef GL_OES_texture_3D
  985. #define GL_TEXTURE_WRAP_R_OES 0x8072
  986. #define GL_TEXTURE_3D_OES 0x806F
  987. #define GL_TEXTURE_BINDING_3D_OES 0x806A
  988. #define GL_MAX_3D_TEXTURE_SIZE_OES 0x8073
  989. #define GL_SAMPLER_3D_OES 0x8B5F
  990. #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES 0x8CD4
  991. #endif
  992. /* GL_OES_texture_float */
  993. /* No new tokens introduced by this extension. */
  994. /* GL_OES_texture_float_linear */
  995. /* No new tokens introduced by this extension. */
  996. /* GL_OES_texture_half_float */
  997. #ifndef GL_OES_texture_half_float
  998. #define GL_HALF_FLOAT_OES 0x8D61
  999. #endif
  1000. /* GL_OES_texture_half_float_linear */
  1001. /* No new tokens introduced by this extension. */
  1002. /* GL_OES_texture_npot */
  1003. /* No new tokens introduced by this extension. */
  1004. /* GL_OES_vertex_array_object */
  1005. #ifndef GL_OES_vertex_array_object
  1006. #define GL_VERTEX_ARRAY_BINDING_OES 0x85B5
  1007. #endif
  1008. /* GL_OES_vertex_half_float */
  1009. /* GL_HALF_FLOAT_OES defined in GL_OES_texture_half_float already. */
  1010. /* GL_OES_vertex_type_10_10_10_2 */
  1011. #ifndef GL_OES_vertex_type_10_10_10_2
  1012. #define GL_UNSIGNED_INT_10_10_10_2_OES 0x8DF6
  1013. #define GL_INT_10_10_10_2_OES 0x8DF7
  1014. #endif
  1015. /*------------------------------------------------------------------------*
  1016. * KHR extension tokens
  1017. *------------------------------------------------------------------------*/
  1018. #ifndef GL_KHR_debug
  1019. typedef void (GL_APIENTRYP GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam);
  1020. #define GL_DEBUG_OUTPUT_SYNCHRONOUS 0x8242
  1021. #define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243
  1022. #define GL_DEBUG_CALLBACK_FUNCTION 0x8244
  1023. #define GL_DEBUG_CALLBACK_USER_PARAM 0x8245
  1024. #define GL_DEBUG_SOURCE_API 0x8246
  1025. #define GL_DEBUG_SOURCE_WINDOW_SYSTEM 0x8247
  1026. #define GL_DEBUG_SOURCE_SHADER_COMPILER 0x8248
  1027. #define GL_DEBUG_SOURCE_THIRD_PARTY 0x8249
  1028. #define GL_DEBUG_SOURCE_APPLICATION 0x824A
  1029. #define GL_DEBUG_SOURCE_OTHER 0x824B
  1030. #define GL_DEBUG_TYPE_ERROR 0x824C
  1031. #define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR 0x824D
  1032. #define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR 0x824E
  1033. #define GL_DEBUG_TYPE_PORTABILITY 0x824F
  1034. #define GL_DEBUG_TYPE_PERFORMANCE 0x8250
  1035. #define GL_DEBUG_TYPE_OTHER 0x8251
  1036. #define GL_DEBUG_TYPE_MARKER 0x8268
  1037. #define GL_DEBUG_TYPE_PUSH_GROUP 0x8269
  1038. #define GL_DEBUG_TYPE_POP_GROUP 0x826A
  1039. #define GL_DEBUG_SEVERITY_NOTIFICATION 0x826B
  1040. #define GL_MAX_DEBUG_GROUP_STACK_DEPTH 0x826C
  1041. #define GL_DEBUG_GROUP_STACK_DEPTH 0x826D
  1042. #define GL_BUFFER 0x82E0
  1043. #define GL_SHADER 0x82E1
  1044. #define GL_PROGRAM 0x82E2
  1045. #define GL_QUERY 0x82E3
  1046. /* PROGRAM_PIPELINE only in GL */
  1047. #define GL_SAMPLER 0x82E6
  1048. /* DISPLAY_LIST only in GL */
  1049. #define GL_MAX_LABEL_LENGTH 0x82E8
  1050. #define GL_MAX_DEBUG_MESSAGE_LENGTH 0x9143
  1051. #define GL_MAX_DEBUG_LOGGED_MESSAGES 0x9144
  1052. #define GL_DEBUG_LOGGED_MESSAGES 0x9145
  1053. #define GL_DEBUG_SEVERITY_HIGH 0x9146
  1054. #define GL_DEBUG_SEVERITY_MEDIUM 0x9147
  1055. #define GL_DEBUG_SEVERITY_LOW 0x9148
  1056. #define GL_DEBUG_OUTPUT 0x92E0
  1057. #define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002
  1058. #define GL_STACK_OVERFLOW 0x0503
  1059. #define GL_STACK_UNDERFLOW 0x0504
  1060. #endif
  1061. #ifndef GL_KHR_texture_compression_astc_ldr
  1062. #define GL_COMPRESSED_RGBA_ASTC_4x4_KHR 0x93B0
  1063. #define GL_COMPRESSED_RGBA_ASTC_5x4_KHR 0x93B1
  1064. #define GL_COMPRESSED_RGBA_ASTC_5x5_KHR 0x93B2
  1065. #define GL_COMPRESSED_RGBA_ASTC_6x5_KHR 0x93B3
  1066. #define GL_COMPRESSED_RGBA_ASTC_6x6_KHR 0x93B4
  1067. #define GL_COMPRESSED_RGBA_ASTC_8x5_KHR 0x93B5
  1068. #define GL_COMPRESSED_RGBA_ASTC_8x6_KHR 0x93B6
  1069. #define GL_COMPRESSED_RGBA_ASTC_8x8_KHR 0x93B7
  1070. #define GL_COMPRESSED_RGBA_ASTC_10x5_KHR 0x93B8
  1071. #define GL_COMPRESSED_RGBA_ASTC_10x6_KHR 0x93B9
  1072. #define GL_COMPRESSED_RGBA_ASTC_10x8_KHR 0x93BA
  1073. #define GL_COMPRESSED_RGBA_ASTC_10x10_KHR 0x93BB
  1074. #define GL_COMPRESSED_RGBA_ASTC_12x10_KHR 0x93BC
  1075. #define GL_COMPRESSED_RGBA_ASTC_12x12_KHR 0x93BD
  1076. #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR 0x93D0
  1077. #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR 0x93D1
  1078. #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR 0x93D2
  1079. #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR 0x93D3
  1080. #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR 0x93D4
  1081. #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR 0x93D5
  1082. #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR 0x93D6
  1083. #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR 0x93D7
  1084. #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR 0x93D8
  1085. #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR 0x93D9
  1086. #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR 0x93DA
  1087. #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR 0x93DB
  1088. #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR 0x93DC
  1089. #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR 0x93DD
  1090. #endif
  1091. /*------------------------------------------------------------------------*
  1092. * AMD extension tokens
  1093. *------------------------------------------------------------------------*/
  1094. /* GL_AMD_compressed_3DC_texture */
  1095. #ifndef GL_AMD_compressed_3DC_texture
  1096. #define GL_3DC_X_AMD 0x87F9
  1097. #define GL_3DC_XY_AMD 0x87FA
  1098. #endif
  1099. /* GL_AMD_compressed_ATC_texture */
  1100. #ifndef GL_AMD_compressed_ATC_texture
  1101. #define GL_ATC_RGB_AMD 0x8C92
  1102. #define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93
  1103. #define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE
  1104. #endif
  1105. /* GL_AMD_performance_monitor */
  1106. #ifndef GL_AMD_performance_monitor
  1107. #define GL_COUNTER_TYPE_AMD 0x8BC0
  1108. #define GL_COUNTER_RANGE_AMD 0x8BC1
  1109. #define GL_UNSIGNED_INT64_AMD 0x8BC2
  1110. #define GL_PERCENTAGE_AMD 0x8BC3
  1111. #define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4
  1112. #define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5
  1113. #define GL_PERFMON_RESULT_AMD 0x8BC6
  1114. #endif
  1115. /* GL_AMD_program_binary_Z400 */
  1116. #ifndef GL_AMD_program_binary_Z400
  1117. #define GL_Z400_BINARY_AMD 0x8740
  1118. #endif
  1119. /*------------------------------------------------------------------------*
  1120. * ANGLE extension tokens
  1121. *------------------------------------------------------------------------*/
  1122. /* GL_ANGLE_framebuffer_blit */
  1123. #ifndef GL_ANGLE_framebuffer_blit
  1124. #define GL_READ_FRAMEBUFFER_ANGLE 0x8CA8
  1125. #define GL_DRAW_FRAMEBUFFER_ANGLE 0x8CA9
  1126. #define GL_DRAW_FRAMEBUFFER_BINDING_ANGLE 0x8CA6
  1127. #define GL_READ_FRAMEBUFFER_BINDING_ANGLE 0x8CAA
  1128. #endif
  1129. /* GL_ANGLE_framebuffer_multisample */
  1130. #ifndef GL_ANGLE_framebuffer_multisample
  1131. #define GL_RENDERBUFFER_SAMPLES_ANGLE 0x8CAB
  1132. #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE 0x8D56
  1133. #define GL_MAX_SAMPLES_ANGLE 0x8D57
  1134. #endif
  1135. /* GL_ANGLE_instanced_arrays */
  1136. #ifndef GL_ANGLE_instanced_arrays
  1137. #define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE 0x88FE
  1138. #endif
  1139. /* GL_ANGLE_pack_reverse_row_order */
  1140. #ifndef GL_ANGLE_pack_reverse_row_order
  1141. #define GL_PACK_REVERSE_ROW_ORDER_ANGLE 0x93A4
  1142. #endif
  1143. /* GL_ANGLE_texture_compression_dxt3 */
  1144. #ifndef GL_ANGLE_texture_compression_dxt3
  1145. #define GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE 0x83F2
  1146. #endif
  1147. /* GL_ANGLE_texture_compression_dxt5 */
  1148. #ifndef GL_ANGLE_texture_compression_dxt5
  1149. #define GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE 0x83F3
  1150. #endif
  1151. /* GL_ANGLE_texture_usage */
  1152. #ifndef GL_ANGLE_texture_usage
  1153. #define GL_TEXTURE_USAGE_ANGLE 0x93A2
  1154. #define GL_FRAMEBUFFER_ATTACHMENT_ANGLE 0x93A3
  1155. #endif
  1156. /* GL_ANGLE_translated_shader_source */
  1157. #ifndef GL_ANGLE_translated_shader_source
  1158. #define GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE 0x93A0
  1159. #endif
  1160. /*------------------------------------------------------------------------*
  1161. * APPLE extension tokens
  1162. *------------------------------------------------------------------------*/
  1163. /* GL_APPLE_copy_texture_levels */
  1164. /* No new tokens introduced by this extension. */
  1165. /* GL_APPLE_framebuffer_multisample */
  1166. #ifndef GL_APPLE_framebuffer_multisample
  1167. #define GL_RENDERBUFFER_SAMPLES_APPLE 0x8CAB
  1168. #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE 0x8D56
  1169. #define GL_MAX_SAMPLES_APPLE 0x8D57
  1170. #define GL_READ_FRAMEBUFFER_APPLE 0x8CA8
  1171. #define GL_DRAW_FRAMEBUFFER_APPLE 0x8CA9
  1172. #define GL_DRAW_FRAMEBUFFER_BINDING_APPLE 0x8CA6
  1173. #define GL_READ_FRAMEBUFFER_BINDING_APPLE 0x8CAA
  1174. #endif
  1175. /* GL_APPLE_rgb_422 */
  1176. #ifndef GL_APPLE_rgb_422
  1177. #define GL_RGB_422_APPLE 0x8A1F
  1178. #define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA
  1179. #define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB
  1180. #endif
  1181. /* GL_APPLE_sync */
  1182. #ifndef GL_APPLE_sync
  1183. #ifndef __gl3_h_
  1184. /* These types are defined with reference to <inttypes.h>
  1185. * in the Apple extension spec, but here we use the Khronos
  1186. * portable types in khrplatform.h, and assume those types
  1187. * are always defined.
  1188. * If any other extensions using these types are defined,
  1189. * the typedefs must move out of this block and be shared.
  1190. */
  1191. typedef khronos_int64_t GLint64;
  1192. typedef khronos_uint64_t GLuint64;
  1193. typedef struct __GLsync *GLsync;
  1194. #endif
  1195. #define GL_SYNC_OBJECT_APPLE 0x8A53
  1196. #define GL_MAX_SERVER_WAIT_TIMEOUT_APPLE 0x9111
  1197. #define GL_OBJECT_TYPE_APPLE 0x9112
  1198. #define GL_SYNC_CONDITION_APPLE 0x9113
  1199. #define GL_SYNC_STATUS_APPLE 0x9114
  1200. #define GL_SYNC_FLAGS_APPLE 0x9115
  1201. #define GL_SYNC_FENCE_APPLE 0x9116
  1202. #define GL_SYNC_GPU_COMMANDS_COMPLETE_APPLE 0x9117
  1203. #define GL_UNSIGNALED_APPLE 0x9118
  1204. #define GL_SIGNALED_APPLE 0x9119
  1205. #define GL_ALREADY_SIGNALED_APPLE 0x911A
  1206. #define GL_TIMEOUT_EXPIRED_APPLE 0x911B
  1207. #define GL_CONDITION_SATISFIED_APPLE 0x911C
  1208. #define GL_WAIT_FAILED_APPLE 0x911D
  1209. #define GL_SYNC_FLUSH_COMMANDS_BIT_APPLE 0x00000001
  1210. #define GL_TIMEOUT_IGNORED_APPLE 0xFFFFFFFFFFFFFFFFull
  1211. #endif
  1212. /* GL_APPLE_texture_format_BGRA8888 */
  1213. #ifndef GL_APPLE_texture_format_BGRA8888
  1214. #define GL_BGRA_EXT 0x80E1
  1215. #endif
  1216. /* GL_APPLE_texture_max_level */
  1217. #ifndef GL_APPLE_texture_max_level
  1218. #define GL_TEXTURE_MAX_LEVEL_APPLE 0x813D
  1219. #endif
  1220. /*------------------------------------------------------------------------*
  1221. * ARM extension tokens
  1222. *------------------------------------------------------------------------*/
  1223. /* GL_ARM_mali_program_binary */
  1224. #ifndef GL_ARM_mali_program_binary
  1225. #define GL_MALI_PROGRAM_BINARY_ARM 0x8F61
  1226. #endif
  1227. /* GL_ARM_mali_shader_binary */
  1228. #ifndef GL_ARM_mali_shader_binary
  1229. #define GL_MALI_SHADER_BINARY_ARM 0x8F60
  1230. #endif
  1231. /* GL_ARM_rgba8 */
  1232. /* No new tokens introduced by this extension. */
  1233. /*------------------------------------------------------------------------*
  1234. * EXT extension tokens
  1235. *------------------------------------------------------------------------*/
  1236. /* GL_EXT_blend_minmax */
  1237. #ifndef GL_EXT_blend_minmax
  1238. #define GL_MIN_EXT 0x8007
  1239. #define GL_MAX_EXT 0x8008
  1240. #endif
  1241. /* GL_EXT_color_buffer_half_float */
  1242. #ifndef GL_EXT_color_buffer_half_float
  1243. #define GL_RGBA16F_EXT 0x881A
  1244. #define GL_RGB16F_EXT 0x881B
  1245. #define GL_RG16F_EXT 0x822F
  1246. #define GL_R16F_EXT 0x822D
  1247. #define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT 0x8211
  1248. #define GL_UNSIGNED_NORMALIZED_EXT 0x8C17
  1249. #endif
  1250. /* GL_EXT_debug_label */
  1251. #ifndef GL_EXT_debug_label
  1252. #define GL_PROGRAM_PIPELINE_OBJECT_EXT 0x8A4F
  1253. #define GL_PROGRAM_OBJECT_EXT 0x8B40
  1254. #define GL_SHADER_OBJECT_EXT 0x8B48
  1255. #define GL_BUFFER_OBJECT_EXT 0x9151
  1256. #define GL_QUERY_OBJECT_EXT 0x9153
  1257. #define GL_VERTEX_ARRAY_OBJECT_EXT 0x9154
  1258. #endif
  1259. /* GL_EXT_debug_marker */
  1260. /* No new tokens introduced by this extension. */
  1261. /* GL_EXT_discard_framebuffer */
  1262. #ifndef GL_EXT_discard_framebuffer
  1263. #define GL_COLOR_EXT 0x1800
  1264. #define GL_DEPTH_EXT 0x1801
  1265. #define GL_STENCIL_EXT 0x1802
  1266. #endif
  1267. /* GL_EXT_map_buffer_range */
  1268. #ifndef GL_EXT_map_buffer_range
  1269. #define GL_MAP_READ_BIT_EXT 0x0001
  1270. #define GL_MAP_WRITE_BIT_EXT 0x0002
  1271. #define GL_MAP_INVALIDATE_RANGE_BIT_EXT 0x0004
  1272. #define GL_MAP_INVALIDATE_BUFFER_BIT_EXT 0x0008
  1273. #define GL_MAP_FLUSH_EXPLICIT_BIT_EXT 0x0010
  1274. #define GL_MAP_UNSYNCHRONIZED_BIT_EXT 0x0020
  1275. #endif
  1276. /* GL_EXT_multisampled_render_to_texture */
  1277. #ifndef GL_EXT_multisampled_render_to_texture
  1278. #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT 0x8D6C
  1279. /* reuse values from GL_EXT_framebuffer_multisample (desktop extension) */
  1280. #define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB
  1281. #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56
  1282. #define GL_MAX_SAMPLES_EXT 0x8D57
  1283. #endif
  1284. /* GL_EXT_multiview_draw_buffers */
  1285. #ifndef GL_EXT_multiview_draw_buffers
  1286. #define GL_COLOR_ATTACHMENT_EXT 0x90F0
  1287. #define GL_MULTIVIEW_EXT 0x90F1
  1288. #define GL_DRAW_BUFFER_EXT 0x0C01
  1289. #define GL_READ_BUFFER_EXT 0x0C02
  1290. #define GL_MAX_MULTIVIEW_BUFFERS_EXT 0x90F2
  1291. #endif
  1292. /* GL_EXT_multi_draw_arrays */
  1293. /* No new tokens introduced by this extension. */
  1294. /* GL_EXT_occlusion_query_boolean */
  1295. #ifndef GL_EXT_occlusion_query_boolean
  1296. #define GL_ANY_SAMPLES_PASSED_EXT 0x8C2F
  1297. #define GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT 0x8D6A
  1298. #define GL_CURRENT_QUERY_EXT 0x8865
  1299. #define GL_QUERY_RESULT_EXT 0x8866
  1300. #define GL_QUERY_RESULT_AVAILABLE_EXT 0x8867
  1301. #endif
  1302. /* GL_EXT_read_format_bgra */
  1303. #ifndef GL_EXT_read_format_bgra
  1304. #define GL_BGRA_EXT 0x80E1
  1305. #define GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT 0x8365
  1306. #define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT 0x8366
  1307. #endif
  1308. /* GL_EXT_robustness */
  1309. #ifndef GL_EXT_robustness
  1310. /* reuse GL_NO_ERROR */
  1311. #define GL_GUILTY_CONTEXT_RESET_EXT 0x8253
  1312. #define GL_INNOCENT_CONTEXT_RESET_EXT 0x8254
  1313. #define GL_UNKNOWN_CONTEXT_RESET_EXT 0x8255
  1314. #define GL_CONTEXT_ROBUST_ACCESS_EXT 0x90F3
  1315. #define GL_RESET_NOTIFICATION_STRATEGY_EXT 0x8256
  1316. #define GL_LOSE_CONTEXT_ON_RESET_EXT 0x8252
  1317. #define GL_NO_RESET_NOTIFICATION_EXT 0x8261
  1318. #endif
  1319. /* GL_EXT_separate_shader_objects */
  1320. #ifndef GL_EXT_separate_shader_objects
  1321. #define GL_VERTEX_SHADER_BIT_EXT 0x00000001
  1322. #define GL_FRAGMENT_SHADER_BIT_EXT 0x00000002
  1323. #define GL_ALL_SHADER_BITS_EXT 0xFFFFFFFF
  1324. #define GL_PROGRAM_SEPARABLE_EXT 0x8258
  1325. #define GL_ACTIVE_PROGRAM_EXT 0x8259
  1326. #define GL_PROGRAM_PIPELINE_BINDING_EXT 0x825A
  1327. #endif
  1328. /* GL_EXT_shader_framebuffer_fetch */
  1329. #ifndef GL_EXT_shader_framebuffer_fetch
  1330. #define GL_FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT 0x8A52
  1331. #endif
  1332. /* GL_EXT_shader_texture_lod */
  1333. /* No new tokens introduced by this extension. */
  1334. /* GL_EXT_shadow_samplers */
  1335. #ifndef GL_EXT_shadow_samplers
  1336. #define GL_TEXTURE_COMPARE_MODE_EXT 0x884C
  1337. #define GL_TEXTURE_COMPARE_FUNC_EXT 0x884D
  1338. #define GL_COMPARE_REF_TO_TEXTURE_EXT 0x884E
  1339. #define GL_SAMPLER_2D_SHADOW_EXT 0x8B62
  1340. #endif
  1341. /* GL_EXT_sRGB */
  1342. #ifndef GL_EXT_sRGB
  1343. #define GL_SRGB_EXT 0x8C40
  1344. #define GL_SRGB_ALPHA_EXT 0x8C42
  1345. #define GL_SRGB8_ALPHA8_EXT 0x8C43
  1346. #define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT 0x8210
  1347. #endif
  1348. /* GL_EXT_texture_compression_dxt1 */
  1349. #ifndef GL_EXT_texture_compression_dxt1
  1350. #define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
  1351. #define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
  1352. #endif
  1353. /* GL_EXT_texture_filter_anisotropic */
  1354. #ifndef GL_EXT_texture_filter_anisotropic
  1355. #define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
  1356. #define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
  1357. #endif
  1358. /* GL_EXT_texture_format_BGRA8888 */
  1359. #ifndef GL_EXT_texture_format_BGRA8888
  1360. #define GL_BGRA_EXT 0x80E1
  1361. #endif
  1362. /* GL_EXT_texture_rg */
  1363. #ifndef GL_EXT_texture_rg
  1364. #define GL_RED_EXT 0x1903
  1365. #define GL_RG_EXT 0x8227
  1366. #define GL_R8_EXT 0x8229
  1367. #define GL_RG8_EXT 0x822B
  1368. #endif
  1369. /* GL_EXT_texture_storage */
  1370. #ifndef GL_EXT_texture_storage
  1371. #define GL_TEXTURE_IMMUTABLE_FORMAT_EXT 0x912F
  1372. #define GL_ALPHA8_EXT 0x803C
  1373. #define GL_LUMINANCE8_EXT 0x8040
  1374. #define GL_LUMINANCE8_ALPHA8_EXT 0x8045
  1375. #define GL_RGBA32F_EXT 0x8814
  1376. #define GL_RGB32F_EXT 0x8815
  1377. #define GL_ALPHA32F_EXT 0x8816
  1378. #define GL_LUMINANCE32F_EXT 0x8818
  1379. #define GL_LUMINANCE_ALPHA32F_EXT 0x8819
  1380. /* reuse GL_RGBA16F_EXT */
  1381. /* reuse GL_RGB16F_EXT */
  1382. #define GL_ALPHA16F_EXT 0x881C
  1383. #define GL_LUMINANCE16F_EXT 0x881E
  1384. #define GL_LUMINANCE_ALPHA16F_EXT 0x881F
  1385. #define GL_RGB10_A2_EXT 0x8059
  1386. #define GL_RGB10_EXT 0x8052
  1387. #define GL_BGRA8_EXT 0x93A1
  1388. #define GL_R8_EXT 0x8229
  1389. #define GL_RG8_EXT 0x822B
  1390. #define GL_R32F_EXT 0x822E
  1391. #define GL_RG32F_EXT 0x8230
  1392. #define GL_R16F_EXT 0x822D
  1393. #define GL_RG16F_EXT 0x822F
  1394. #endif
  1395. /* GL_EXT_texture_type_2_10_10_10_REV */
  1396. #ifndef GL_EXT_texture_type_2_10_10_10_REV
  1397. #define GL_UNSIGNED_INT_2_10_10_10_REV_EXT 0x8368
  1398. #endif
  1399. /* GL_EXT_unpack_subimage */
  1400. #ifndef GL_EXT_unpack_subimage
  1401. #define GL_UNPACK_ROW_LENGTH 0x0CF2
  1402. #define GL_UNPACK_SKIP_ROWS 0x0CF3
  1403. #define GL_UNPACK_SKIP_PIXELS 0x0CF4
  1404. #endif
  1405. /*------------------------------------------------------------------------*
  1406. * DMP extension tokens
  1407. *------------------------------------------------------------------------*/
  1408. /* GL_DMP_shader_binary */
  1409. #ifndef GL_DMP_shader_binary
  1410. #define GL_SHADER_BINARY_DMP 0x9250
  1411. #endif
  1412. /*------------------------------------------------------------------------*
  1413. * FJ extension tokens
  1414. *------------------------------------------------------------------------*/
  1415. /* GL_FJ_shader_binary_GCCSO */
  1416. #ifndef GL_FJ_shader_binary_GCCSO
  1417. #define GCCSO_SHADER_BINARY_FJ 0x9260
  1418. #endif
  1419. /*------------------------------------------------------------------------*
  1420. * IMG extension tokens
  1421. *------------------------------------------------------------------------*/
  1422. /* GL_IMG_program_binary */
  1423. #ifndef GL_IMG_program_binary
  1424. #define GL_SGX_PROGRAM_BINARY_IMG 0x9130
  1425. #endif
  1426. /* GL_IMG_read_format */
  1427. #ifndef GL_IMG_read_format
  1428. #define GL_BGRA_IMG 0x80E1
  1429. #define GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG 0x8365
  1430. #endif
  1431. /* GL_IMG_shader_binary */
  1432. #ifndef GL_IMG_shader_binary
  1433. #define GL_SGX_BINARY_IMG 0x8C0A
  1434. #endif
  1435. /* GL_IMG_texture_compression_pvrtc */
  1436. #ifndef GL_IMG_texture_compression_pvrtc
  1437. #define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00
  1438. #define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01
  1439. #define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02
  1440. #define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03
  1441. #endif
  1442. /* GL_IMG_multisampled_render_to_texture */
  1443. #ifndef GL_IMG_multisampled_render_to_texture
  1444. #define GL_RENDERBUFFER_SAMPLES_IMG 0x9133
  1445. #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG 0x9134
  1446. #define GL_MAX_SAMPLES_IMG 0x9135
  1447. #define GL_TEXTURE_SAMPLES_IMG 0x9136
  1448. #endif
  1449. /*------------------------------------------------------------------------*
  1450. * NV extension tokens
  1451. *------------------------------------------------------------------------*/
  1452. /* GL_NV_coverage_sample */
  1453. #ifndef GL_NV_coverage_sample
  1454. #define GL_COVERAGE_COMPONENT_NV 0x8ED0
  1455. #define GL_COVERAGE_COMPONENT4_NV 0x8ED1
  1456. #define GL_COVERAGE_ATTACHMENT_NV 0x8ED2
  1457. #define GL_COVERAGE_BUFFERS_NV 0x8ED3
  1458. #define GL_COVERAGE_SAMPLES_NV 0x8ED4
  1459. #define GL_COVERAGE_ALL_FRAGMENTS_NV 0x8ED5
  1460. #define GL_COVERAGE_EDGE_FRAGMENTS_NV 0x8ED6
  1461. #define GL_COVERAGE_AUTOMATIC_NV 0x8ED7
  1462. #define GL_COVERAGE_BUFFER_BIT_NV 0x8000
  1463. #endif
  1464. /* GL_NV_depth_nonlinear */
  1465. #ifndef GL_NV_depth_nonlinear
  1466. #define GL_DEPTH_COMPONENT16_NONLINEAR_NV 0x8E2C
  1467. #endif
  1468. /* GL_NV_draw_buffers */
  1469. #ifndef GL_NV_draw_buffers
  1470. #define GL_MAX_DRAW_BUFFERS_NV 0x8824
  1471. #define GL_DRAW_BUFFER0_NV 0x8825
  1472. #define GL_DRAW_BUFFER1_NV 0x8826
  1473. #define GL_DRAW_BUFFER2_NV 0x8827
  1474. #define GL_DRAW_BUFFER3_NV 0x8828
  1475. #define GL_DRAW_BUFFER4_NV 0x8829
  1476. #define GL_DRAW_BUFFER5_NV 0x882A
  1477. #define GL_DRAW_BUFFER6_NV 0x882B
  1478. #define GL_DRAW_BUFFER7_NV 0x882C
  1479. #define GL_DRAW_BUFFER8_NV 0x882D
  1480. #define GL_DRAW_BUFFER9_NV 0x882E
  1481. #define GL_DRAW_BUFFER10_NV 0x882F
  1482. #define GL_DRAW_BUFFER11_NV 0x8830
  1483. #define GL_DRAW_BUFFER12_NV 0x8831
  1484. #define GL_DRAW_BUFFER13_NV 0x8832
  1485. #define GL_DRAW_BUFFER14_NV 0x8833
  1486. #define GL_DRAW_BUFFER15_NV 0x8834
  1487. #define GL_COLOR_ATTACHMENT0_NV 0x8CE0
  1488. #define GL_COLOR_ATTACHMENT1_NV 0x8CE1
  1489. #define GL_COLOR_ATTACHMENT2_NV 0x8CE2
  1490. #define GL_COLOR_ATTACHMENT3_NV 0x8CE3
  1491. #define GL_COLOR_ATTACHMENT4_NV 0x8CE4
  1492. #define GL_COLOR_ATTACHMENT5_NV 0x8CE5
  1493. #define GL_COLOR_ATTACHMENT6_NV 0x8CE6
  1494. #define GL_COLOR_ATTACHMENT7_NV 0x8CE7
  1495. #define GL_COLOR_ATTACHMENT8_NV 0x8CE8
  1496. #define GL_COLOR_ATTACHMENT9_NV 0x8CE9
  1497. #define GL_COLOR_ATTACHMENT10_NV 0x8CEA
  1498. #define GL_COLOR_ATTACHMENT11_NV 0x8CEB
  1499. #define GL_COLOR_ATTACHMENT12_NV 0x8CEC
  1500. #define GL_COLOR_ATTACHMENT13_NV 0x8CED
  1501. #define GL_COLOR_ATTACHMENT14_NV 0x8CEE
  1502. #define GL_COLOR_ATTACHMENT15_NV 0x8CEF
  1503. #endif
  1504. /* GL_NV_fbo_color_attachments */
  1505. #ifndef GL_NV_fbo_color_attachments
  1506. #define GL_MAX_COLOR_ATTACHMENTS_NV 0x8CDF
  1507. /* GL_COLOR_ATTACHMENT{0-15}_NV defined in GL_NV_draw_buffers already. */
  1508. #endif
  1509. /* GL_NV_fence */
  1510. #ifndef GL_NV_fence
  1511. #define GL_ALL_COMPLETED_NV 0x84F2
  1512. #define GL_FENCE_STATUS_NV 0x84F3
  1513. #define GL_FENCE_CONDITION_NV 0x84F4
  1514. #endif
  1515. /* GL_NV_read_buffer */
  1516. #ifndef GL_NV_read_buffer
  1517. #define GL_READ_BUFFER_NV 0x0C02
  1518. #endif
  1519. /* GL_NV_read_buffer_front */
  1520. /* No new tokens introduced by this extension. */
  1521. /* GL_NV_read_depth */
  1522. /* No new tokens introduced by this extension. */
  1523. /* GL_NV_read_depth_stencil */
  1524. /* No new tokens introduced by this extension. */
  1525. /* GL_NV_read_stencil */
  1526. /* No new tokens introduced by this extension. */
  1527. /* GL_NV_texture_compression_s3tc_update */
  1528. /* No new tokens introduced by this extension. */
  1529. /* GL_NV_texture_npot_2D_mipmap */
  1530. /* No new tokens introduced by this extension. */
  1531. /*------------------------------------------------------------------------*
  1532. * QCOM extension tokens
  1533. *------------------------------------------------------------------------*/
  1534. /* GL_QCOM_alpha_test */
  1535. #ifndef GL_QCOM_alpha_test
  1536. #define GL_ALPHA_TEST_QCOM 0x0BC0
  1537. #define GL_ALPHA_TEST_FUNC_QCOM 0x0BC1
  1538. #define GL_ALPHA_TEST_REF_QCOM 0x0BC2
  1539. #endif
  1540. /* GL_QCOM_binning_control */
  1541. #ifndef GL_QCOM_binning_control
  1542. #define GL_BINNING_CONTROL_HINT_QCOM 0x8FB0
  1543. #define GL_CPU_OPTIMIZED_QCOM 0x8FB1
  1544. #define GL_GPU_OPTIMIZED_QCOM 0x8FB2
  1545. #define GL_RENDER_DIRECT_TO_FRAMEBUFFER_QCOM 0x8FB3
  1546. #endif
  1547. /* GL_QCOM_driver_control */
  1548. /* No new tokens introduced by this extension. */
  1549. /* GL_QCOM_extended_get */
  1550. #ifndef GL_QCOM_extended_get
  1551. #define GL_TEXTURE_WIDTH_QCOM 0x8BD2
  1552. #define GL_TEXTURE_HEIGHT_QCOM 0x8BD3
  1553. #define GL_TEXTURE_DEPTH_QCOM 0x8BD4
  1554. #define GL_TEXTURE_INTERNAL_FORMAT_QCOM 0x8BD5
  1555. #define GL_TEXTURE_FORMAT_QCOM 0x8BD6
  1556. #define GL_TEXTURE_TYPE_QCOM 0x8BD7
  1557. #define GL_TEXTURE_IMAGE_VALID_QCOM 0x8BD8
  1558. #define GL_TEXTURE_NUM_LEVELS_QCOM 0x8BD9
  1559. #define GL_TEXTURE_TARGET_QCOM 0x8BDA
  1560. #define GL_TEXTURE_OBJECT_VALID_QCOM 0x8BDB
  1561. #define GL_STATE_RESTORE 0x8BDC
  1562. #endif
  1563. /* GL_QCOM_extended_get2 */
  1564. /* No new tokens introduced by this extension. */
  1565. /* GL_QCOM_perfmon_global_mode */
  1566. #ifndef GL_QCOM_perfmon_global_mode
  1567. #define GL_PERFMON_GLOBAL_MODE_QCOM 0x8FA0
  1568. #endif
  1569. /* GL_QCOM_writeonly_rendering */
  1570. #ifndef GL_QCOM_writeonly_rendering
  1571. #define GL_WRITEONLY_RENDERING_QCOM 0x8823
  1572. #endif
  1573. /* GL_QCOM_tiled_rendering */
  1574. #ifndef GL_QCOM_tiled_rendering
  1575. #define GL_COLOR_BUFFER_BIT0_QCOM 0x00000001
  1576. #define GL_COLOR_BUFFER_BIT1_QCOM 0x00000002
  1577. #define GL_COLOR_BUFFER_BIT2_QCOM 0x00000004
  1578. #define GL_COLOR_BUFFER_BIT3_QCOM 0x00000008
  1579. #define GL_COLOR_BUFFER_BIT4_QCOM 0x00000010
  1580. #define GL_COLOR_BUFFER_BIT5_QCOM 0x00000020
  1581. #define GL_COLOR_BUFFER_BIT6_QCOM 0x00000040
  1582. #define GL_COLOR_BUFFER_BIT7_QCOM 0x00000080
  1583. #define GL_DEPTH_BUFFER_BIT0_QCOM 0x00000100
  1584. #define GL_DEPTH_BUFFER_BIT1_QCOM 0x00000200
  1585. #define GL_DEPTH_BUFFER_BIT2_QCOM 0x00000400
  1586. #define GL_DEPTH_BUFFER_BIT3_QCOM 0x00000800
  1587. #define GL_DEPTH_BUFFER_BIT4_QCOM 0x00001000
  1588. #define GL_DEPTH_BUFFER_BIT5_QCOM 0x00002000
  1589. #define GL_DEPTH_BUFFER_BIT6_QCOM 0x00004000
  1590. #define GL_DEPTH_BUFFER_BIT7_QCOM 0x00008000
  1591. #define GL_STENCIL_BUFFER_BIT0_QCOM 0x00010000
  1592. #define GL_STENCIL_BUFFER_BIT1_QCOM 0x00020000
  1593. #define GL_STENCIL_BUFFER_BIT2_QCOM 0x00040000
  1594. #define GL_STENCIL_BUFFER_BIT3_QCOM 0x00080000
  1595. #define GL_STENCIL_BUFFER_BIT4_QCOM 0x00100000
  1596. #define GL_STENCIL_BUFFER_BIT5_QCOM 0x00200000
  1597. #define GL_STENCIL_BUFFER_BIT6_QCOM 0x00400000
  1598. #define GL_STENCIL_BUFFER_BIT7_QCOM 0x00800000
  1599. #define GL_MULTISAMPLE_BUFFER_BIT0_QCOM 0x01000000
  1600. #define GL_MULTISAMPLE_BUFFER_BIT1_QCOM 0x02000000
  1601. #define GL_MULTISAMPLE_BUFFER_BIT2_QCOM 0x04000000
  1602. #define GL_MULTISAMPLE_BUFFER_BIT3_QCOM 0x08000000
  1603. #define GL_MULTISAMPLE_BUFFER_BIT4_QCOM 0x10000000
  1604. #define GL_MULTISAMPLE_BUFFER_BIT5_QCOM 0x20000000
  1605. #define GL_MULTISAMPLE_BUFFER_BIT6_QCOM 0x40000000
  1606. #define GL_MULTISAMPLE_BUFFER_BIT7_QCOM 0x80000000
  1607. #endif
  1608. /*------------------------------------------------------------------------*
  1609. * VIV extension tokens
  1610. *------------------------------------------------------------------------*/
  1611. /* GL_VIV_shader_binary */
  1612. #ifndef GL_VIV_shader_binary
  1613. #define GL_SHADER_BINARY_VIV 0x8FC4
  1614. #endif
  1615. /*------------------------------------------------------------------------*
  1616. * End of extension tokens, start of corresponding extension functions
  1617. *------------------------------------------------------------------------*/
  1618. /*------------------------------------------------------------------------*
  1619. * OES extension functions
  1620. *------------------------------------------------------------------------*/
  1621. /* GL_OES_compressed_ETC1_RGB8_texture */
  1622. #ifndef GL_OES_compressed_ETC1_RGB8_texture
  1623. #define GL_OES_compressed_ETC1_RGB8_texture 1
  1624. #endif
  1625. /* GL_OES_compressed_paletted_texture */
  1626. #ifndef GL_OES_compressed_paletted_texture
  1627. #define GL_OES_compressed_paletted_texture 1
  1628. #endif
  1629. /* GL_OES_depth24 */
  1630. #ifndef GL_OES_depth24
  1631. #define GL_OES_depth24 1
  1632. #endif
  1633. /* GL_OES_depth32 */
  1634. #ifndef GL_OES_depth32
  1635. #define GL_OES_depth32 1
  1636. #endif
  1637. /* GL_OES_depth_texture */
  1638. #ifndef GL_OES_depth_texture
  1639. #define GL_OES_depth_texture 1
  1640. #endif
  1641. /* GL_OES_EGL_image */
  1642. #ifndef GL_OES_EGL_image
  1643. #define GL_OES_EGL_image 1
  1644. #ifdef GL_GLEXT_PROTOTYPES
  1645. GL_APICALL void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image);
  1646. GL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image);
  1647. #endif
  1648. typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);
  1649. typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
  1650. #endif
  1651. /* GL_OES_EGL_image_external */
  1652. #ifndef GL_OES_EGL_image_external
  1653. #define GL_OES_EGL_image_external 1
  1654. /* glEGLImageTargetTexture2DOES defined in GL_OES_EGL_image already. */
  1655. #endif
  1656. /* GL_OES_element_index_uint */
  1657. #ifndef GL_OES_element_index_uint
  1658. #define GL_OES_element_index_uint 1
  1659. #endif
  1660. /* GL_OES_fbo_render_mipmap */
  1661. #ifndef GL_OES_fbo_render_mipmap
  1662. #define GL_OES_fbo_render_mipmap 1
  1663. #endif
  1664. /* GL_OES_fragment_precision_high */
  1665. #ifndef GL_OES_fragment_precision_high
  1666. #define GL_OES_fragment_precision_high 1
  1667. #endif
  1668. /* GL_OES_get_program_binary */
  1669. #ifndef GL_OES_get_program_binary
  1670. #define GL_OES_get_program_binary 1
  1671. #ifdef GL_GLEXT_PROTOTYPES
  1672. GL_APICALL void GL_APIENTRY glGetProgramBinaryOES (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);
  1673. GL_APICALL void GL_APIENTRY glProgramBinaryOES (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length);
  1674. #endif
  1675. typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYOESPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);
  1676. typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYOESPROC) (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length);
  1677. #endif
  1678. /* GL_OES_mapbuffer */
  1679. #ifndef GL_OES_mapbuffer
  1680. #define GL_OES_mapbuffer 1
  1681. #ifdef GL_GLEXT_PROTOTYPES
  1682. GL_APICALL void* GL_APIENTRY glMapBufferOES (GLenum target, GLenum access);
  1683. GL_APICALL GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target);
  1684. GL_APICALL void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, GLvoid** params);
  1685. #endif
  1686. typedef void* (GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access);
  1687. typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target);
  1688. typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, GLvoid** params);
  1689. #endif
  1690. /* GL_OES_packed_depth_stencil */
  1691. #ifndef GL_OES_packed_depth_stencil
  1692. #define GL_OES_packed_depth_stencil 1
  1693. #endif
  1694. /* GL_OES_required_internalformat */
  1695. #ifndef GL_OES_required_internalformat
  1696. #define GL_OES_required_internalformat 1
  1697. #endif
  1698. /* GL_OES_rgb8_rgba8 */
  1699. #ifndef GL_OES_rgb8_rgba8
  1700. #define GL_OES_rgb8_rgba8 1
  1701. #endif
  1702. /* GL_OES_standard_derivatives */
  1703. #ifndef GL_OES_standard_derivatives
  1704. #define GL_OES_standard_derivatives 1
  1705. #endif
  1706. /* GL_OES_stencil1 */
  1707. #ifndef GL_OES_stencil1
  1708. #define GL_OES_stencil1 1
  1709. #endif
  1710. /* GL_OES_stencil4 */
  1711. #ifndef GL_OES_stencil4
  1712. #define GL_OES_stencil4 1
  1713. #endif
  1714. #ifndef GL_OES_surfaceless_context
  1715. #define GL_OES_surfaceless_context 1
  1716. #endif
  1717. /* GL_OES_texture_3D */
  1718. #ifndef GL_OES_texture_3D
  1719. #define GL_OES_texture_3D 1
  1720. #ifdef GL_GLEXT_PROTOTYPES
  1721. 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 GLvoid* pixels);
  1722. 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 GLvoid* pixels);
  1723. GL_APICALL void GL_APIENTRY glCopyTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
  1724. GL_APICALL void GL_APIENTRY glCompressedTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data);
  1725. 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 GLvoid* data);
  1726. GL_APICALL void GL_APIENTRY glFramebufferTexture3DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
  1727. #endif
  1728. 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);
  1729. 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 GLvoid* pixels);
  1730. typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
  1731. typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data);
  1732. 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 GLvoid* data);
  1733. typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DOES) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
  1734. #endif
  1735. /* GL_OES_texture_float */
  1736. #ifndef GL_OES_texture_float
  1737. #define GL_OES_texture_float 1
  1738. #endif
  1739. /* GL_OES_texture_float_linear */
  1740. #ifndef GL_OES_texture_float_linear
  1741. #define GL_OES_texture_float_linear 1
  1742. #endif
  1743. /* GL_OES_texture_half_float */
  1744. #ifndef GL_OES_texture_half_float
  1745. #define GL_OES_texture_half_float 1
  1746. #endif
  1747. /* GL_OES_texture_half_float_linear */
  1748. #ifndef GL_OES_texture_half_float_linear
  1749. #define GL_OES_texture_half_float_linear 1
  1750. #endif
  1751. /* GL_OES_texture_npot */
  1752. #ifndef GL_OES_texture_npot
  1753. #define GL_OES_texture_npot 1
  1754. #endif
  1755. /* GL_OES_vertex_array_object */
  1756. #ifndef GL_OES_vertex_array_object
  1757. #define GL_OES_vertex_array_object 1
  1758. #ifdef GL_GLEXT_PROTOTYPES
  1759. GL_APICALL void GL_APIENTRY glBindVertexArrayOES (GLuint array);
  1760. GL_APICALL void GL_APIENTRY glDeleteVertexArraysOES (GLsizei n, const GLuint *arrays);
  1761. GL_APICALL void GL_APIENTRY glGenVertexArraysOES (GLsizei n, GLuint *arrays);
  1762. GL_APICALL GLboolean GL_APIENTRY glIsVertexArrayOES (GLuint array);
  1763. #endif
  1764. typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYOESPROC) (GLuint array);
  1765. typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSOESPROC) (GLsizei n, const GLuint *arrays);
  1766. typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSOESPROC) (GLsizei n, GLuint *arrays);
  1767. typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array);
  1768. #endif
  1769. /* GL_OES_vertex_half_float */
  1770. #ifndef GL_OES_vertex_half_float
  1771. #define GL_OES_vertex_half_float 1
  1772. #endif
  1773. /* GL_OES_vertex_type_10_10_10_2 */
  1774. #ifndef GL_OES_vertex_type_10_10_10_2
  1775. #define GL_OES_vertex_type_10_10_10_2 1
  1776. #endif
  1777. /*------------------------------------------------------------------------*
  1778. * KHR extension functions
  1779. *------------------------------------------------------------------------*/
  1780. #ifndef GL_KHR_debug
  1781. #define GL_KHR_debug 1
  1782. #ifdef GL_GLEXT_PROTOTYPES
  1783. GL_APICALL void GL_APIENTRY glDebugMessageControl (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
  1784. GL_APICALL void GL_APIENTRY glDebugMessageInsert (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
  1785. GL_APICALL void GL_APIENTRY glDebugMessageCallback (GLDEBUGPROC callback, const void *userParam);
  1786. GL_APICALL GLuint GL_APIENTRY glGetDebugMessageLog (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
  1787. GL_APICALL void GL_APIENTRY glPushDebugGroup (GLenum source, GLuint id, GLsizei length, const GLchar *message);
  1788. GL_APICALL void GL_APIENTRY glPopDebugGroup (void);
  1789. GL_APICALL void GL_APIENTRY glObjectLabel (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
  1790. GL_APICALL void GL_APIENTRY glGetObjectLabel (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
  1791. GL_APICALL void GL_APIENTRY glObjectPtrLabel (const void *ptr, GLsizei length, const GLchar *label);
  1792. GL_APICALL void GL_APIENTRY glGetObjectPtrLabel (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
  1793. GL_APICALL void GL_APIENTRY glGetPointerv (GLenum pname, void **params);
  1794. #endif
  1795. typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECONTROLPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
  1796. typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGEINSERTPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
  1797. typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECALLBACKPROC) (GLDEBUGPROC callback, const void *userParam);
  1798. typedef GLuint (GL_APIENTRYP PFNGLGETDEBUGMESSAGELOGPROC) (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
  1799. typedef void (GL_APIENTRYP PFNGLPUSHDEBUGGROUPPROC) (GLenum source, GLuint id, GLsizei length, const GLchar *message);
  1800. typedef void (GL_APIENTRYP PFNGLPOPDEBUGGROUPPROC) (void);
  1801. typedef void (GL_APIENTRYP PFNGLOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
  1802. typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
  1803. typedef void (GL_APIENTRYP PFNGLOBJECTPTRLABELPROC) (const void *ptr, GLsizei length, const GLchar *label);
  1804. typedef void (GL_APIENTRYP PFNGLGETOBJECTPTRLABELPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
  1805. typedef void (GL_APIENTRYP PFNGLGETPOINTERVPROC) (GLenum pname, void **params);
  1806. #endif
  1807. #ifndef GL_KHR_texture_compression_astc_ldr
  1808. #define GL_KHR_texture_compression_astc_ldr 1
  1809. #endif
  1810. /*------------------------------------------------------------------------*
  1811. * AMD extension functions
  1812. *------------------------------------------------------------------------*/
  1813. /* GL_AMD_compressed_3DC_texture */
  1814. #ifndef GL_AMD_compressed_3DC_texture
  1815. #define GL_AMD_compressed_3DC_texture 1
  1816. #endif
  1817. /* GL_AMD_compressed_ATC_texture */
  1818. #ifndef GL_AMD_compressed_ATC_texture
  1819. #define GL_AMD_compressed_ATC_texture 1
  1820. #endif
  1821. /* AMD_performance_monitor */
  1822. #ifndef GL_AMD_performance_monitor
  1823. #define GL_AMD_performance_monitor 1
  1824. #ifdef GL_GLEXT_PROTOTYPES
  1825. GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
  1826. GL_APICALL void GL_APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
  1827. GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
  1828. GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
  1829. GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, GLvoid *data);
  1830. GL_APICALL void GL_APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors);
  1831. GL_APICALL void GL_APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors);
  1832. GL_APICALL void GL_APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList);
  1833. GL_APICALL void GL_APIENTRY glBeginPerfMonitorAMD (GLuint monitor);
  1834. GL_APICALL void GL_APIENTRY glEndPerfMonitorAMD (GLuint monitor);
  1835. GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
  1836. #endif
  1837. typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
  1838. typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
  1839. typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
  1840. typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
  1841. typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, GLvoid *data);
  1842. typedef void (GL_APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
  1843. typedef void (GL_APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
  1844. typedef void (GL_APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList);
  1845. typedef void (GL_APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor);
  1846. typedef void (GL_APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor);
  1847. typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
  1848. #endif
  1849. /* GL_AMD_program_binary_Z400 */
  1850. #ifndef GL_AMD_program_binary_Z400
  1851. #define GL_AMD_program_binary_Z400 1
  1852. #endif
  1853. /*------------------------------------------------------------------------*
  1854. * ANGLE extension functions
  1855. *------------------------------------------------------------------------*/
  1856. /* GL_ANGLE_framebuffer_blit */
  1857. #ifndef GL_ANGLE_framebuffer_blit
  1858. #define GL_ANGLE_framebuffer_blit 1
  1859. #ifdef GL_GLEXT_PROTOTYPES
  1860. GL_APICALL void GL_APIENTRY glBlitFramebufferANGLE (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
  1861. #endif
  1862. typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERANGLEPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
  1863. #endif
  1864. /* GL_ANGLE_framebuffer_multisample */
  1865. #ifndef GL_ANGLE_framebuffer_multisample
  1866. #define GL_ANGLE_framebuffer_multisample 1
  1867. #ifdef GL_GLEXT_PROTOTYPES
  1868. GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleANGLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
  1869. #endif
  1870. typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEANGLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
  1871. #endif
  1872. #ifndef GL_ANGLE_instanced_arrays
  1873. #ifdef GL_GLEXT_PROTOTYPES
  1874. GL_APICALL void GL_APIENTRY glDrawArraysInstancedANGLE (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
  1875. GL_APICALL void GL_APIENTRY glDrawElementsInstancedANGLE (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
  1876. GL_APICALL void GL_APIENTRY glVertexAttribDivisorANGLE (GLuint index, GLuint divisor);
  1877. #endif
  1878. typedef void (GL_APIENTRYP PFLGLDRAWARRAYSINSTANCEDANGLEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
  1879. typedef void (GL_APIENTRYP PFLGLDRAWELEMENTSINSTANCEDANGLEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
  1880. typedef void (GL_APIENTRYP PFLGLVERTEXATTRIBDIVISORANGLEPROC) (GLuint index, GLuint divisor);
  1881. #endif
  1882. /* GL_ANGLE_pack_reverse_row_order */
  1883. #ifndef GL_ANGLE_pack_reverse_row_order
  1884. #define GL_ANGLE_pack_reverse_row_order 1
  1885. #endif
  1886. /* GL_ANGLE_texture_compression_dxt3 */
  1887. #ifndef GL_ANGLE_texture_compression_dxt3
  1888. #define GL_ANGLE_texture_compression_dxt3 1
  1889. #endif
  1890. /* GL_ANGLE_texture_compression_dxt5 */
  1891. #ifndef GL_ANGLE_texture_compression_dxt5
  1892. #define GL_ANGLE_texture_compression_dxt5 1
  1893. #endif
  1894. /* GL_ANGLE_texture_usage */
  1895. #ifndef GL_ANGLE_texture_usage
  1896. #define GL_ANGLE_texture_usage 1
  1897. #endif
  1898. #ifndef GL_ANGLE_translated_shader_source
  1899. #define GL_ANGLE_translated_shader_source 1
  1900. #ifdef GL_GLEXT_PROTOTYPES
  1901. GL_APICALL void GL_APIENTRY glGetTranslatedShaderSourceANGLE (GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source);
  1902. #endif
  1903. typedef void (GL_APIENTRYP PFLGLGETTRANSLATEDSHADERSOURCEANGLEPROC) (GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source);
  1904. #endif
  1905. /*------------------------------------------------------------------------*
  1906. * APPLE extension functions
  1907. *------------------------------------------------------------------------*/
  1908. /* GL_APPLE_copy_texture_levels */
  1909. #ifndef GL_APPLE_copy_texture_levels
  1910. #define GL_APPLE_copy_texture_levels 1
  1911. #ifdef GL_GLEXT_PROTOTYPES
  1912. GL_APICALL void GL_APIENTRY glCopyTextureLevelsAPPLE (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount);
  1913. #endif
  1914. typedef void (GL_APIENTRYP PFNGLCOPYTEXTURELEVELSAPPLEPROC) (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount);
  1915. #endif
  1916. /* GL_APPLE_framebuffer_multisample */
  1917. #ifndef GL_APPLE_framebuffer_multisample
  1918. #define GL_APPLE_framebuffer_multisample 1
  1919. #ifdef GL_GLEXT_PROTOTYPES
  1920. GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleAPPLE (GLenum, GLsizei, GLenum, GLsizei, GLsizei);
  1921. GL_APICALL void GL_APIENTRY glResolveMultisampleFramebufferAPPLE (void);
  1922. #endif /* GL_GLEXT_PROTOTYPES */
  1923. typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEAPPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
  1924. typedef void (GL_APIENTRYP PFNGLRESOLVEMULTISAMPLEFRAMEBUFFERAPPLEPROC) (void);
  1925. #endif
  1926. /* GL_APPLE_rgb_422 */
  1927. #ifndef GL_APPLE_rgb_422
  1928. #define GL_APPLE_rgb_422 1
  1929. #endif
  1930. /* GL_APPLE_sync */
  1931. #ifndef GL_APPLE_sync
  1932. #define GL_APPLE_sync 1
  1933. #ifdef GL_GLEXT_PROTOTYPES
  1934. GL_APICALL GLsync GL_APIENTRY glFenceSyncAPPLE (GLenum condition, GLbitfield flags);
  1935. GL_APICALL GLboolean GL_APIENTRY glIsSyncAPPLE (GLsync sync);
  1936. GL_APICALL void GL_APIENTRY glDeleteSyncAPPLE (GLsync sync);
  1937. GL_APICALL GLenum GL_APIENTRY glClientWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout);
  1938. GL_APICALL void GL_APIENTRY glWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout);
  1939. GL_APICALL void GL_APIENTRY glGetInteger64vAPPLE (GLenum pname, GLint64 *params);
  1940. GL_APICALL void GL_APIENTRY glGetSyncivAPPLE (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
  1941. #endif
  1942. typedef GLsync (GL_APIENTRYP PFNGLFENCESYNCAPPLEPROC) (GLenum condition, GLbitfield flags);
  1943. typedef GLboolean (GL_APIENTRYP PFNGLISSYNCAPPLEPROC) (GLsync sync);
  1944. typedef void (GL_APIENTRYP PFNGLDELETESYNCAPPLEPROC) (GLsync sync);
  1945. typedef GLenum (GL_APIENTRYP PFNGLCLIENTWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
  1946. typedef void (GL_APIENTRYP PFNGLWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
  1947. typedef void (GL_APIENTRYP PFNGLGETINTEGER64VAPPLEPROC) (GLenum pname, GLint64 *params);
  1948. typedef void (GL_APIENTRYP PFNGLGETSYNCIVAPPLEPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
  1949. #endif
  1950. /* GL_APPLE_texture_format_BGRA8888 */
  1951. #ifndef GL_APPLE_texture_format_BGRA8888
  1952. #define GL_APPLE_texture_format_BGRA8888 1
  1953. #endif
  1954. /* GL_APPLE_texture_max_level */
  1955. #ifndef GL_APPLE_texture_max_level
  1956. #define GL_APPLE_texture_max_level 1
  1957. #endif
  1958. /*------------------------------------------------------------------------*
  1959. * ARM extension functions
  1960. *------------------------------------------------------------------------*/
  1961. /* GL_ARM_mali_program_binary */
  1962. #ifndef GL_ARM_mali_program_binary
  1963. #define GL_ARM_mali_program_binary 1
  1964. #endif
  1965. /* GL_ARM_mali_shader_binary */
  1966. #ifndef GL_ARM_mali_shader_binary
  1967. #define GL_ARM_mali_shader_binary 1
  1968. #endif
  1969. /* GL_ARM_rgba8 */
  1970. #ifndef GL_ARM_rgba8
  1971. #define GL_ARM_rgba8 1
  1972. #endif
  1973. /*------------------------------------------------------------------------*
  1974. * EXT extension functions
  1975. *------------------------------------------------------------------------*/
  1976. /* GL_EXT_blend_minmax */
  1977. #ifndef GL_EXT_blend_minmax
  1978. #define GL_EXT_blend_minmax 1
  1979. #endif
  1980. /* GL_EXT_color_buffer_half_float */
  1981. #ifndef GL_EXT_color_buffer_half_float
  1982. #define GL_EXT_color_buffer_half_float 1
  1983. #endif
  1984. /* GL_EXT_debug_label */
  1985. #ifndef GL_EXT_debug_label
  1986. #define GL_EXT_debug_label 1
  1987. #ifdef GL_GLEXT_PROTOTYPES
  1988. GL_APICALL void GL_APIENTRY glLabelObjectEXT (GLenum type, GLuint object, GLsizei length, const GLchar *label);
  1989. GL_APICALL void GL_APIENTRY glGetObjectLabelEXT (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);
  1990. #endif
  1991. typedef void (GL_APIENTRYP PFNGLLABELOBJECTEXTPROC) (GLenum type, GLuint object, GLsizei length, const GLchar *label);
  1992. typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELEXTPROC) (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);
  1993. #endif
  1994. /* GL_EXT_debug_marker */
  1995. #ifndef GL_EXT_debug_marker
  1996. #define GL_EXT_debug_marker 1
  1997. #ifdef GL_GLEXT_PROTOTYPES
  1998. GL_APICALL void GL_APIENTRY glInsertEventMarkerEXT (GLsizei length, const GLchar *marker);
  1999. GL_APICALL void GL_APIENTRY glPushGroupMarkerEXT (GLsizei length, const GLchar *marker);
  2000. GL_APICALL void GL_APIENTRY glPopGroupMarkerEXT (void);
  2001. #endif
  2002. typedef void (GL_APIENTRYP PFNGLINSERTEVENTMARKEREXTPROC) (GLsizei length, const GLchar *marker);
  2003. typedef void (GL_APIENTRYP PFNGLPUSHGROUPMARKEREXTPROC) (GLsizei length, const GLchar *marker);
  2004. typedef void (GL_APIENTRYP PFNGLPOPGROUPMARKEREXTPROC) (void);
  2005. #endif
  2006. /* GL_EXT_discard_framebuffer */
  2007. #ifndef GL_EXT_discard_framebuffer
  2008. #define GL_EXT_discard_framebuffer 1
  2009. #ifdef GL_GLEXT_PROTOTYPES
  2010. GL_APICALL void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, GLsizei numAttachments, const GLenum *attachments);
  2011. #endif
  2012. typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments);
  2013. #endif
  2014. /* GL_EXT_map_buffer_range */
  2015. #ifndef GL_EXT_map_buffer_range
  2016. #define GL_EXT_map_buffer_range 1
  2017. #ifdef GL_GLEXT_PROTOTYPES
  2018. GL_APICALL void* GL_APIENTRY glMapBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
  2019. GL_APICALL void GL_APIENTRY glFlushMappedBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length);
  2020. #endif
  2021. typedef void* (GL_APIENTRYP PFNGLMAPBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
  2022. typedef void (GL_APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length);
  2023. #endif
  2024. /* GL_EXT_multisampled_render_to_texture */
  2025. #ifndef GL_EXT_multisampled_render_to_texture
  2026. #define GL_EXT_multisampled_render_to_texture 1
  2027. #ifdef GL_GLEXT_PROTOTYPES
  2028. GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleEXT (GLenum, GLsizei, GLenum, GLsizei, GLsizei);
  2029. GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleEXT (GLenum, GLenum, GLenum, GLuint, GLint, GLsizei);
  2030. #endif
  2031. typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
  2032. typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
  2033. #endif
  2034. /* GL_EXT_multiview_draw_buffers */
  2035. #ifndef GL_EXT_multiview_draw_buffers
  2036. #define GL_EXT_multiview_draw_buffers 1
  2037. #ifdef GL_GLEXT_PROTOTYPES
  2038. GL_APICALL void GL_APIENTRY glReadBufferIndexedEXT (GLenum src, GLint index);
  2039. GL_APICALL void GL_APIENTRY glDrawBuffersIndexedEXT (GLint n, const GLenum *location, const GLint *indices);
  2040. GL_APICALL void GL_APIENTRY glGetIntegeri_vEXT (GLenum target, GLuint index, GLint *data);
  2041. #endif
  2042. typedef void (GL_APIENTRYP PFNGLREADBUFFERINDEXEDEXTPROC) (GLenum src, GLint index);
  2043. typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSINDEXEDEXTPROC) (GLint n, const GLenum *location, const GLint *indices);
  2044. typedef void (GL_APIENTRYP PFNGLGETINTEGERI_VEXTPROC) (GLenum target, GLuint index, GLint *data);
  2045. #endif
  2046. #ifndef GL_EXT_multi_draw_arrays
  2047. #define GL_EXT_multi_draw_arrays 1
  2048. #ifdef GL_GLEXT_PROTOTYPES
  2049. GL_APICALL void GL_APIENTRY glMultiDrawArraysEXT (GLenum, GLint *, GLsizei *, GLsizei);
  2050. GL_APICALL void GL_APIENTRY glMultiDrawElementsEXT (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei);
  2051. #endif /* GL_GLEXT_PROTOTYPES */
  2052. typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
  2053. typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
  2054. #endif
  2055. /* GL_EXT_occlusion_query_boolean */
  2056. #ifndef GL_EXT_occlusion_query_boolean
  2057. #define GL_EXT_occlusion_query_boolean 1
  2058. #ifdef GL_GLEXT_PROTOTYPES
  2059. GL_APICALL void GL_APIENTRY glGenQueriesEXT (GLsizei n, GLuint *ids);
  2060. GL_APICALL void GL_APIENTRY glDeleteQueriesEXT (GLsizei n, const GLuint *ids);
  2061. GL_APICALL GLboolean GL_APIENTRY glIsQueryEXT (GLuint id);
  2062. GL_APICALL void GL_APIENTRY glBeginQueryEXT (GLenum target, GLuint id);
  2063. GL_APICALL void GL_APIENTRY glEndQueryEXT (GLenum target);
  2064. GL_APICALL void GL_APIENTRY glGetQueryivEXT (GLenum target, GLenum pname, GLint *params);
  2065. GL_APICALL void GL_APIENTRY glGetQueryObjectuivEXT (GLuint id, GLenum pname, GLuint *params);
  2066. #endif
  2067. typedef void (GL_APIENTRYP PFNGLGENQUERIESEXTPROC) (GLsizei n, GLuint *ids);
  2068. typedef void (GL_APIENTRYP PFNGLDELETEQUERIESEXTPROC) (GLsizei n, const GLuint *ids);
  2069. typedef GLboolean (GL_APIENTRYP PFNGLISQUERYEXTPROC) (GLuint id);
  2070. typedef void (GL_APIENTRYP PFNGLBEGINQUERYEXTPROC) (GLenum target, GLuint id);
  2071. typedef void (GL_APIENTRYP PFNGLENDQUERYEXTPROC) (GLenum target);
  2072. typedef void (GL_APIENTRYP PFNGLGETQUERYIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
  2073. typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUIVEXTPROC) (GLuint id, GLenum pname, GLuint *params);
  2074. #endif
  2075. /* GL_EXT_read_format_bgra */
  2076. #ifndef GL_EXT_read_format_bgra
  2077. #define GL_EXT_read_format_bgra 1
  2078. #endif
  2079. /* GL_EXT_robustness */
  2080. #ifndef GL_EXT_robustness
  2081. #define GL_EXT_robustness 1
  2082. #ifdef GL_GLEXT_PROTOTYPES
  2083. GL_APICALL GLenum GL_APIENTRY glGetGraphicsResetStatusEXT (void);
  2084. GL_APICALL void GL_APIENTRY glReadnPixelsEXT (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
  2085. GL_APICALL void GL_APIENTRY glGetnUniformfvEXT (GLuint program, GLint location, GLsizei bufSize, float *params);
  2086. GL_APICALL void GL_APIENTRY glGetnUniformivEXT (GLuint program, GLint location, GLsizei bufSize, GLint *params);
  2087. #endif
  2088. typedef GLenum (GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSEXTPROC) (void);
  2089. typedef void (GL_APIENTRYP PFNGLREADNPIXELSEXTPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
  2090. typedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, float *params);
  2091. typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params);
  2092. #endif
  2093. /* GL_EXT_separate_shader_objects */
  2094. #ifndef GL_EXT_separate_shader_objects
  2095. #define GL_EXT_separate_shader_objects 1
  2096. #ifdef GL_GLEXT_PROTOTYPES
  2097. GL_APICALL void GL_APIENTRY glUseProgramStagesEXT (GLuint pipeline, GLbitfield stages, GLuint program);
  2098. GL_APICALL void GL_APIENTRY glActiveShaderProgramEXT (GLuint pipeline, GLuint program);
  2099. GL_APICALL GLuint GL_APIENTRY glCreateShaderProgramvEXT (GLenum type, GLsizei count, const GLchar **strings);
  2100. GL_APICALL void GL_APIENTRY glBindProgramPipelineEXT (GLuint pipeline);
  2101. GL_APICALL void GL_APIENTRY glDeleteProgramPipelinesEXT (GLsizei n, const GLuint *pipelines);
  2102. GL_APICALL void GL_APIENTRY glGenProgramPipelinesEXT (GLsizei n, GLuint *pipelines);
  2103. GL_APICALL GLboolean GL_APIENTRY glIsProgramPipelineEXT (GLuint pipeline);
  2104. GL_APICALL void GL_APIENTRY glProgramParameteriEXT (GLuint program, GLenum pname, GLint value);
  2105. GL_APICALL void GL_APIENTRY glGetProgramPipelineivEXT (GLuint pipeline, GLenum pname, GLint *params);
  2106. GL_APICALL void GL_APIENTRY glProgramUniform1iEXT (GLuint program, GLint location, GLint x);
  2107. GL_APICALL void GL_APIENTRY glProgramUniform2iEXT (GLuint program, GLint location, GLint x, GLint y);
  2108. GL_APICALL void GL_APIENTRY glProgramUniform3iEXT (GLuint program, GLint location, GLint x, GLint y, GLint z);
  2109. GL_APICALL void GL_APIENTRY glProgramUniform4iEXT (GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w);
  2110. GL_APICALL void GL_APIENTRY glProgramUniform1fEXT (GLuint program, GLint location, GLfloat x);
  2111. GL_APICALL void GL_APIENTRY glProgramUniform2fEXT (GLuint program, GLint location, GLfloat x, GLfloat y);
  2112. GL_APICALL void GL_APIENTRY glProgramUniform3fEXT (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z);
  2113. GL_APICALL void GL_APIENTRY glProgramUniform4fEXT (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
  2114. GL_APICALL void GL_APIENTRY glProgramUniform1ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
  2115. GL_APICALL void GL_APIENTRY glProgramUniform2ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
  2116. GL_APICALL void GL_APIENTRY glProgramUniform3ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
  2117. GL_APICALL void GL_APIENTRY glProgramUniform4ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
  2118. GL_APICALL void GL_APIENTRY glProgramUniform1fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
  2119. GL_APICALL void GL_APIENTRY glProgramUniform2fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
  2120. GL_APICALL void GL_APIENTRY glProgramUniform3fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
  2121. GL_APICALL void GL_APIENTRY glProgramUniform4fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
  2122. GL_APICALL void GL_APIENTRY glProgramUniformMatrix2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
  2123. GL_APICALL void GL_APIENTRY glProgramUniformMatrix3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
  2124. GL_APICALL void GL_APIENTRY glProgramUniformMatrix4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
  2125. GL_APICALL void GL_APIENTRY glValidateProgramPipelineEXT (GLuint pipeline);
  2126. GL_APICALL void GL_APIENTRY glGetProgramPipelineInfoLogEXT (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
  2127. #endif
  2128. typedef void (GL_APIENTRYP PFNGLUSEPROGRAMSTAGESEXTPROC) (GLuint pipeline, GLbitfield stages, GLuint program);
  2129. typedef void (GL_APIENTRYP PFNGLACTIVESHADERPROGRAMEXTPROC) (GLuint pipeline, GLuint program);
  2130. typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROGRAMVEXTPROC) (GLenum type, GLsizei count, const GLchar **strings);
  2131. typedef void (GL_APIENTRYP PFNGLBINDPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
  2132. typedef void (GL_APIENTRYP PFNGLDELETEPROGRAMPIPELINESEXTPROC) (GLsizei n, const GLuint *pipelines);
  2133. typedef void (GL_APIENTRYP PFNGLGENPROGRAMPIPELINESEXTPROC) (GLsizei n, GLuint *pipelines);
  2134. typedef GLboolean (GL_APIENTRYP PFNGLISPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
  2135. typedef void (GL_APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value);
  2136. typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEIVEXTPROC) (GLuint pipeline, GLenum pname, GLint *params);
  2137. typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint x);
  2138. typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint x, GLint y);
  2139. typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint x, GLint y, GLint z);
  2140. typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w);
  2141. typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat x);
  2142. typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y);
  2143. typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z);
  2144. typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
  2145. typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
  2146. typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
  2147. typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
  2148. typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
  2149. typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
  2150. typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
  2151. typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
  2152. typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
  2153. typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
  2154. typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
  2155. typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
  2156. typedef void (GL_APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
  2157. typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGEXTPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
  2158. #endif
  2159. /* GL_EXT_shader_framebuffer_fetch */
  2160. #ifndef GL_EXT_shader_framebuffer_fetch
  2161. #define GL_EXT_shader_framebuffer_fetch 1
  2162. #endif
  2163. /* GL_EXT_shader_texture_lod */
  2164. #ifndef GL_EXT_shader_texture_lod
  2165. #define GL_EXT_shader_texture_lod 1
  2166. #endif
  2167. /* GL_EXT_shadow_samplers */
  2168. #ifndef GL_EXT_shadow_samplers
  2169. #define GL_EXT_shadow_samplers 1
  2170. #endif
  2171. /* GL_EXT_sRGB */
  2172. #ifndef GL_EXT_sRGB
  2173. #define GL_EXT_sRGB 1
  2174. #endif
  2175. /* GL_EXT_texture_compression_dxt1 */
  2176. #ifndef GL_EXT_texture_compression_dxt1
  2177. #define GL_EXT_texture_compression_dxt1 1
  2178. #endif
  2179. /* GL_EXT_texture_filter_anisotropic */
  2180. #ifndef GL_EXT_texture_filter_anisotropic
  2181. #define GL_EXT_texture_filter_anisotropic 1
  2182. #endif
  2183. /* GL_EXT_texture_format_BGRA8888 */
  2184. #ifndef GL_EXT_texture_format_BGRA8888
  2185. #define GL_EXT_texture_format_BGRA8888 1
  2186. #endif
  2187. /* GL_EXT_texture_rg */
  2188. #ifndef GL_EXT_texture_rg
  2189. #define GL_EXT_texture_rg 1
  2190. #endif
  2191. /* GL_EXT_texture_storage */
  2192. #ifndef GL_EXT_texture_storage
  2193. #define GL_EXT_texture_storage 1
  2194. #ifdef GL_GLEXT_PROTOTYPES
  2195. GL_APICALL void GL_APIENTRY glTexStorage1DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
  2196. GL_APICALL void GL_APIENTRY glTexStorage2DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
  2197. GL_APICALL void GL_APIENTRY glTexStorage3DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
  2198. GL_APICALL void GL_APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
  2199. GL_APICALL void GL_APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
  2200. GL_APICALL void GL_APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
  2201. #endif
  2202. typedef void (GL_APIENTRYP PFNGLTEXSTORAGE1DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
  2203. typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
  2204. typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
  2205. typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
  2206. typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
  2207. typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
  2208. #endif
  2209. /* GL_EXT_texture_type_2_10_10_10_REV */
  2210. #ifndef GL_EXT_texture_type_2_10_10_10_REV
  2211. #define GL_EXT_texture_type_2_10_10_10_REV 1
  2212. #endif
  2213. /* GL_EXT_unpack_subimage */
  2214. #ifndef GL_EXT_unpack_subimage
  2215. #define GL_EXT_unpack_subimage 1
  2216. #endif
  2217. /*------------------------------------------------------------------------*
  2218. * DMP extension functions
  2219. *------------------------------------------------------------------------*/
  2220. /* GL_DMP_shader_binary */
  2221. #ifndef GL_DMP_shader_binary
  2222. #define GL_DMP_shader_binary 1
  2223. #endif
  2224. /*------------------------------------------------------------------------*
  2225. * FJ extension functions
  2226. *------------------------------------------------------------------------*/
  2227. /* GL_FJ_shader_binary_GCCSO */
  2228. #ifndef GL_FJ_shader_binary_GCCSO
  2229. #define GL_FJ_shader_binary_GCCSO 1
  2230. #endif
  2231. /*------------------------------------------------------------------------*
  2232. * IMG extension functions
  2233. *------------------------------------------------------------------------*/
  2234. /* GL_IMG_program_binary */
  2235. #ifndef GL_IMG_program_binary
  2236. #define GL_IMG_program_binary 1
  2237. #endif
  2238. /* GL_IMG_read_format */
  2239. #ifndef GL_IMG_read_format
  2240. #define GL_IMG_read_format 1
  2241. #endif
  2242. /* GL_IMG_shader_binary */
  2243. #ifndef GL_IMG_shader_binary
  2244. #define GL_IMG_shader_binary 1
  2245. #endif
  2246. /* GL_IMG_texture_compression_pvrtc */
  2247. #ifndef GL_IMG_texture_compression_pvrtc
  2248. #define GL_IMG_texture_compression_pvrtc 1
  2249. #endif
  2250. /* GL_IMG_multisampled_render_to_texture */
  2251. #ifndef GL_IMG_multisampled_render_to_texture
  2252. #define GL_IMG_multisampled_render_to_texture 1
  2253. #ifdef GL_GLEXT_PROTOTYPES
  2254. GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleIMG (GLenum, GLsizei, GLenum, GLsizei, GLsizei);
  2255. GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleIMG (GLenum, GLenum, GLenum, GLuint, GLint, GLsizei);
  2256. #endif
  2257. typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMGPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
  2258. typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMGPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
  2259. #endif
  2260. /*------------------------------------------------------------------------*
  2261. * NV extension functions
  2262. *------------------------------------------------------------------------*/
  2263. /* GL_NV_coverage_sample */
  2264. #ifndef GL_NV_coverage_sample
  2265. #define GL_NV_coverage_sample 1
  2266. #ifdef GL_GLEXT_PROTOTYPES
  2267. GL_APICALL void GL_APIENTRY glCoverageMaskNV (GLboolean mask);
  2268. GL_APICALL void GL_APIENTRY glCoverageOperationNV (GLenum operation);
  2269. #endif
  2270. typedef void (GL_APIENTRYP PFNGLCOVERAGEMASKNVPROC) (GLboolean mask);
  2271. typedef void (GL_APIENTRYP PFNGLCOVERAGEOPERATIONNVPROC) (GLenum operation);
  2272. #endif
  2273. /* GL_NV_depth_nonlinear */
  2274. #ifndef GL_NV_depth_nonlinear
  2275. #define GL_NV_depth_nonlinear 1
  2276. #endif
  2277. /* GL_NV_draw_buffers */
  2278. #ifndef GL_NV_draw_buffers
  2279. #define GL_NV_draw_buffers 1
  2280. #ifdef GL_GLEXT_PROTOTYPES
  2281. GL_APICALL void GL_APIENTRY glDrawBuffersNV (GLsizei n, const GLenum *bufs);
  2282. #endif
  2283. typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSNVPROC) (GLsizei n, const GLenum *bufs);
  2284. #endif
  2285. /* GL_NV_fbo_color_attachments */
  2286. #ifndef GL_NV_fbo_color_attachments
  2287. #define GL_NV_fbo_color_attachments 1
  2288. #endif
  2289. /* GL_NV_fence */
  2290. #ifndef GL_NV_fence
  2291. #define GL_NV_fence 1
  2292. #ifdef GL_GLEXT_PROTOTYPES
  2293. GL_APICALL void GL_APIENTRY glDeleteFencesNV (GLsizei, const GLuint *);
  2294. GL_APICALL void GL_APIENTRY glGenFencesNV (GLsizei, GLuint *);
  2295. GL_APICALL GLboolean GL_APIENTRY glIsFenceNV (GLuint);
  2296. GL_APICALL GLboolean GL_APIENTRY glTestFenceNV (GLuint);
  2297. GL_APICALL void GL_APIENTRY glGetFenceivNV (GLuint, GLenum, GLint *);
  2298. GL_APICALL void GL_APIENTRY glFinishFenceNV (GLuint);
  2299. GL_APICALL void GL_APIENTRY glSetFenceNV (GLuint, GLenum);
  2300. #endif
  2301. typedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);
  2302. typedef void (GL_APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);
  2303. typedef GLboolean (GL_APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);
  2304. typedef GLboolean (GL_APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence);
  2305. typedef void (GL_APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);
  2306. typedef void (GL_APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);
  2307. typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
  2308. #endif
  2309. /* GL_NV_read_buffer */
  2310. #ifndef GL_NV_read_buffer
  2311. #define GL_NV_read_buffer 1
  2312. #ifdef GL_GLEXT_PROTOTYPES
  2313. GL_APICALL void GL_APIENTRY glReadBufferNV (GLenum mode);
  2314. #endif
  2315. typedef void (GL_APIENTRYP PFNGLREADBUFFERNVPROC) (GLenum mode);
  2316. #endif
  2317. /* GL_NV_read_buffer_front */
  2318. #ifndef GL_NV_read_buffer_front
  2319. #define GL_NV_read_buffer_front 1
  2320. #endif
  2321. /* GL_NV_read_depth */
  2322. #ifndef GL_NV_read_depth
  2323. #define GL_NV_read_depth 1
  2324. #endif
  2325. /* GL_NV_read_depth_stencil */
  2326. #ifndef GL_NV_read_depth_stencil
  2327. #define GL_NV_read_depth_stencil 1
  2328. #endif
  2329. /* GL_NV_read_stencil */
  2330. #ifndef GL_NV_read_stencil
  2331. #define GL_NV_read_stencil 1
  2332. #endif
  2333. /* GL_NV_texture_compression_s3tc_update */
  2334. #ifndef GL_NV_texture_compression_s3tc_update
  2335. #define GL_NV_texture_compression_s3tc_update 1
  2336. #endif
  2337. /* GL_NV_texture_npot_2D_mipmap */
  2338. #ifndef GL_NV_texture_npot_2D_mipmap
  2339. #define GL_NV_texture_npot_2D_mipmap 1
  2340. #endif
  2341. /*------------------------------------------------------------------------*
  2342. * QCOM extension functions
  2343. *------------------------------------------------------------------------*/
  2344. /* GL_QCOM_alpha_test */
  2345. #ifndef GL_QCOM_alpha_test
  2346. #define GL_QCOM_alpha_test 1
  2347. #ifdef GL_GLEXT_PROTOTYPES
  2348. GL_APICALL void GL_APIENTRY glAlphaFuncQCOM (GLenum func, GLclampf ref);
  2349. #endif
  2350. typedef void (GL_APIENTRYP PFNGLALPHAFUNCQCOMPROC) (GLenum func, GLclampf ref);
  2351. #endif
  2352. /* GL_QCOM_binning_control */
  2353. #ifndef GL_QCOM_binning_control
  2354. #define GL_QCOM_binning_control 1
  2355. #endif
  2356. /* GL_QCOM_driver_control */
  2357. #ifndef GL_QCOM_driver_control
  2358. #define GL_QCOM_driver_control 1
  2359. #ifdef GL_GLEXT_PROTOTYPES
  2360. GL_APICALL void GL_APIENTRY glGetDriverControlsQCOM (GLint *num, GLsizei size, GLuint *driverControls);
  2361. GL_APICALL void GL_APIENTRY glGetDriverControlStringQCOM (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
  2362. GL_APICALL void GL_APIENTRY glEnableDriverControlQCOM (GLuint driverControl);
  2363. GL_APICALL void GL_APIENTRY glDisableDriverControlQCOM (GLuint driverControl);
  2364. #endif
  2365. typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC) (GLint *num, GLsizei size, GLuint *driverControls);
  2366. typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
  2367. typedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
  2368. typedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
  2369. #endif
  2370. /* GL_QCOM_extended_get */
  2371. #ifndef GL_QCOM_extended_get
  2372. #define GL_QCOM_extended_get 1
  2373. #ifdef GL_GLEXT_PROTOTYPES
  2374. GL_APICALL void GL_APIENTRY glExtGetTexturesQCOM (GLuint *textures, GLint maxTextures, GLint *numTextures);
  2375. GL_APICALL void GL_APIENTRY glExtGetBuffersQCOM (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
  2376. GL_APICALL void GL_APIENTRY glExtGetRenderbuffersQCOM (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
  2377. GL_APICALL void GL_APIENTRY glExtGetFramebuffersQCOM (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
  2378. GL_APICALL void GL_APIENTRY glExtGetTexLevelParameterivQCOM (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
  2379. GL_APICALL void GL_APIENTRY glExtTexObjectStateOverrideiQCOM (GLenum target, GLenum pname, GLint param);
  2380. 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, GLvoid *texels);
  2381. GL_APICALL void GL_APIENTRY glExtGetBufferPointervQCOM (GLenum target, GLvoid **params);
  2382. #endif
  2383. typedef void (GL_APIENTRYP PFNGLEXTGETTEXTURESQCOMPROC) (GLuint *textures, GLint maxTextures, GLint *numTextures);
  2384. typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERSQCOMPROC) (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
  2385. typedef void (GL_APIENTRYP PFNGLEXTGETRENDERBUFFERSQCOMPROC) (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
  2386. typedef void (GL_APIENTRYP PFNGLEXTGETFRAMEBUFFERSQCOMPROC) (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
  2387. typedef void (GL_APIENTRYP PFNGLEXTGETTEXLEVELPARAMETERIVQCOMPROC) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
  2388. typedef void (GL_APIENTRYP PFNGLEXTTEXOBJECTSTATEOVERRIDEIQCOMPROC) (GLenum target, GLenum pname, GLint param);
  2389. 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, GLvoid *texels);
  2390. typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERPOINTERVQCOMPROC) (GLenum target, GLvoid **params);
  2391. #endif
  2392. /* GL_QCOM_extended_get2 */
  2393. #ifndef GL_QCOM_extended_get2
  2394. #define GL_QCOM_extended_get2 1
  2395. #ifdef GL_GLEXT_PROTOTYPES
  2396. GL_APICALL void GL_APIENTRY glExtGetShadersQCOM (GLuint *shaders, GLint maxShaders, GLint *numShaders);
  2397. GL_APICALL void GL_APIENTRY glExtGetProgramsQCOM (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
  2398. GL_APICALL GLboolean GL_APIENTRY glExtIsProgramBinaryQCOM (GLuint program);
  2399. GL_APICALL void GL_APIENTRY glExtGetProgramBinarySourceQCOM (GLuint program, GLenum shadertype, GLchar *source, GLint *length);
  2400. #endif
  2401. typedef void (GL_APIENTRYP PFNGLEXTGETSHADERSQCOMPROC) (GLuint *shaders, GLint maxShaders, GLint *numShaders);
  2402. typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMSQCOMPROC) (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
  2403. typedef GLboolean (GL_APIENTRYP PFNGLEXTISPROGRAMBINARYQCOMPROC) (GLuint program);
  2404. typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC) (GLuint program, GLenum shadertype, GLchar *source, GLint *length);
  2405. #endif
  2406. /* GL_QCOM_perfmon_global_mode */
  2407. #ifndef GL_QCOM_perfmon_global_mode
  2408. #define GL_QCOM_perfmon_global_mode 1
  2409. #endif
  2410. /* GL_QCOM_writeonly_rendering */
  2411. #ifndef GL_QCOM_writeonly_rendering
  2412. #define GL_QCOM_writeonly_rendering 1
  2413. #endif
  2414. /* GL_QCOM_tiled_rendering */
  2415. #ifndef GL_QCOM_tiled_rendering
  2416. #define GL_QCOM_tiled_rendering 1
  2417. #ifdef GL_GLEXT_PROTOTYPES
  2418. GL_APICALL void GL_APIENTRY glStartTilingQCOM (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
  2419. GL_APICALL void GL_APIENTRY glEndTilingQCOM (GLbitfield preserveMask);
  2420. #endif
  2421. typedef void (GL_APIENTRYP PFNGLSTARTTILINGQCOMPROC) (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
  2422. typedef void (GL_APIENTRYP PFNGLENDTILINGQCOMPROC) (GLbitfield preserveMask);
  2423. #endif
  2424. /*------------------------------------------------------------------------*
  2425. * VIV extension tokens
  2426. *------------------------------------------------------------------------*/
  2427. /* GL_VIV_shader_binary */
  2428. #ifndef GL_VIV_shader_binary
  2429. #define GL_VIV_shader_binary 1
  2430. #endif
  2431. #ifdef __cplusplus
  2432. }
  2433. #endif
  2434. #endif /* __gl2ext_h_ */
  2435. #endif /* _MSC_VER */
  2436. #ifndef APIENTRY
  2437. #define APIENTRY GL_APIENTRY
  2438. #endif