gl.h 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770
  1. #ifndef __gl_h_
  2. #define __gl_h_
  3. /* $Revision: 10601 $ on $Date:: 2010-03-04 22:15:27 -0800 #$ */
  4. #include <GLES/glplatform.h>
  5. #ifdef __cplusplus
  6. extern "C" {
  7. #endif
  8. /*
  9. * This document is licensed under the SGI Free Software B License Version
  10. * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
  11. */
  12. typedef void GLvoid;
  13. typedef char GLchar;
  14. typedef unsigned int GLenum;
  15. typedef unsigned char GLboolean;
  16. typedef unsigned int GLbitfield;
  17. typedef khronos_int8_t GLbyte;
  18. typedef short GLshort;
  19. typedef int GLint;
  20. typedef int GLsizei;
  21. typedef khronos_uint8_t GLubyte;
  22. typedef unsigned short GLushort;
  23. typedef unsigned int GLuint;
  24. typedef khronos_float_t GLfloat;
  25. typedef khronos_float_t GLclampf;
  26. typedef khronos_int32_t GLfixed;
  27. typedef khronos_int32_t GLclampx;
  28. typedef khronos_intptr_t GLintptr;
  29. typedef khronos_ssize_t GLsizeiptr;
  30. /*************************************************************/
  31. /* OpenGL ES core versions */
  32. #define GL_VERSION_ES_CM_1_0 1
  33. #define GL_VERSION_ES_CL_1_0 1
  34. #define GL_VERSION_ES_CM_1_1 1
  35. #define GL_VERSION_ES_CL_1_1 1
  36. /* ClearBufferMask */
  37. #define GL_DEPTH_BUFFER_BIT 0x00000100
  38. #define GL_STENCIL_BUFFER_BIT 0x00000400
  39. #define GL_COLOR_BUFFER_BIT 0x00004000
  40. /* Boolean */
  41. #define GL_FALSE 0
  42. #define GL_TRUE 1
  43. /* BeginMode */
  44. #define GL_POINTS 0x0000
  45. #define GL_LINES 0x0001
  46. #define GL_LINE_LOOP 0x0002
  47. #define GL_LINE_STRIP 0x0003
  48. #define GL_TRIANGLES 0x0004
  49. #define GL_TRIANGLE_STRIP 0x0005
  50. #define GL_TRIANGLE_FAN 0x0006
  51. /* AlphaFunction */
  52. #define GL_NEVER 0x0200
  53. #define GL_LESS 0x0201
  54. #define GL_EQUAL 0x0202
  55. #define GL_LEQUAL 0x0203
  56. #define GL_GREATER 0x0204
  57. #define GL_NOTEQUAL 0x0205
  58. #define GL_GEQUAL 0x0206
  59. #define GL_ALWAYS 0x0207
  60. /* BlendingFactorDest */
  61. #define GL_ZERO 0
  62. #define GL_ONE 1
  63. #define GL_SRC_COLOR 0x0300
  64. #define GL_ONE_MINUS_SRC_COLOR 0x0301
  65. #define GL_SRC_ALPHA 0x0302
  66. #define GL_ONE_MINUS_SRC_ALPHA 0x0303
  67. #define GL_DST_ALPHA 0x0304
  68. #define GL_ONE_MINUS_DST_ALPHA 0x0305
  69. /* BlendingFactorSrc */
  70. /* GL_ZERO */
  71. /* GL_ONE */
  72. #define GL_DST_COLOR 0x0306
  73. #define GL_ONE_MINUS_DST_COLOR 0x0307
  74. #define GL_SRC_ALPHA_SATURATE 0x0308
  75. /* GL_SRC_ALPHA */
  76. /* GL_ONE_MINUS_SRC_ALPHA */
  77. /* GL_DST_ALPHA */
  78. /* GL_ONE_MINUS_DST_ALPHA */
  79. /* ClipPlaneName */
  80. #define GL_CLIP_PLANE0 0x3000
  81. #define GL_CLIP_PLANE1 0x3001
  82. #define GL_CLIP_PLANE2 0x3002
  83. #define GL_CLIP_PLANE3 0x3003
  84. #define GL_CLIP_PLANE4 0x3004
  85. #define GL_CLIP_PLANE5 0x3005
  86. /* ColorMaterialFace */
  87. /* GL_FRONT_AND_BACK */
  88. /* ColorMaterialParameter */
  89. /* GL_AMBIENT_AND_DIFFUSE */
  90. /* ColorPointerType */
  91. /* GL_UNSIGNED_BYTE */
  92. /* GL_FLOAT */
  93. /* GL_FIXED */
  94. /* CullFaceMode */
  95. #define GL_FRONT 0x0404
  96. #define GL_BACK 0x0405
  97. #define GL_FRONT_AND_BACK 0x0408
  98. /* DepthFunction */
  99. /* GL_NEVER */
  100. /* GL_LESS */
  101. /* GL_EQUAL */
  102. /* GL_LEQUAL */
  103. /* GL_GREATER */
  104. /* GL_NOTEQUAL */
  105. /* GL_GEQUAL */
  106. /* GL_ALWAYS */
  107. /* EnableCap */
  108. #define GL_FOG 0x0B60
  109. #define GL_LIGHTING 0x0B50
  110. #define GL_TEXTURE_2D 0x0DE1
  111. #define GL_CULL_FACE 0x0B44
  112. #define GL_ALPHA_TEST 0x0BC0
  113. #define GL_BLEND 0x0BE2
  114. #define GL_COLOR_LOGIC_OP 0x0BF2
  115. #define GL_DITHER 0x0BD0
  116. #define GL_STENCIL_TEST 0x0B90
  117. #define GL_DEPTH_TEST 0x0B71
  118. /* GL_LIGHT0 */
  119. /* GL_LIGHT1 */
  120. /* GL_LIGHT2 */
  121. /* GL_LIGHT3 */
  122. /* GL_LIGHT4 */
  123. /* GL_LIGHT5 */
  124. /* GL_LIGHT6 */
  125. /* GL_LIGHT7 */
  126. #define GL_POINT_SMOOTH 0x0B10
  127. #define GL_LINE_SMOOTH 0x0B20
  128. #define GL_SCISSOR_TEST 0x0C11
  129. #define GL_COLOR_MATERIAL 0x0B57
  130. #define GL_NORMALIZE 0x0BA1
  131. #define GL_RESCALE_NORMAL 0x803A
  132. #define GL_POLYGON_OFFSET_FILL 0x8037
  133. #define GL_VERTEX_ARRAY 0x8074
  134. #define GL_NORMAL_ARRAY 0x8075
  135. #define GL_COLOR_ARRAY 0x8076
  136. #define GL_TEXTURE_COORD_ARRAY 0x8078
  137. #define GL_MULTISAMPLE 0x809D
  138. #define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
  139. #define GL_SAMPLE_ALPHA_TO_ONE 0x809F
  140. #define GL_SAMPLE_COVERAGE 0x80A0
  141. /* ErrorCode */
  142. #define GL_NO_ERROR 0
  143. #define GL_INVALID_ENUM 0x0500
  144. #define GL_INVALID_VALUE 0x0501
  145. #define GL_INVALID_OPERATION 0x0502
  146. #define GL_STACK_OVERFLOW 0x0503
  147. #define GL_STACK_UNDERFLOW 0x0504
  148. #define GL_OUT_OF_MEMORY 0x0505
  149. /* FogMode */
  150. /* GL_LINEAR */
  151. #define GL_EXP 0x0800
  152. #define GL_EXP2 0x0801
  153. /* FogParameter */
  154. #define GL_FOG_DENSITY 0x0B62
  155. #define GL_FOG_START 0x0B63
  156. #define GL_FOG_END 0x0B64
  157. #define GL_FOG_MODE 0x0B65
  158. #define GL_FOG_COLOR 0x0B66
  159. /* FrontFaceDirection */
  160. #define GL_CW 0x0900
  161. #define GL_CCW 0x0901
  162. /* GetPName */
  163. #define GL_CURRENT_COLOR 0x0B00
  164. #define GL_CURRENT_NORMAL 0x0B02
  165. #define GL_CURRENT_TEXTURE_COORDS 0x0B03
  166. #define GL_POINT_SIZE 0x0B11
  167. #define GL_POINT_SIZE_MIN 0x8126
  168. #define GL_POINT_SIZE_MAX 0x8127
  169. #define GL_POINT_FADE_THRESHOLD_SIZE 0x8128
  170. #define GL_POINT_DISTANCE_ATTENUATION 0x8129
  171. #define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
  172. #define GL_LINE_WIDTH 0x0B21
  173. #define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
  174. #define GL_ALIASED_POINT_SIZE_RANGE 0x846D
  175. #define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
  176. #define GL_CULL_FACE_MODE 0x0B45
  177. #define GL_FRONT_FACE 0x0B46
  178. #define GL_SHADE_MODEL 0x0B54
  179. #define GL_DEPTH_RANGE 0x0B70
  180. #define GL_DEPTH_WRITEMASK 0x0B72
  181. #define GL_DEPTH_CLEAR_VALUE 0x0B73
  182. #define GL_DEPTH_FUNC 0x0B74
  183. #define GL_STENCIL_CLEAR_VALUE 0x0B91
  184. #define GL_STENCIL_FUNC 0x0B92
  185. #define GL_STENCIL_VALUE_MASK 0x0B93
  186. #define GL_STENCIL_FAIL 0x0B94
  187. #define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
  188. #define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
  189. #define GL_STENCIL_REF 0x0B97
  190. #define GL_STENCIL_WRITEMASK 0x0B98
  191. #define GL_MATRIX_MODE 0x0BA0
  192. #define GL_VIEWPORT 0x0BA2
  193. #define GL_MODELVIEW_STACK_DEPTH 0x0BA3
  194. #define GL_PROJECTION_STACK_DEPTH 0x0BA4
  195. #define GL_TEXTURE_STACK_DEPTH 0x0BA5
  196. #define GL_MODELVIEW_MATRIX 0x0BA6
  197. #define GL_PROJECTION_MATRIX 0x0BA7
  198. #define GL_TEXTURE_MATRIX 0x0BA8
  199. #define GL_ALPHA_TEST_FUNC 0x0BC1
  200. #define GL_ALPHA_TEST_REF 0x0BC2
  201. #define GL_BLEND_DST 0x0BE0
  202. #define GL_BLEND_SRC 0x0BE1
  203. #define GL_LOGIC_OP_MODE 0x0BF0
  204. #define GL_SCISSOR_BOX 0x0C10
  205. #define GL_SCISSOR_TEST 0x0C11
  206. #define GL_COLOR_CLEAR_VALUE 0x0C22
  207. #define GL_COLOR_WRITEMASK 0x0C23
  208. #define GL_UNPACK_ALIGNMENT 0x0CF5
  209. #define GL_PACK_ALIGNMENT 0x0D05
  210. #define GL_MAX_LIGHTS 0x0D31
  211. #define GL_MAX_CLIP_PLANES 0x0D32
  212. #define GL_MAX_TEXTURE_SIZE 0x0D33
  213. #define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36
  214. #define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38
  215. #define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39
  216. #define GL_MAX_VIEWPORT_DIMS 0x0D3A
  217. #define GL_MAX_TEXTURE_UNITS 0x84E2
  218. #define GL_SUBPIXEL_BITS 0x0D50
  219. #define GL_RED_BITS 0x0D52
  220. #define GL_GREEN_BITS 0x0D53
  221. #define GL_BLUE_BITS 0x0D54
  222. #define GL_ALPHA_BITS 0x0D55
  223. #define GL_DEPTH_BITS 0x0D56
  224. #define GL_STENCIL_BITS 0x0D57
  225. #define GL_POLYGON_OFFSET_UNITS 0x2A00
  226. #define GL_POLYGON_OFFSET_FILL 0x8037
  227. #define GL_POLYGON_OFFSET_FACTOR 0x8038
  228. #define GL_TEXTURE_BINDING_2D 0x8069
  229. #define GL_VERTEX_ARRAY_SIZE 0x807A
  230. #define GL_VERTEX_ARRAY_TYPE 0x807B
  231. #define GL_VERTEX_ARRAY_STRIDE 0x807C
  232. #define GL_NORMAL_ARRAY_TYPE 0x807E
  233. #define GL_NORMAL_ARRAY_STRIDE 0x807F
  234. #define GL_COLOR_ARRAY_SIZE 0x8081
  235. #define GL_COLOR_ARRAY_TYPE 0x8082
  236. #define GL_COLOR_ARRAY_STRIDE 0x8083
  237. #define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088
  238. #define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089
  239. #define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A
  240. #define GL_VERTEX_ARRAY_POINTER 0x808E
  241. #define GL_NORMAL_ARRAY_POINTER 0x808F
  242. #define GL_COLOR_ARRAY_POINTER 0x8090
  243. #define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092
  244. #define GL_SAMPLE_BUFFERS 0x80A8
  245. #define GL_SAMPLES 0x80A9
  246. #define GL_SAMPLE_COVERAGE_VALUE 0x80AA
  247. #define GL_SAMPLE_COVERAGE_INVERT 0x80AB
  248. /* GetTextureParameter */
  249. /* GL_TEXTURE_MAG_FILTER */
  250. /* GL_TEXTURE_MIN_FILTER */
  251. /* GL_TEXTURE_WRAP_S */
  252. /* GL_TEXTURE_WRAP_T */
  253. #define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
  254. #define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
  255. /* HintMode */
  256. #define GL_DONT_CARE 0x1100
  257. #define GL_FASTEST 0x1101
  258. #define GL_NICEST 0x1102
  259. /* HintTarget */
  260. #define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50
  261. #define GL_POINT_SMOOTH_HINT 0x0C51
  262. #define GL_LINE_SMOOTH_HINT 0x0C52
  263. #define GL_FOG_HINT 0x0C54
  264. #define GL_GENERATE_MIPMAP_HINT 0x8192
  265. /* LightModelParameter */
  266. #define GL_LIGHT_MODEL_AMBIENT 0x0B53
  267. #define GL_LIGHT_MODEL_TWO_SIDE 0x0B52
  268. /* LightParameter */
  269. #define GL_AMBIENT 0x1200
  270. #define GL_DIFFUSE 0x1201
  271. #define GL_SPECULAR 0x1202
  272. #define GL_POSITION 0x1203
  273. #define GL_SPOT_DIRECTION 0x1204
  274. #define GL_SPOT_EXPONENT 0x1205
  275. #define GL_SPOT_CUTOFF 0x1206
  276. #define GL_CONSTANT_ATTENUATION 0x1207
  277. #define GL_LINEAR_ATTENUATION 0x1208
  278. #define GL_QUADRATIC_ATTENUATION 0x1209
  279. /* DataType */
  280. #define GL_BYTE 0x1400
  281. #define GL_UNSIGNED_BYTE 0x1401
  282. #define GL_SHORT 0x1402
  283. #define GL_UNSIGNED_SHORT 0x1403
  284. #define GL_FLOAT 0x1406
  285. #define GL_FIXED 0x140C
  286. /* LogicOp */
  287. #define GL_CLEAR 0x1500
  288. #define GL_AND 0x1501
  289. #define GL_AND_REVERSE 0x1502
  290. #define GL_COPY 0x1503
  291. #define GL_AND_INVERTED 0x1504
  292. #define GL_NOOP 0x1505
  293. #define GL_XOR 0x1506
  294. #define GL_OR 0x1507
  295. #define GL_NOR 0x1508
  296. #define GL_EQUIV 0x1509
  297. #define GL_INVERT 0x150A
  298. #define GL_OR_REVERSE 0x150B
  299. #define GL_COPY_INVERTED 0x150C
  300. #define GL_OR_INVERTED 0x150D
  301. #define GL_NAND 0x150E
  302. #define GL_SET 0x150F
  303. /* MaterialFace */
  304. /* GL_FRONT_AND_BACK */
  305. /* MaterialParameter */
  306. #define GL_EMISSION 0x1600
  307. #define GL_SHININESS 0x1601
  308. #define GL_AMBIENT_AND_DIFFUSE 0x1602
  309. /* GL_AMBIENT */
  310. /* GL_DIFFUSE */
  311. /* GL_SPECULAR */
  312. /* MatrixMode */
  313. #define GL_MODELVIEW 0x1700
  314. #define GL_PROJECTION 0x1701
  315. #define GL_TEXTURE 0x1702
  316. /* NormalPointerType */
  317. /* GL_BYTE */
  318. /* GL_SHORT */
  319. /* GL_FLOAT */
  320. /* GL_FIXED */
  321. /* PixelFormat */
  322. #define GL_ALPHA 0x1906
  323. #define GL_RGB 0x1907
  324. #define GL_RGBA 0x1908
  325. #define GL_LUMINANCE 0x1909
  326. #define GL_LUMINANCE_ALPHA 0x190A
  327. /* PixelStoreParameter */
  328. #define GL_UNPACK_ALIGNMENT 0x0CF5
  329. #define GL_PACK_ALIGNMENT 0x0D05
  330. /* PixelType */
  331. /* GL_UNSIGNED_BYTE */
  332. #define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
  333. #define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
  334. #define GL_UNSIGNED_SHORT_5_6_5 0x8363
  335. /* ShadingModel */
  336. #define GL_FLAT 0x1D00
  337. #define GL_SMOOTH 0x1D01
  338. /* StencilFunction */
  339. /* GL_NEVER */
  340. /* GL_LESS */
  341. /* GL_EQUAL */
  342. /* GL_LEQUAL */
  343. /* GL_GREATER */
  344. /* GL_NOTEQUAL */
  345. /* GL_GEQUAL */
  346. /* GL_ALWAYS */
  347. /* StencilOp */
  348. /* GL_ZERO */
  349. #define GL_KEEP 0x1E00
  350. #define GL_REPLACE 0x1E01
  351. #define GL_INCR 0x1E02
  352. #define GL_DECR 0x1E03
  353. /* GL_INVERT */
  354. /* StringName */
  355. #define GL_VENDOR 0x1F00
  356. #define GL_RENDERER 0x1F01
  357. #define GL_VERSION 0x1F02
  358. #define GL_EXTENSIONS 0x1F03
  359. /* TexCoordPointerType */
  360. /* GL_SHORT */
  361. /* GL_FLOAT */
  362. /* GL_FIXED */
  363. /* GL_BYTE */
  364. /* TextureEnvMode */
  365. #define GL_MODULATE 0x2100
  366. #define GL_DECAL 0x2101
  367. /* GL_BLEND */
  368. #define GL_ADD 0x0104
  369. /* GL_REPLACE */
  370. /* TextureEnvParameter */
  371. #define GL_TEXTURE_ENV_MODE 0x2200
  372. #define GL_TEXTURE_ENV_COLOR 0x2201
  373. /* TextureEnvTarget */
  374. #define GL_TEXTURE_ENV 0x2300
  375. /* TextureMagFilter */
  376. #define GL_NEAREST 0x2600
  377. #define GL_LINEAR 0x2601
  378. /* TextureMinFilter */
  379. /* GL_NEAREST */
  380. /* GL_LINEAR */
  381. #define GL_NEAREST_MIPMAP_NEAREST 0x2700
  382. #define GL_LINEAR_MIPMAP_NEAREST 0x2701
  383. #define GL_NEAREST_MIPMAP_LINEAR 0x2702
  384. #define GL_LINEAR_MIPMAP_LINEAR 0x2703
  385. /* TextureParameterName */
  386. #define GL_TEXTURE_MAG_FILTER 0x2800
  387. #define GL_TEXTURE_MIN_FILTER 0x2801
  388. #define GL_TEXTURE_WRAP_S 0x2802
  389. #define GL_TEXTURE_WRAP_T 0x2803
  390. #define GL_GENERATE_MIPMAP 0x8191
  391. /* TextureTarget */
  392. /* GL_TEXTURE_2D */
  393. /* TextureUnit */
  394. #define GL_TEXTURE0 0x84C0
  395. #define GL_TEXTURE1 0x84C1
  396. #define GL_TEXTURE2 0x84C2
  397. #define GL_TEXTURE3 0x84C3
  398. #define GL_TEXTURE4 0x84C4
  399. #define GL_TEXTURE5 0x84C5
  400. #define GL_TEXTURE6 0x84C6
  401. #define GL_TEXTURE7 0x84C7
  402. #define GL_TEXTURE8 0x84C8
  403. #define GL_TEXTURE9 0x84C9
  404. #define GL_TEXTURE10 0x84CA
  405. #define GL_TEXTURE11 0x84CB
  406. #define GL_TEXTURE12 0x84CC
  407. #define GL_TEXTURE13 0x84CD
  408. #define GL_TEXTURE14 0x84CE
  409. #define GL_TEXTURE15 0x84CF
  410. #define GL_TEXTURE16 0x84D0
  411. #define GL_TEXTURE17 0x84D1
  412. #define GL_TEXTURE18 0x84D2
  413. #define GL_TEXTURE19 0x84D3
  414. #define GL_TEXTURE20 0x84D4
  415. #define GL_TEXTURE21 0x84D5
  416. #define GL_TEXTURE22 0x84D6
  417. #define GL_TEXTURE23 0x84D7
  418. #define GL_TEXTURE24 0x84D8
  419. #define GL_TEXTURE25 0x84D9
  420. #define GL_TEXTURE26 0x84DA
  421. #define GL_TEXTURE27 0x84DB
  422. #define GL_TEXTURE28 0x84DC
  423. #define GL_TEXTURE29 0x84DD
  424. #define GL_TEXTURE30 0x84DE
  425. #define GL_TEXTURE31 0x84DF
  426. #define GL_ACTIVE_TEXTURE 0x84E0
  427. #define GL_CLIENT_ACTIVE_TEXTURE 0x84E1
  428. /* TextureWrapMode */
  429. #define GL_REPEAT 0x2901
  430. #define GL_CLAMP_TO_EDGE 0x812F
  431. /* VertexPointerType */
  432. /* GL_SHORT */
  433. /* GL_FLOAT */
  434. /* GL_FIXED */
  435. /* GL_BYTE */
  436. /* LightName */
  437. #define GL_LIGHT0 0x4000
  438. #define GL_LIGHT1 0x4001
  439. #define GL_LIGHT2 0x4002
  440. #define GL_LIGHT3 0x4003
  441. #define GL_LIGHT4 0x4004
  442. #define GL_LIGHT5 0x4005
  443. #define GL_LIGHT6 0x4006
  444. #define GL_LIGHT7 0x4007
  445. /* Buffer Objects */
  446. #define GL_ARRAY_BUFFER 0x8892
  447. #define GL_ELEMENT_ARRAY_BUFFER 0x8893
  448. #define GL_ARRAY_BUFFER_BINDING 0x8894
  449. #define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
  450. #define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896
  451. #define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897
  452. #define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898
  453. #define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A
  454. #define GL_STATIC_DRAW 0x88E4
  455. #define GL_DYNAMIC_DRAW 0x88E8
  456. #define GL_BUFFER_SIZE 0x8764
  457. #define GL_BUFFER_USAGE 0x8765
  458. /* Texture combine + dot3 */
  459. #define GL_SUBTRACT 0x84E7
  460. #define GL_COMBINE 0x8570
  461. #define GL_COMBINE_RGB 0x8571
  462. #define GL_COMBINE_ALPHA 0x8572
  463. #define GL_RGB_SCALE 0x8573
  464. #define GL_ADD_SIGNED 0x8574
  465. #define GL_INTERPOLATE 0x8575
  466. #define GL_CONSTANT 0x8576
  467. #define GL_PRIMARY_COLOR 0x8577
  468. #define GL_PREVIOUS 0x8578
  469. #define GL_OPERAND0_RGB 0x8590
  470. #define GL_OPERAND1_RGB 0x8591
  471. #define GL_OPERAND2_RGB 0x8592
  472. #define GL_OPERAND0_ALPHA 0x8598
  473. #define GL_OPERAND1_ALPHA 0x8599
  474. #define GL_OPERAND2_ALPHA 0x859A
  475. #define GL_ALPHA_SCALE 0x0D1C
  476. #define GL_SRC0_RGB 0x8580
  477. #define GL_SRC1_RGB 0x8581
  478. #define GL_SRC2_RGB 0x8582
  479. #define GL_SRC0_ALPHA 0x8588
  480. #define GL_SRC1_ALPHA 0x8589
  481. #define GL_SRC2_ALPHA 0x858A
  482. #define GL_DOT3_RGB 0x86AE
  483. #define GL_DOT3_RGBA 0x86AF
  484. /*------------------------------------------------------------------------*
  485. * required OES extension tokens
  486. *------------------------------------------------------------------------*/
  487. /* OES_read_format */
  488. #ifndef GL_OES_read_format
  489. #define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A
  490. #define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B
  491. #endif
  492. /* GL_OES_compressed_paletted_texture */
  493. #ifndef GL_OES_compressed_paletted_texture
  494. #define GL_PALETTE4_RGB8_OES 0x8B90
  495. #define GL_PALETTE4_RGBA8_OES 0x8B91
  496. #define GL_PALETTE4_R5_G6_B5_OES 0x8B92
  497. #define GL_PALETTE4_RGBA4_OES 0x8B93
  498. #define GL_PALETTE4_RGB5_A1_OES 0x8B94
  499. #define GL_PALETTE8_RGB8_OES 0x8B95
  500. #define GL_PALETTE8_RGBA8_OES 0x8B96
  501. #define GL_PALETTE8_R5_G6_B5_OES 0x8B97
  502. #define GL_PALETTE8_RGBA4_OES 0x8B98
  503. #define GL_PALETTE8_RGB5_A1_OES 0x8B99
  504. #endif
  505. /* OES_point_size_array */
  506. #ifndef GL_OES_point_size_array
  507. #define GL_POINT_SIZE_ARRAY_OES 0x8B9C
  508. #define GL_POINT_SIZE_ARRAY_TYPE_OES 0x898A
  509. #define GL_POINT_SIZE_ARRAY_STRIDE_OES 0x898B
  510. #define GL_POINT_SIZE_ARRAY_POINTER_OES 0x898C
  511. #define GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES 0x8B9F
  512. #endif
  513. /* GL_OES_point_sprite */
  514. #ifndef GL_OES_point_sprite
  515. #define GL_POINT_SPRITE_OES 0x8861
  516. #define GL_COORD_REPLACE_OES 0x8862
  517. #endif
  518. /*************************************************************/
  519. /* Available only in Common profile */
  520. GL_API void GL_APIENTRY glAlphaFunc (GLenum func, GLclampf ref);
  521. GL_API void GL_APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
  522. GL_API void GL_APIENTRY glClearDepthf (GLclampf depth);
  523. GL_API void GL_APIENTRY glClipPlanef (GLenum plane, const GLfloat *equation);
  524. GL_API void GL_APIENTRY glColor4f (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
  525. GL_API void GL_APIENTRY glDepthRangef (GLclampf zNear, GLclampf zFar);
  526. GL_API void GL_APIENTRY glFogf (GLenum pname, GLfloat param);
  527. GL_API void GL_APIENTRY glFogfv (GLenum pname, const GLfloat *params);
  528. GL_API void GL_APIENTRY glFrustumf (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
  529. GL_API void GL_APIENTRY glGetClipPlanef (GLenum pname, GLfloat eqn[4]);
  530. GL_API void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat *params);
  531. GL_API void GL_APIENTRY glGetLightfv (GLenum light, GLenum pname, GLfloat *params);
  532. GL_API void GL_APIENTRY glGetMaterialfv (GLenum face, GLenum pname, GLfloat *params);
  533. GL_API void GL_APIENTRY glGetTexEnvfv (GLenum env, GLenum pname, GLfloat *params);
  534. GL_API void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params);
  535. GL_API void GL_APIENTRY glLightModelf (GLenum pname, GLfloat param);
  536. GL_API void GL_APIENTRY glLightModelfv (GLenum pname, const GLfloat *params);
  537. GL_API void GL_APIENTRY glLightf (GLenum light, GLenum pname, GLfloat param);
  538. GL_API void GL_APIENTRY glLightfv (GLenum light, GLenum pname, const GLfloat *params);
  539. GL_API void GL_APIENTRY glLineWidth (GLfloat width);
  540. GL_API void GL_APIENTRY glLoadMatrixf (const GLfloat *m);
  541. GL_API void GL_APIENTRY glMaterialf (GLenum face, GLenum pname, GLfloat param);
  542. GL_API void GL_APIENTRY glMaterialfv (GLenum face, GLenum pname, const GLfloat *params);
  543. GL_API void GL_APIENTRY glMultMatrixf (const GLfloat *m);
  544. GL_API void GL_APIENTRY glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
  545. GL_API void GL_APIENTRY glNormal3f (GLfloat nx, GLfloat ny, GLfloat nz);
  546. GL_API void GL_APIENTRY glOrthof (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
  547. GL_API void GL_APIENTRY glPointParameterf (GLenum pname, GLfloat param);
  548. GL_API void GL_APIENTRY glPointParameterfv (GLenum pname, const GLfloat *params);
  549. GL_API void GL_APIENTRY glPointSize (GLfloat size);
  550. GL_API void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
  551. GL_API void GL_APIENTRY glRotatef (GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
  552. GL_API void GL_APIENTRY glScalef (GLfloat x, GLfloat y, GLfloat z);
  553. GL_API void GL_APIENTRY glTexEnvf (GLenum target, GLenum pname, GLfloat param);
  554. GL_API void GL_APIENTRY glTexEnvfv (GLenum target, GLenum pname, const GLfloat *params);
  555. GL_API void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
  556. GL_API void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params);
  557. GL_API void GL_APIENTRY glTranslatef (GLfloat x, GLfloat y, GLfloat z);
  558. /* Available in both Common and Common-Lite profiles */
  559. GL_API void GL_APIENTRY glActiveTexture (GLenum texture);
  560. GL_API void GL_APIENTRY glAlphaFuncx (GLenum func, GLclampx ref);
  561. GL_API void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer);
  562. GL_API void GL_APIENTRY glBindTexture (GLenum target, GLuint texture);
  563. GL_API void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
  564. GL_API void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage);
  565. GL_API void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data);
  566. GL_API void GL_APIENTRY glClear (GLbitfield mask);
  567. GL_API void GL_APIENTRY glClearColorx (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha);
  568. GL_API void GL_APIENTRY glClearDepthx (GLclampx depth);
  569. GL_API void GL_APIENTRY glClearStencil (GLint s);
  570. GL_API void GL_APIENTRY glClientActiveTexture (GLenum texture);
  571. GL_API void GL_APIENTRY glClipPlanex (GLenum plane, const GLfixed *equation);
  572. GL_API void GL_APIENTRY glColor4ub (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
  573. GL_API void GL_APIENTRY glColor4x (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
  574. GL_API void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
  575. GL_API void GL_APIENTRY glColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
  576. GL_API void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
  577. GL_API void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
  578. GL_API void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
  579. GL_API void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
  580. GL_API void GL_APIENTRY glCullFace (GLenum mode);
  581. GL_API void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers);
  582. GL_API void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures);
  583. GL_API void GL_APIENTRY glDepthFunc (GLenum func);
  584. GL_API void GL_APIENTRY glDepthMask (GLboolean flag);
  585. GL_API void GL_APIENTRY glDepthRangex (GLclampx zNear, GLclampx zFar);
  586. GL_API void GL_APIENTRY glDisable (GLenum cap);
  587. GL_API void GL_APIENTRY glDisableClientState (GLenum array);
  588. GL_API void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
  589. GL_API void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices);
  590. GL_API void GL_APIENTRY glEnable (GLenum cap);
  591. GL_API void GL_APIENTRY glEnableClientState (GLenum array);
  592. GL_API void GL_APIENTRY glFinish (void);
  593. GL_API void GL_APIENTRY glFlush (void);
  594. GL_API void GL_APIENTRY glFogx (GLenum pname, GLfixed param);
  595. GL_API void GL_APIENTRY glFogxv (GLenum pname, const GLfixed *params);
  596. GL_API void GL_APIENTRY glFrontFace (GLenum mode);
  597. GL_API void GL_APIENTRY glFrustumx (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
  598. GL_API void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean *params);
  599. GL_API void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params);
  600. GL_API void GL_APIENTRY glGetClipPlanex (GLenum pname, GLfixed eqn[4]);
  601. GL_API void GL_APIENTRY glGenBuffers (GLsizei n, GLuint *buffers);
  602. GL_API void GL_APIENTRY glGenTextures (GLsizei n, GLuint *textures);
  603. GL_API GLenum GL_APIENTRY glGetError (void);
  604. GL_API void GL_APIENTRY glGetFixedv (GLenum pname, GLfixed *params);
  605. GL_API void GL_APIENTRY glGetIntegerv (GLenum pname, GLint *params);
  606. GL_API void GL_APIENTRY glGetLightxv (GLenum light, GLenum pname, GLfixed *params);
  607. GL_API void GL_APIENTRY glGetMaterialxv (GLenum face, GLenum pname, GLfixed *params);
  608. GL_API void GL_APIENTRY glGetPointerv (GLenum pname, GLvoid **params);
  609. GL_API const GLubyte * GL_APIENTRY glGetString (GLenum name);
  610. GL_API void GL_APIENTRY glGetTexEnviv (GLenum env, GLenum pname, GLint *params);
  611. GL_API void GL_APIENTRY glGetTexEnvxv (GLenum env, GLenum pname, GLfixed *params);
  612. GL_API void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params);
  613. GL_API void GL_APIENTRY glGetTexParameterxv (GLenum target, GLenum pname, GLfixed *params);
  614. GL_API void GL_APIENTRY glHint (GLenum target, GLenum mode);
  615. GL_API GLboolean GL_APIENTRY glIsBuffer (GLuint buffer);
  616. GL_API GLboolean GL_APIENTRY glIsEnabled (GLenum cap);
  617. GL_API GLboolean GL_APIENTRY glIsTexture (GLuint texture);
  618. GL_API void GL_APIENTRY glLightModelx (GLenum pname, GLfixed param);
  619. GL_API void GL_APIENTRY glLightModelxv (GLenum pname, const GLfixed *params);
  620. GL_API void GL_APIENTRY glLightx (GLenum light, GLenum pname, GLfixed param);
  621. GL_API void GL_APIENTRY glLightxv (GLenum light, GLenum pname, const GLfixed *params);
  622. GL_API void GL_APIENTRY glLineWidthx (GLfixed width);
  623. GL_API void GL_APIENTRY glLoadIdentity (void);
  624. GL_API void GL_APIENTRY glLoadMatrixx (const GLfixed *m);
  625. GL_API void GL_APIENTRY glLogicOp (GLenum opcode);
  626. GL_API void GL_APIENTRY glMaterialx (GLenum face, GLenum pname, GLfixed param);
  627. GL_API void GL_APIENTRY glMaterialxv (GLenum face, GLenum pname, const GLfixed *params);
  628. GL_API void GL_APIENTRY glMatrixMode (GLenum mode);
  629. GL_API void GL_APIENTRY glMultMatrixx (const GLfixed *m);
  630. GL_API void GL_APIENTRY glMultiTexCoord4x (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
  631. GL_API void GL_APIENTRY glNormal3x (GLfixed nx, GLfixed ny, GLfixed nz);
  632. GL_API void GL_APIENTRY glNormalPointer (GLenum type, GLsizei stride, const GLvoid *pointer);
  633. GL_API void GL_APIENTRY glOrthox (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
  634. GL_API void GL_APIENTRY glPixelStorei (GLenum pname, GLint param);
  635. GL_API void GL_APIENTRY glPointParameterx (GLenum pname, GLfixed param);
  636. GL_API void GL_APIENTRY glPointParameterxv (GLenum pname, const GLfixed *params);
  637. GL_API void GL_APIENTRY glPointSizex (GLfixed size);
  638. GL_API void GL_APIENTRY glPolygonOffsetx (GLfixed factor, GLfixed units);
  639. GL_API void GL_APIENTRY glPopMatrix (void);
  640. GL_API void GL_APIENTRY glPushMatrix (void);
  641. GL_API void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels);
  642. GL_API void GL_APIENTRY glRotatex (GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
  643. GL_API void GL_APIENTRY glSampleCoverage (GLclampf value, GLboolean invert);
  644. GL_API void GL_APIENTRY glSampleCoveragex (GLclampx value, GLboolean invert);
  645. GL_API void GL_APIENTRY glScalex (GLfixed x, GLfixed y, GLfixed z);
  646. GL_API void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
  647. GL_API void GL_APIENTRY glShadeModel (GLenum mode);
  648. GL_API void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
  649. GL_API void GL_APIENTRY glStencilMask (GLuint mask);
  650. GL_API void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
  651. GL_API void GL_APIENTRY glTexCoordPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
  652. GL_API void GL_APIENTRY glTexEnvi (GLenum target, GLenum pname, GLint param);
  653. GL_API void GL_APIENTRY glTexEnvx (GLenum target, GLenum pname, GLfixed param);
  654. GL_API void GL_APIENTRY glTexEnviv (GLenum target, GLenum pname, const GLint *params);
  655. GL_API void GL_APIENTRY glTexEnvxv (GLenum target, GLenum pname, const GLfixed *params);
  656. GL_API void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
  657. GL_API void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
  658. GL_API void GL_APIENTRY glTexParameterx (GLenum target, GLenum pname, GLfixed param);
  659. GL_API void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params);
  660. GL_API void GL_APIENTRY glTexParameterxv (GLenum target, GLenum pname, const GLfixed *params);
  661. GL_API void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
  662. GL_API void GL_APIENTRY glTranslatex (GLfixed x, GLfixed y, GLfixed z);
  663. GL_API void GL_APIENTRY glVertexPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
  664. GL_API void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
  665. /*------------------------------------------------------------------------*
  666. * Required OES extension functions
  667. *------------------------------------------------------------------------*/
  668. /* GL_OES_read_format */
  669. #ifndef GL_OES_read_format
  670. #define GL_OES_read_format 1
  671. #endif
  672. /* GL_OES_compressed_paletted_texture */
  673. #ifndef GL_OES_compressed_paletted_texture
  674. #define GL_OES_compressed_paletted_texture 1
  675. #endif
  676. /* GL_OES_point_size_array */
  677. #ifndef GL_OES_point_size_array
  678. #define GL_OES_point_size_array 1
  679. GL_API void GL_APIENTRY glPointSizePointerOES (GLenum type, GLsizei stride, const GLvoid *pointer);
  680. #endif
  681. /* GL_OES_point_sprite */
  682. #ifndef GL_OES_point_sprite
  683. #define GL_OES_point_sprite 1
  684. #endif
  685. #ifdef __cplusplus
  686. }
  687. #endif
  688. #endif /* __gl_h_ */