iOSGL2ES.h 56 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442
  1. //-----------------------------------------------------------------------------
  2. // Copyright (c) 2013 GarageGames, LLC
  3. //
  4. // Permission is hereby granted, free of charge, to any person obtaining a copy
  5. // of this software and associated documentation files (the "Software"), to
  6. // deal in the Software without restriction, including without limitation the
  7. // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
  8. // sell copies of the Software, and to permit persons to whom the Software is
  9. // furnished to do so, subject to the following conditions:
  10. //
  11. // The above copyright notice and this permission notice shall be included in
  12. // all copies or substantial portions of the Software.
  13. //
  14. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  19. // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
  20. // IN THE SOFTWARE.
  21. //-----------------------------------------------------------------------------
  22. //
  23. // iOSGL2ES.h
  24. // TGE
  25. //
  26. // Created by Puap Puap on 7/31/08.
  27. // Copyright 2008 Pick Up And Play. All rights reserved.
  28. //
  29. #ifndef _GL2ES_H_
  30. #define _GL2ES_H_
  31. #include "platform/types.h"
  32. #include "OpenGLES/ES1/gl.h"
  33. #include "OpenGLES/ES1/glext.h"
  34. extern "C"
  35. {
  36. void iPhoneGLPushMatrix();
  37. void iPhoneGLPopMatrix();
  38. void iPhoneGLMatrixMode( GLenum mode );
  39. }
  40. // help out the shallow matrix stacks...
  41. #define glPushMatrix iPhoneGLPushMatrix
  42. #define glPopMatrix iPhoneGLPopMatrix
  43. #define glMatrixMode iPhoneGLMatrixMode
  44. class ColorI;
  45. // defines that need functional workarounds
  46. //
  47. //typedef unsigned int GLenum;
  48. //typedef unsigned char GLboolean;
  49. //typedef unsigned int GLbitfield;
  50. //typedef signed char GLbyte;
  51. //typedef short GLshort;
  52. //typedef int GLint;
  53. //typedef int GLsizei;
  54. //typedef unsigned char GLubyte;
  55. //typedef unsigned short GLushort;
  56. //typedef unsigned int GLuint;
  57. //typedef float GLfloat;
  58. //typedef float GLclampf;
  59. //typedef double GLdouble;
  60. //typedef double GLclampd;
  61. //typedef void GLvoid;
  62. //typedef int GLfixed;
  63. //typedef int GLclampx;
  64. //
  65. ///* AccumOp */
  66. //#define GL_ACCUM 0x0100
  67. //#define GL_LOAD 0x0101
  68. //#define GL_RETURN 0x0102
  69. //#define GL_MULT 0x0103
  70. //#define GL_ADD 0x0104
  71. //
  72. ///* AlphaFunction */
  73. //#define GL_NEVER 0x0200
  74. //#define GL_LESS 0x0201
  75. //#define GL_EQUAL 0x0202
  76. //#define GL_LEQUAL 0x0203
  77. //#define GL_GREATER 0x0204
  78. //#define GL_NOTEQUAL 0x0205
  79. //#define GL_GEQUAL 0x0206
  80. //#define GL_ALWAYS 0x0207
  81. //
  82. ///* AttribMask */
  83. //#define GL_CURRENT_BIT 0x00000001
  84. //#define GL_POINT_BIT 0x00000002
  85. //#define GL_LINE_BIT 0x00000004
  86. //#define GL_POLYGON_BIT 0x00000008
  87. //#define GL_POLYGON_STIPPLE_BIT 0x00000010
  88. //#define GL_PIXEL_MODE_BIT 0x00000020
  89. //#define GL_LIGHTING_BIT 0x00000040
  90. //#define GL_FOG_BIT 0x00000080
  91. //#define GL_DEPTH_BUFFER_BIT 0x00000100
  92. //#define GL_ACCUM_BUFFER_BIT 0x00000200
  93. //#define GL_STENCIL_BUFFER_BIT 0x00000400
  94. //#define GL_VIEWPORT_BIT 0x00000800
  95. //#define GL_TRANSFORM_BIT 0x00001000
  96. //#define GL_ENABLE_BIT 0x00002000
  97. //#define GL_COLOR_BUFFER_BIT 0x00004000
  98. //#define GL_HINT_BIT 0x00008000
  99. //#define GL_EVAL_BIT 0x00010000
  100. //#define GL_LIST_BIT 0x00020000
  101. //#define GL_TEXTURE_BIT 0x00040000
  102. //#define GL_SCISSOR_BIT 0x00080000
  103. //#define GL_ALL_ATTRIB_BITS 0x000fffff
  104. //
  105. ///* BeginMode */
  106. //#define GL_POINTS 0x0000
  107. //#define GL_LINES 0x0001
  108. //#define GL_LINE_LOOP 0x0002
  109. //#define GL_LINE_STRIP 0x0003
  110. //#define GL_TRIANGLES 0x0004
  111. //#define GL_TRIANGLE_STRIP 0x0005
  112. //#define GL_TRIANGLE_FAN 0x0006
  113. #define GL_QUADS 0x0007
  114. #define GL_QUAD_STRIP 0x0008
  115. #define GL_POLYGON 0x0009
  116. //
  117. ///* BlendingFactorDest */
  118. //#define GL_ZERO 0
  119. //#define GL_ONE 1
  120. //#define GL_SRC_COLOR 0x0300
  121. //#define GL_ONE_MINUS_SRC_COLOR 0x0301
  122. //#define GL_SRC_ALPHA 0x0302
  123. //#define GL_ONE_MINUS_SRC_ALPHA 0x0303
  124. //#define GL_DST_ALPHA 0x0304
  125. //#define GL_ONE_MINUS_DST_ALPHA 0x0305
  126. //
  127. ///* BlendingFactorSrc */
  128. ///* GL_ZERO */
  129. ///* GL_ONE */
  130. //#define GL_DST_COLOR 0x0306
  131. //#define GL_ONE_MINUS_DST_COLOR 0x0307
  132. //#define GL_SRC_ALPHA_SATURATE 0x0308
  133. ///* GL_SRC_ALPHA */
  134. ///* GL_ONE_MINUS_SRC_ALPHA */
  135. ///* GL_DST_ALPHA */
  136. ///* GL_ONE_MINUS_DST_ALPHA */
  137. //
  138. ///* Boolean */
  139. //#define GL_TRUE 1
  140. //#define GL_FALSE 0
  141. //
  142. ///* ClearBufferMask */
  143. ///* GL_COLOR_BUFFER_BIT */
  144. ///* GL_ACCUM_BUFFER_BIT */
  145. ///* GL_STENCIL_BUFFER_BIT */
  146. ///* GL_DEPTH_BUFFER_BIT */
  147. //
  148. ///* ClientArrayType */
  149. ///* GL_VERTEX_ARRAY */
  150. ///* GL_NORMAL_ARRAY */
  151. ///* GL_COLOR_ARRAY */
  152. ///* GL_INDEX_ARRAY */
  153. ///* GL_TEXTURE_COORD_ARRAY */
  154. ///* GL_EDGE_FLAG_ARRAY */
  155. //
  156. ///* ClipPlaneName */
  157. //#define GL_CLIP_PLANE0 0x3000
  158. //#define GL_CLIP_PLANE1 0x3001
  159. //#define GL_CLIP_PLANE2 0x3002
  160. //#define GL_CLIP_PLANE3 0x3003
  161. //#define GL_CLIP_PLANE4 0x3004
  162. //#define GL_CLIP_PLANE5 0x3005
  163. //
  164. ///* ColorMaterialFace */
  165. ///* GL_FRONT */
  166. ///* GL_BACK */
  167. ///* GL_FRONT_AND_BACK */
  168. //
  169. ///* ColorMaterialParameter */
  170. ///* GL_AMBIENT */
  171. ///* GL_DIFFUSE */
  172. ///* GL_SPECULAR */
  173. ///* GL_EMISSION */
  174. ///* GL_AMBIENT_AND_DIFFUSE */
  175. //
  176. ///* ColorPointerType */
  177. ///* GL_BYTE */
  178. ///* GL_UNSIGNED_BYTE */
  179. ///* GL_SHORT */
  180. ///* GL_UNSIGNED_SHORT */
  181. ///* GL_INT */
  182. ///* GL_UNSIGNED_INT */
  183. ///* GL_FLOAT */
  184. ///* GL_DOUBLE */
  185. //
  186. ///* CullFaceMode */
  187. ///* GL_FRONT */
  188. ///* GL_BACK */
  189. ///* GL_FRONT_AND_BACK */
  190. //
  191. ///* DataType */
  192. //#define GL_BYTE 0x1400
  193. //#define GL_UNSIGNED_BYTE 0x1401
  194. //#define GL_SHORT 0x1402
  195. //#define GL_UNSIGNED_SHORT 0x1403
  196. //#define GL_INT 0x1404
  197. #define GL_UNSIGNED_INT 0x1405
  198. //#define GL_FLOAT 0x1406
  199. //#define GL_2_BYTES 0x1407
  200. //#define GL_3_BYTES 0x1408
  201. //#define GL_4_BYTES 0x1409
  202. //#define GL_DOUBLE 0x140A
  203. //#define GL_FIXED 0x140C
  204. //
  205. ///* DepthFunction */
  206. ///* GL_NEVER */
  207. ///* GL_LESS */
  208. ///* GL_EQUAL */
  209. ///* GL_LEQUAL */
  210. ///* GL_GREATER */
  211. ///* GL_NOTEQUAL */
  212. ///* GL_GEQUAL */
  213. ///* GL_ALWAYS */
  214. //
  215. ///* DrawBufferMode */
  216. //#define GL_NONE 0
  217. //#define GL_FRONT_LEFT 0x0400
  218. //#define GL_FRONT_RIGHT 0x0401
  219. //#define GL_BACK_LEFT 0x0402
  220. //#define GL_BACK_RIGHT 0x0403
  221. //#define GL_FRONT 0x0404
  222. //#define GL_BACK 0x0405
  223. //#define GL_LEFT 0x0406
  224. //#define GL_RIGHT 0x0407
  225. //#define GL_FRONT_AND_BACK 0x0408
  226. //#define GL_AUX0 0x0409
  227. //#define GL_AUX1 0x040A
  228. //#define GL_AUX2 0x040B
  229. //#define GL_AUX3 0x040C
  230. //
  231. ///* Enable */
  232. ///* GL_FOG */
  233. ///* GL_LIGHTING */
  234. ///* GL_TEXTURE_1D */
  235. ///* GL_TEXTURE_2D */
  236. ///* GL_LINE_STIPPLE */
  237. ///* GL_POLYGON_STIPPLE */
  238. ///* GL_CULL_FACE */
  239. ///* GL_ALPHA_TEST */
  240. ///* GL_BLEND */
  241. ///* GL_INDEX_LOGIC_OP */
  242. ///* GL_COLOR_LOGIC_OP */
  243. ///* GL_DITHER */
  244. ///* GL_STENCIL_TEST */
  245. ///* GL_DEPTH_TEST */
  246. ///* GL_CLIP_PLANE0 */
  247. ///* GL_CLIP_PLANE1 */
  248. ///* GL_CLIP_PLANE2 */
  249. ///* GL_CLIP_PLANE3 */
  250. ///* GL_CLIP_PLANE4 */
  251. ///* GL_CLIP_PLANE5 */
  252. ///* GL_LIGHT0 */
  253. ///* GL_LIGHT1 */
  254. ///* GL_LIGHT2 */
  255. ///* GL_LIGHT3 */
  256. ///* GL_LIGHT4 */
  257. ///* GL_LIGHT5 */
  258. ///* GL_LIGHT6 */
  259. ///* GL_LIGHT7 */
  260. ///* GL_TEXTURE_GEN_S */
  261. ///* GL_TEXTURE_GEN_T */
  262. ///* GL_TEXTURE_GEN_R */
  263. ///* GL_TEXTURE_GEN_Q */
  264. ///* GL_MAP1_VERTEX_3 */
  265. ///* GL_MAP1_VERTEX_4 */
  266. ///* GL_MAP1_COLOR_4 */
  267. ///* GL_MAP1_INDEX */
  268. ///* GL_MAP1_NORMAL */
  269. ///* GL_MAP1_TEXTURE_COORD_1 */
  270. ///* GL_MAP1_TEXTURE_COORD_2 */
  271. ///* GL_MAP1_TEXTURE_COORD_3 */
  272. ///* GL_MAP1_TEXTURE_COORD_4 */
  273. ///* GL_MAP2_VERTEX_3 */
  274. ///* GL_MAP2_VERTEX_4 */
  275. ///* GL_MAP2_COLOR_4 */
  276. ///* GL_MAP2_INDEX */
  277. ///* GL_MAP2_NORMAL */
  278. ///* GL_MAP2_TEXTURE_COORD_1 */
  279. ///* GL_MAP2_TEXTURE_COORD_2 */
  280. ///* GL_MAP2_TEXTURE_COORD_3 */
  281. ///* GL_MAP2_TEXTURE_COORD_4 */
  282. ///* GL_POINT_SMOOTH */
  283. ///* GL_LINE_SMOOTH */
  284. ///* GL_POLYGON_SMOOTH */
  285. ///* GL_SCISSOR_TEST */
  286. ///* GL_COLOR_MATERIAL */
  287. ///* GL_NORMALIZE */
  288. ///* GL_AUTO_NORMAL */
  289. ///* GL_VERTEX_ARRAY */
  290. ///* GL_NORMAL_ARRAY */
  291. ///* GL_COLOR_ARRAY */
  292. ///* GL_INDEX_ARRAY */
  293. ///* GL_TEXTURE_COORD_ARRAY */
  294. ///* GL_EDGE_FLAG_ARRAY */
  295. ///* GL_POLYGON_OFFSET_POINT */
  296. ///* GL_POLYGON_OFFSET_LINE */
  297. ///* GL_POLYGON_OFFSET_FILL */
  298. //
  299. ///* ErrorCode */
  300. //#define GL_NO_ERROR 0
  301. //#define GL_INVALID_ENUM 0x0500
  302. //#define GL_INVALID_VALUE 0x0501
  303. //#define GL_INVALID_OPERATION 0x0502
  304. //#define GL_STACK_OVERFLOW 0x0503
  305. //#define GL_STACK_UNDERFLOW 0x0504
  306. //#define GL_OUT_OF_MEMORY 0x0505
  307. //
  308. ///* FeedBackMode */
  309. //#define GL_2D 0x0600
  310. //#define GL_3D 0x0601
  311. //#define GL_3D_COLOR 0x0602
  312. //#define GL_3D_COLOR_TEXTURE 0x0603
  313. //#define GL_4D_COLOR_TEXTURE 0x0604
  314. //
  315. ///* FeedBackToken */
  316. //#define GL_PASS_THROUGH_TOKEN 0x0700
  317. //#define GL_POINT_TOKEN 0x0701
  318. //#define GL_LINE_TOKEN 0x0702
  319. //#define GL_POLYGON_TOKEN 0x0703
  320. //#define GL_BITMAP_TOKEN 0x0704
  321. //#define GL_DRAW_PIXEL_TOKEN 0x0705
  322. //#define GL_COPY_PIXEL_TOKEN 0x0706
  323. //#define GL_LINE_RESET_TOKEN 0x0707
  324. //
  325. ///* FogMode */
  326. ///* GL_LINEAR */
  327. //#define GL_EXP 0x0800
  328. //#define GL_EXP2 0x0801
  329. //
  330. //
  331. ///* FogParameter */
  332. ///* GL_FOG_COLOR */
  333. ///* GL_FOG_DENSITY */
  334. ///* GL_FOG_END */
  335. ///* GL_FOG_INDEX */
  336. ///* GL_FOG_MODE */
  337. ///* GL_FOG_START */
  338. //
  339. #define GL_FOG_COORDINATE_SOURCE_EXT 0x8450
  340. #define GL_FOG_COORDINATE_EXT 0x8451
  341. #define GL_FRAGMENT_DEPTH_EXT 0x8452
  342. //#define GL_CURRENT_FOG_COORDINATE_EXT 0x8453
  343. //#define GL_FOG_COORDINATE_ARRAY_TYPE_EXT 0x8454
  344. //#define GL_FOG_COORDINATE_ARRAY_STRIDE_EXT 0x8455
  345. //#define GL_FOG_COORDINATE_ARRAY_POINTER_EXT 0x8456
  346. #define GL_FOG_COORDINATE_ARRAY_EXT 0x8457
  347. //
  348. ///* FrontFaceDirection */
  349. //#define GL_CW 0x0900
  350. //#define GL_CCW 0x0901
  351. //
  352. ///* GetMapTarget */
  353. //#define GL_COEFF 0x0A00
  354. //#define GL_ORDER 0x0A01
  355. //#define GL_DOMAIN 0x0A02
  356. //
  357. ///* GetPixelMap */
  358. ///* GL_PIXEL_MAP_I_TO_I */
  359. ///* GL_PIXEL_MAP_S_TO_S */
  360. ///* GL_PIXEL_MAP_I_TO_R */
  361. ///* GL_PIXEL_MAP_I_TO_G */
  362. ///* GL_PIXEL_MAP_I_TO_B */
  363. ///* GL_PIXEL_MAP_I_TO_A */
  364. ///* GL_PIXEL_MAP_R_TO_R */
  365. ///* GL_PIXEL_MAP_G_TO_G */
  366. ///* GL_PIXEL_MAP_B_TO_B */
  367. ///* GL_PIXEL_MAP_A_TO_A */
  368. //
  369. ///* GetPointerTarget */
  370. ///* GL_VERTEX_ARRAY_POINTER */
  371. ///* GL_NORMAL_ARRAY_POINTER */
  372. ///* GL_COLOR_ARRAY_POINTER */
  373. ///* GL_INDEX_ARRAY_POINTER */
  374. ///* GL_TEXTURE_COORD_ARRAY_POINTER */
  375. ///* GL_EDGE_FLAG_ARRAY_POINTER */
  376. //
  377. ///* GetTarget */
  378. //#define GL_CURRENT_COLOR 0x0B00
  379. //#define GL_CURRENT_INDEX 0x0B01
  380. //#define GL_CURRENT_NORMAL 0x0B02
  381. //#define GL_CURRENT_TEXTURE_COORDS 0x0B03
  382. //#define GL_CURRENT_RASTER_COLOR 0x0B04
  383. //#define GL_CURRENT_RASTER_INDEX 0x0B05
  384. //#define GL_CURRENT_RASTER_TEXTURE_COORDS 0x0B06
  385. //#define GL_CURRENT_RASTER_POSITION 0x0B07
  386. //#define GL_CURRENT_RASTER_POSITION_VALID 0x0B08
  387. //#define GL_CURRENT_RASTER_DISTANCE 0x0B09
  388. //#define GL_POINT_SMOOTH 0x0B10
  389. //#define GL_POINT_SIZE 0x0B11
  390. //#define GL_POINT_SIZE_RANGE 0x0B12
  391. //#define GL_POINT_SIZE_GRANULARITY 0x0B13
  392. //#define GL_LINE_SMOOTH 0x0B20
  393. //#define GL_LINE_WIDTH 0x0B21
  394. //#define GL_LINE_WIDTH_RANGE 0x0B22
  395. //#define GL_LINE_WIDTH_GRANULARITY 0x0B23
  396. //#define GL_LINE_STIPPLE 0x0B24
  397. //#define GL_LINE_STIPPLE_PATTERN 0x0B25
  398. //#define GL_LINE_STIPPLE_REPEAT 0x0B26
  399. //#define GL_LIST_MODE 0x0B30
  400. //#define GL_MAX_LIST_NESTING 0x0B31
  401. //#define GL_LIST_BASE 0x0B32
  402. //#define GL_LIST_INDEX 0x0B33
  403. #define GL_POLYGON_MODE 0x0B40
  404. //#define GL_POLYGON_SMOOTH 0x0B41
  405. //#define GL_POLYGON_STIPPLE 0x0B42
  406. //#define GL_EDGE_FLAG 0x0B43
  407. //#define GL_CULL_FACE 0x0B44
  408. //#define GL_CULL_FACE_MODE 0x0B45
  409. //#define GL_FRONT_FACE 0x0B46
  410. //#define GL_LIGHTING 0x0B50
  411. //#define GL_LIGHT_MODEL_LOCAL_VIEWER 0x0B51
  412. //#define GL_LIGHT_MODEL_TWO_SIDE 0x0B52
  413. //#define GL_LIGHT_MODEL_AMBIENT 0x0B53
  414. //#define GL_SHADE_MODEL 0x0B54
  415. //#define GL_COLOR_MATERIAL_FACE 0x0B55
  416. //#define GL_COLOR_MATERIAL_PARAMETER 0x0B56
  417. //#define GL_COLOR_MATERIAL 0x0B57
  418. //#define GL_FOG 0x0B60
  419. //#define GL_FOG_INDEX 0x0B61
  420. //#define GL_FOG_DENSITY 0x0B62
  421. //#define GL_FOG_START 0x0B63
  422. //#define GL_FOG_END 0x0B64
  423. //#define GL_FOG_MODE 0x0B65
  424. //#define GL_FOG_COLOR 0x0B66
  425. //#define GL_DEPTH_RANGE 0x0B70
  426. //#define GL_DEPTH_TEST 0x0B71
  427. //#define GL_DEPTH_WRITEMASK 0x0B72
  428. //#define GL_DEPTH_CLEAR_VALUE 0x0B73
  429. //#define GL_DEPTH_FUNC 0x0B74
  430. //#define GL_ACCUM_CLEAR_VALUE 0x0B80
  431. //#define GL_STENCIL_TEST 0x0B90
  432. //#define GL_STENCIL_CLEAR_VALUE 0x0B91
  433. //#define GL_STENCIL_FUNC 0x0B92
  434. //#define GL_STENCIL_VALUE_MASK 0x0B93
  435. //#define GL_STENCIL_FAIL 0x0B94
  436. //#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
  437. //#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
  438. //#define GL_STENCIL_REF 0x0B97
  439. //#define GL_STENCIL_WRITEMASK 0x0B98
  440. //#define GL_MATRIX_MODE 0x0BA0
  441. //#define GL_NORMALIZE 0x0BA1
  442. //#define GL_VIEWPORT 0x0BA2
  443. //#define GL_MODELVIEW_STACK_DEPTH 0x0BA3
  444. //#define GL_PROJECTION_STACK_DEPTH 0x0BA4
  445. //#define GL_TEXTURE_STACK_DEPTH 0x0BA5
  446. //#define GL_MODELVIEW_MATRIX 0x0BA6
  447. //#define GL_PROJECTION_MATRIX 0x0BA7
  448. //#define GL_TEXTURE_MATRIX 0x0BA8
  449. //#define GL_ATTRIB_STACK_DEPTH 0x0BB0
  450. //#define GL_CLIENT_ATTRIB_STACK_DEPTH 0x0BB1
  451. //#define GL_ALPHA_TEST 0x0BC0
  452. //#define GL_ALPHA_TEST_FUNC 0x0BC1
  453. //#define GL_ALPHA_TEST_REF 0x0BC2
  454. //#define GL_DITHER 0x0BD0
  455. //#define GL_BLEND_DST 0x0BE0
  456. //#define GL_BLEND_SRC 0x0BE1
  457. //#define GL_BLEND 0x0BE2
  458. //#define GL_LOGIC_OP_MODE 0x0BF0
  459. //#define GL_INDEX_LOGIC_OP 0x0BF1
  460. //#define GL_COLOR_LOGIC_OP 0x0BF2
  461. //#define GL_AUX_BUFFERS 0x0C00
  462. //#define GL_DRAW_BUFFER 0x0C01
  463. //#define GL_READ_BUFFER 0x0C02
  464. //#define GL_SCISSOR_BOX 0x0C10
  465. //#define GL_SCISSOR_TEST 0x0C11
  466. //#define GL_INDEX_CLEAR_VALUE 0x0C20
  467. //#define GL_INDEX_WRITEMASK 0x0C21
  468. //#define GL_COLOR_CLEAR_VALUE 0x0C22
  469. //#define GL_COLOR_WRITEMASK 0x0C23
  470. //#define GL_INDEX_MODE 0x0C30
  471. //#define GL_RGBA_MODE 0x0C31
  472. //#define GL_DOUBLEBUFFER 0x0C32
  473. //#define GL_STEREO 0x0C33
  474. //#define GL_RENDER_MODE 0x0C40
  475. //#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50
  476. //#define GL_POINT_SMOOTH_HINT 0x0C51
  477. //#define GL_LINE_SMOOTH_HINT 0x0C52
  478. //#define GL_POLYGON_SMOOTH_HINT 0x0C53
  479. //#define GL_FOG_HINT 0x0C54
  480. #define GL_TEXTURE_GEN_S 0x0C60
  481. #define GL_TEXTURE_GEN_T 0x0C61
  482. //#define GL_TEXTURE_GEN_R 0x0C62
  483. //#define GL_TEXTURE_GEN_Q 0x0C63
  484. //#define GL_PIXEL_MAP_I_TO_I 0x0C70
  485. //#define GL_PIXEL_MAP_S_TO_S 0x0C71
  486. //#define GL_PIXEL_MAP_I_TO_R 0x0C72
  487. //#define GL_PIXEL_MAP_I_TO_G 0x0C73
  488. //#define GL_PIXEL_MAP_I_TO_B 0x0C74
  489. //#define GL_PIXEL_MAP_I_TO_A 0x0C75
  490. //#define GL_PIXEL_MAP_R_TO_R 0x0C76
  491. //#define GL_PIXEL_MAP_G_TO_G 0x0C77
  492. //#define GL_PIXEL_MAP_B_TO_B 0x0C78
  493. //#define GL_PIXEL_MAP_A_TO_A 0x0C79
  494. //#define GL_PIXEL_MAP_I_TO_I_SIZE 0x0CB0
  495. //#define GL_PIXEL_MAP_S_TO_S_SIZE 0x0CB1
  496. //#define GL_PIXEL_MAP_I_TO_R_SIZE 0x0CB2
  497. //#define GL_PIXEL_MAP_I_TO_G_SIZE 0x0CB3
  498. //#define GL_PIXEL_MAP_I_TO_B_SIZE 0x0CB4
  499. //#define GL_PIXEL_MAP_I_TO_A_SIZE 0x0CB5
  500. //#define GL_PIXEL_MAP_R_TO_R_SIZE 0x0CB6
  501. //#define GL_PIXEL_MAP_G_TO_G_SIZE 0x0CB7
  502. //#define GL_PIXEL_MAP_B_TO_B_SIZE 0x0CB8
  503. //#define GL_PIXEL_MAP_A_TO_A_SIZE 0x0CB9
  504. //#define GL_UNPACK_SWAP_BYTES 0x0CF0
  505. //#define GL_UNPACK_LSB_FIRST 0x0CF1
  506. //#define GL_UNPACK_ROW_LENGTH 0x0CF2
  507. //#define GL_UNPACK_SKIP_ROWS 0x0CF3
  508. //#define GL_UNPACK_SKIP_PIXELS 0x0CF4
  509. //#define GL_UNPACK_ALIGNMENT 0x0CF5
  510. //#define GL_PACK_SWAP_BYTES 0x0D00
  511. //#define GL_PACK_LSB_FIRST 0x0D01
  512. //#define GL_PACK_ROW_LENGTH 0x0D02
  513. //#define GL_PACK_SKIP_ROWS 0x0D03
  514. //#define GL_PACK_SKIP_PIXELS 0x0D04
  515. //#define GL_PACK_ALIGNMENT 0x0D05
  516. //#define GL_MAP_COLOR 0x0D10
  517. //#define GL_MAP_STENCIL 0x0D11
  518. //#define GL_INDEX_SHIFT 0x0D12
  519. //#define GL_INDEX_OFFSET 0x0D13
  520. //#define GL_RED_SCALE 0x0D14
  521. //#define GL_RED_BIAS 0x0D15
  522. //#define GL_ZOOM_X 0x0D16
  523. //#define GL_ZOOM_Y 0x0D17
  524. //#define GL_GREEN_SCALE 0x0D18
  525. //#define GL_GREEN_BIAS 0x0D19
  526. //#define GL_BLUE_SCALE 0x0D1A
  527. //#define GL_BLUE_BIAS 0x0D1B
  528. //#define GL_ALPHA_SCALE 0x0D1C
  529. //#define GL_ALPHA_BIAS 0x0D1D
  530. //#define GL_DEPTH_SCALE 0x0D1E
  531. //#define GL_DEPTH_BIAS 0x0D1F
  532. //#define GL_MAX_EVAL_ORDER 0x0D30
  533. //#define GL_MAX_LIGHTS 0x0D31
  534. //#define GL_MAX_CLIP_PLANES 0x0D32
  535. //#define GL_MAX_TEXTURE_SIZE 0x0D33
  536. //#define GL_MAX_PIXEL_MAP_TABLE 0x0D34
  537. //#define GL_MAX_ATTRIB_STACK_DEPTH 0x0D35
  538. //#define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36
  539. //#define GL_MAX_NAME_STACK_DEPTH 0x0D37
  540. //#define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38
  541. //#define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39
  542. //#define GL_MAX_VIEWPORT_DIMS 0x0D3A
  543. //#define GL_MAX_CLIENT_ATTRIB_STACK_DEPTH 0x0D3B
  544. //#define GL_SUBPIXEL_BITS 0x0D50
  545. //#define GL_INDEX_BITS 0x0D51
  546. //#define GL_RED_BITS 0x0D52
  547. //#define GL_GREEN_BITS 0x0D53
  548. //#define GL_BLUE_BITS 0x0D54
  549. //#define GL_ALPHA_BITS 0x0D55
  550. //#define GL_DEPTH_BITS 0x0D56
  551. //#define GL_STENCIL_BITS 0x0D57
  552. //#define GL_ACCUM_RED_BITS 0x0D58
  553. //#define GL_ACCUM_GREEN_BITS 0x0D59
  554. //#define GL_ACCUM_BLUE_BITS 0x0D5A
  555. //#define GL_ACCUM_ALPHA_BITS 0x0D5B
  556. //#define GL_NAME_STACK_DEPTH 0x0D70
  557. //#define GL_AUTO_NORMAL 0x0D80
  558. //#define GL_MAP1_COLOR_4 0x0D90
  559. //#define GL_MAP1_INDEX 0x0D91
  560. //#define GL_MAP1_NORMAL 0x0D92
  561. //#define GL_MAP1_TEXTURE_COORD_1 0x0D93
  562. //#define GL_MAP1_TEXTURE_COORD_2 0x0D94
  563. //#define GL_MAP1_TEXTURE_COORD_3 0x0D95
  564. //#define GL_MAP1_TEXTURE_COORD_4 0x0D96
  565. //#define GL_MAP1_VERTEX_3 0x0D97
  566. //#define GL_MAP1_VERTEX_4 0x0D98
  567. //#define GL_MAP2_COLOR_4 0x0DB0
  568. //#define GL_MAP2_INDEX 0x0DB1
  569. //#define GL_MAP2_NORMAL 0x0DB2
  570. //#define GL_MAP2_TEXTURE_COORD_1 0x0DB3
  571. //#define GL_MAP2_TEXTURE_COORD_2 0x0DB4
  572. //#define GL_MAP2_TEXTURE_COORD_3 0x0DB5
  573. //#define GL_MAP2_TEXTURE_COORD_4 0x0DB6
  574. //#define GL_MAP2_VERTEX_3 0x0DB7
  575. //#define GL_MAP2_VERTEX_4 0x0DB8
  576. //#define GL_MAP1_GRID_DOMAIN 0x0DD0
  577. //#define GL_MAP1_GRID_SEGMENTS 0x0DD1
  578. //#define GL_MAP2_GRID_DOMAIN 0x0DD2
  579. //#define GL_MAP2_GRID_SEGMENTS 0x0DD3
  580. //#define GL_TEXTURE_1D 0x0DE0
  581. //#define GL_TEXTURE_2D 0x0DE1
  582. //#define GL_FEEDBACK_BUFFER_POINTER 0x0DF0
  583. //#define GL_FEEDBACK_BUFFER_SIZE 0x0DF1
  584. //#define GL_FEEDBACK_BUFFER_TYPE 0x0DF2
  585. //#define GL_SELECTION_BUFFER_POINTER 0x0DF3
  586. //#define GL_SELECTION_BUFFER_SIZE 0x0DF4
  587. ///* GL_TEXTURE_BINDING_1D */
  588. ///* GL_TEXTURE_BINDING_2D */
  589. ///* GL_VERTEX_ARRAY */
  590. ///* GL_NORMAL_ARRAY */
  591. ///* GL_COLOR_ARRAY */
  592. ///* GL_INDEX_ARRAY */
  593. ///* GL_TEXTURE_COORD_ARRAY */
  594. ///* GL_EDGE_FLAG_ARRAY */
  595. ///* GL_VERTEX_ARRAY_SIZE */
  596. ///* GL_VERTEX_ARRAY_TYPE */
  597. ///* GL_VERTEX_ARRAY_STRIDE */
  598. ///* GL_NORMAL_ARRAY_TYPE */
  599. ///* GL_NORMAL_ARRAY_STRIDE */
  600. ///* GL_COLOR_ARRAY_SIZE */
  601. ///* GL_COLOR_ARRAY_TYPE */
  602. ///* GL_COLOR_ARRAY_STRIDE */
  603. ///* GL_INDEX_ARRAY_TYPE */
  604. ///* GL_INDEX_ARRAY_STRIDE */
  605. ///* GL_TEXTURE_COORD_ARRAY_SIZE */
  606. ///* GL_TEXTURE_COORD_ARRAY_TYPE */
  607. ///* GL_TEXTURE_COORD_ARRAY_STRIDE */
  608. ///* GL_EDGE_FLAG_ARRAY_STRIDE */
  609. ///* GL_POLYGON_OFFSET_FACTOR */
  610. ///* GL_POLYGON_OFFSET_UNITS */
  611. //
  612. ///* GetTextureParameter */
  613. ///* GL_TEXTURE_MAG_FILTER */
  614. ///* GL_TEXTURE_MIN_FILTER */
  615. ///* GL_TEXTURE_WRAP_S */
  616. ///* GL_TEXTURE_WRAP_T */
  617. //#define GL_TEXTURE_WIDTH 0x1000
  618. //#define GL_TEXTURE_HEIGHT 0x1001
  619. //#define GL_TEXTURE_INTERNAL_FORMAT 0x1003
  620. #define GL_TEXTURE_BORDER_COLOR 0x1004
  621. //#define GL_TEXTURE_BORDER 0x1005
  622. ///* GL_TEXTURE_RED_SIZE */
  623. ///* GL_TEXTURE_GREEN_SIZE */
  624. ///* GL_TEXTURE_BLUE_SIZE */
  625. ///* GL_TEXTURE_ALPHA_SIZE */
  626. ///* GL_TEXTURE_LUMINANCE_SIZE */
  627. ///* GL_TEXTURE_INTENSITY_SIZE */
  628. ///* GL_TEXTURE_PRIORITY */
  629. ///* GL_TEXTURE_RESIDENT */
  630. //
  631. ///* HintMode */
  632. //#define GL_DONT_CARE 0x1100
  633. //#define GL_FASTEST 0x1101
  634. //#define GL_NICEST 0x1102
  635. //
  636. ///* HintTarget */
  637. ///* GL_PERSPECTIVE_CORRECTION_HINT */
  638. ///* GL_POINT_SMOOTH_HINT */
  639. ///* GL_LINE_SMOOTH_HINT */
  640. ///* GL_POLYGON_SMOOTH_HINT */
  641. ///* GL_FOG_HINT */
  642. ///* GL_PHONG_HINT */
  643. //
  644. ///* IndexPointerType */
  645. ///* GL_SHORT */
  646. ///* GL_INT */
  647. ///* GL_FLOAT */
  648. ///* GL_DOUBLE */
  649. //
  650. ///* LightModelParameter */
  651. ///* GL_LIGHT_MODEL_AMBIENT */
  652. ///* GL_LIGHT_MODEL_LOCAL_VIEWER */
  653. ///* GL_LIGHT_MODEL_TWO_SIDE */
  654. //
  655. ///* LightName */
  656. //#define GL_LIGHT0 0x4000
  657. //#define GL_LIGHT1 0x4001
  658. //#define GL_LIGHT2 0x4002
  659. //#define GL_LIGHT3 0x4003
  660. //#define GL_LIGHT4 0x4004
  661. //#define GL_LIGHT5 0x4005
  662. //#define GL_LIGHT6 0x4006
  663. //#define GL_LIGHT7 0x4007
  664. //
  665. ///* LightParameter */
  666. //#define GL_AMBIENT 0x1200
  667. //#define GL_DIFFUSE 0x1201
  668. //#define GL_SPECULAR 0x1202
  669. //#define GL_POSITION 0x1203
  670. //#define GL_SPOT_DIRECTION 0x1204
  671. //#define GL_SPOT_EXPONENT 0x1205
  672. //#define GL_SPOT_CUTOFF 0x1206
  673. //#define GL_CONSTANT_ATTENUATION 0x1207
  674. //#define GL_LINEAR_ATTENUATION 0x1208
  675. //#define GL_QUADRATIC_ATTENUATION 0x1209
  676. //
  677. ///* InterleavedArrays */
  678. ///* GL_V2F */
  679. ///* GL_V3F */
  680. ///* GL_C4UB_V2F */
  681. ///* GL_C4UB_V3F */
  682. ///* GL_C3F_V3F */
  683. ///* GL_N3F_V3F */
  684. ///* GL_C4F_N3F_V3F */
  685. ///* GL_T2F_V3F */
  686. ///* GL_T4F_V4F */
  687. ///* GL_T2F_C4UB_V3F */
  688. ///* GL_T2F_C3F_V3F */
  689. ///* GL_T2F_N3F_V3F */
  690. ///* GL_T2F_C4F_N3F_V3F */
  691. ///* GL_T4F_C4F_N3F_V4F */
  692. //
  693. ///* ListMode */
  694. //#define GL_COMPILE 0x1300
  695. //#define GL_COMPILE_AND_EXECUTE 0x1301
  696. //
  697. ///* ListNameType */
  698. ///* GL_BYTE */
  699. ///* GL_UNSIGNED_BYTE */
  700. ///* GL_SHORT */
  701. ///* GL_UNSIGNED_SHORT */
  702. ///* GL_INT */
  703. ///* GL_UNSIGNED_INT */
  704. ///* GL_FLOAT */
  705. ///* GL_2_BYTES */
  706. ///* GL_3_BYTES */
  707. ///* GL_4_BYTES */
  708. //
  709. ///* LogicOp */
  710. //#define GL_CLEAR 0x1500
  711. //#define GL_AND 0x1501
  712. //#define GL_AND_REVERSE 0x1502
  713. //#define GL_COPY 0x1503
  714. //#define GL_AND_INVERTED 0x1504
  715. //#define GL_NOOP 0x1505
  716. //#define GL_XOR 0x1506
  717. //#define GL_OR 0x1507
  718. //#define GL_NOR 0x1508
  719. //#define GL_EQUIV 0x1509
  720. //#define GL_INVERT 0x150A
  721. //#define GL_OR_REVERSE 0x150B
  722. //#define GL_COPY_INVERTED 0x150C
  723. //#define GL_OR_INVERTED 0x150D
  724. //#define GL_NAND 0x150E
  725. //#define GL_SET 0x150F
  726. //
  727. ///* MapTarget */
  728. ///* GL_MAP1_COLOR_4 */
  729. ///* GL_MAP1_INDEX */
  730. ///* GL_MAP1_NORMAL */
  731. ///* GL_MAP1_TEXTURE_COORD_1 */
  732. ///* GL_MAP1_TEXTURE_COORD_2 */
  733. ///* GL_MAP1_TEXTURE_COORD_3 */
  734. ///* GL_MAP1_TEXTURE_COORD_4 */
  735. ///* GL_MAP1_VERTEX_3 */
  736. ///* GL_MAP1_VERTEX_4 */
  737. ///* GL_MAP2_COLOR_4 */
  738. ///* GL_MAP2_INDEX */
  739. ///* GL_MAP2_NORMAL */
  740. ///* GL_MAP2_TEXTURE_COORD_1 */
  741. ///* GL_MAP2_TEXTURE_COORD_2 */
  742. ///* GL_MAP2_TEXTURE_COORD_3 */
  743. ///* GL_MAP2_TEXTURE_COORD_4 */
  744. ///* GL_MAP2_VERTEX_3 */
  745. ///* GL_MAP2_VERTEX_4 */
  746. //
  747. ///* MaterialFace */
  748. ///* GL_FRONT */
  749. ///* GL_BACK */
  750. ///* GL_FRONT_AND_BACK */
  751. //
  752. ///* MaterialParameter */
  753. //#define GL_EMISSION 0x1600
  754. //#define GL_SHININESS 0x1601
  755. //#define GL_AMBIENT_AND_DIFFUSE 0x1602
  756. //#define GL_COLOR_INDEXES 0x1603
  757. ///* GL_AMBIENT */
  758. ///* GL_DIFFUSE */
  759. ///* GL_SPECULAR */
  760. //
  761. ///* MatrixMode */
  762. //#define GL_MODELVIEW 0x1700
  763. //#define GL_PROJECTION 0x1701
  764. //#define GL_TEXTURE 0x1702
  765. //
  766. ///* MeshMode1 */
  767. ///* GL_POINT */
  768. ///* GL_LINE */
  769. //
  770. ///* MeshMode2 */
  771. ///* GL_POINT */
  772. ///* GL_LINE */
  773. ///* GL_FILL */
  774. //
  775. ///* NormalPointerType */
  776. ///* GL_BYTE */
  777. ///* GL_SHORT */
  778. ///* GL_INT */
  779. ///* GL_FLOAT */
  780. ///* GL_DOUBLE */
  781. //
  782. ///* PixelCopyType */
  783. //#define GL_COLOR 0x1800
  784. //#define GL_DEPTH 0x1801
  785. //#define GL_STENCIL 0x1802
  786. //
  787. ///* PixelFormat */
  788. #define GL_COLOR_INDEX 0x1900
  789. //#define GL_STENCIL_INDEX 0x1901
  790. //#define GL_DEPTH_COMPONENT 0x1902
  791. //#define GL_RED 0x1903
  792. //#define GL_GREEN 0x1904
  793. //#define GL_BLUE 0x1905
  794. //#define GL_ALPHA 0x1906
  795. //#define GL_RGB 0x1907
  796. //#define GL_RGBA 0x1908
  797. //#define GL_LUMINANCE 0x1909
  798. //#define GL_LUMINANCE_ALPHA 0x190A
  799. //#define GL_BGR 0x80E0
  800. //#define GL_BGRA 0x80E1
  801. //
  802. ///* PixelMap */
  803. ///* GL_PIXEL_MAP_I_TO_I */
  804. ///* GL_PIXEL_MAP_S_TO_S */
  805. ///* GL_PIXEL_MAP_I_TO_R */
  806. ///* GL_PIXEL_MAP_I_TO_G */
  807. ///* GL_PIXEL_MAP_I_TO_B */
  808. ///* GL_PIXEL_MAP_I_TO_A */
  809. ///* GL_PIXEL_MAP_R_TO_R */
  810. ///* GL_PIXEL_MAP_G_TO_G */
  811. ///* GL_PIXEL_MAP_B_TO_B */
  812. ///* GL_PIXEL_MAP_A_TO_A */
  813. //
  814. ///* PixelStore */
  815. ///* GL_UNPACK_SWAP_BYTES */
  816. ///* GL_UNPACK_LSB_FIRST */
  817. ///* GL_UNPACK_ROW_LENGTH */
  818. ///* GL_UNPACK_SKIP_ROWS */
  819. ///* GL_UNPACK_SKIP_PIXELS */
  820. ///* GL_UNPACK_ALIGNMENT */
  821. ///* GL_PACK_SWAP_BYTES */
  822. ///* GL_PACK_LSB_FIRST */
  823. ///* GL_PACK_ROW_LENGTH */
  824. ///* GL_PACK_SKIP_ROWS */
  825. ///* GL_PACK_SKIP_PIXELS */
  826. ///* GL_PACK_ALIGNMENT */
  827. //
  828. ///* PixelTransfer */
  829. ///* GL_MAP_COLOR */
  830. ///* GL_MAP_STENCIL */
  831. ///* GL_INDEX_SHIFT */
  832. ///* GL_INDEX_OFFSET */
  833. ///* GL_RED_SCALE */
  834. ///* GL_RED_BIAS */
  835. ///* GL_GREEN_SCALE */
  836. ///* GL_GREEN_BIAS */
  837. ///* GL_BLUE_SCALE */
  838. ///* GL_BLUE_BIAS */
  839. ///* GL_ALPHA_SCALE */
  840. ///* GL_ALPHA_BIAS */
  841. ///* GL_DEPTH_SCALE */
  842. ///* GL_DEPTH_BIAS */
  843. //
  844. ///* PixelType */
  845. //#define GL_BITMAP 0x1A00
  846. ///* GL_BYTE */
  847. ///* GL_UNSIGNED_BYTE */
  848. ///* GL_SHORT */
  849. ///* GL_UNSIGNED_SHORT */
  850. ///* GL_INT */
  851. ///* GL_UNSIGNED_INT */
  852. ///* GL_FLOAT */
  853. //
  854. ///* PolygonMode */
  855. //#define GL_POINT 0x1B00
  856. #define GL_LINE 0x1B01
  857. #define GL_FILL 0x1B02
  858. //
  859. ///* ReadBufferMode */
  860. ///* GL_FRONT_LEFT */
  861. ///* GL_FRONT_RIGHT */
  862. ///* GL_BACK_LEFT */
  863. ///* GL_BACK_RIGHT */
  864. ///* GL_FRONT */
  865. ///* GL_BACK */
  866. ///* GL_LEFT */
  867. ///* GL_RIGHT */
  868. ///* GL_AUX0 */
  869. ///* GL_AUX1 */
  870. ///* GL_AUX2 */
  871. ///* GL_AUX3 */
  872. //
  873. ///* RenderingMode */
  874. //#define GL_RENDER 0x1C00
  875. //#define GL_FEEDBACK 0x1C01
  876. //#define GL_SELECT 0x1C02
  877. //
  878. ///* ShadingModel */
  879. //#define GL_FLAT 0x1D00
  880. //#define GL_SMOOTH 0x1D01
  881. //
  882. //
  883. ///* StencilFunction */
  884. ///* GL_NEVER */
  885. ///* GL_LESS */
  886. ///* GL_EQUAL */
  887. ///* GL_LEQUAL */
  888. ///* GL_GREATER */
  889. ///* GL_NOTEQUAL */
  890. ///* GL_GEQUAL */
  891. ///* GL_ALWAYS */
  892. //
  893. ///* StencilOp */
  894. ///* GL_ZERO */
  895. //#define GL_KEEP 0x1E00
  896. //#define GL_REPLACE 0x1E01
  897. //#define GL_INCR 0x1E02
  898. //#define GL_DECR 0x1E03
  899. ///* GL_INVERT */
  900. //
  901. ///* StringName */
  902. //#define GL_VENDOR 0x1F00
  903. //#define GL_RENDERER 0x1F01
  904. //#define GL_VERSION 0x1F02
  905. //#define GL_EXTENSIONS 0x1F03
  906. //
  907. ///* TextureCoordName */
  908. #define GL_S 0x2000
  909. #define GL_T 0x2001
  910. //#define GL_R 0x2002
  911. //#define GL_Q 0x2003
  912. //
  913. ///* TexCoordPointerType */
  914. ///* GL_SHORT */
  915. ///* GL_INT */
  916. ///* GL_FLOAT */
  917. ///* GL_DOUBLE */
  918. //
  919. ///* TextureEnvMode */
  920. //#define GL_MODULATE 0x2100
  921. //#define GL_DECAL 0x2101
  922. ///* GL_BLEND */
  923. ///* GL_REPLACE */
  924. //
  925. ///* TextureEnvParameter */
  926. //#define GL_TEXTURE_ENV_MODE 0x2200
  927. //#define GL_TEXTURE_ENV_COLOR 0x2201
  928. //
  929. ///* TextureEnvTarget */
  930. //#define GL_TEXTURE_ENV 0x2300
  931. //
  932. ///* TextureGenMode */
  933. //#define GL_EYE_LINEAR 0x2400
  934. #define GL_OBJECT_LINEAR 0x2401
  935. #define GL_SPHERE_MAP 0x2402
  936. //
  937. ///* TextureGenParameter */
  938. #define GL_TEXTURE_GEN_MODE 0x2500
  939. #define GL_OBJECT_PLANE 0x2501
  940. //#define GL_EYE_PLANE 0x2502
  941. //
  942. ///* TextureMagFilter */
  943. //#define GL_NEAREST 0x2600
  944. //#define GL_LINEAR 0x2601
  945. //
  946. ///* TextureMinFilter */
  947. ///* GL_NEAREST */
  948. ///* GL_LINEAR */
  949. //#define GL_NEAREST_MIPMAP_NEAREST 0x2700
  950. //#define GL_LINEAR_MIPMAP_NEAREST 0x2701
  951. //#define GL_NEAREST_MIPMAP_LINEAR 0x2702
  952. //#define GL_LINEAR_MIPMAP_LINEAR 0x2703
  953. //
  954. ///* TextureParameterName */
  955. //#define GL_TEXTURE_MAG_FILTER 0x2800
  956. //#define GL_TEXTURE_MIN_FILTER 0x2801
  957. //#define GL_TEXTURE_WRAP_S 0x2802
  958. //#define GL_TEXTURE_WRAP_T 0x2803
  959. ///* GL_TEXTURE_BORDER_COLOR */
  960. ///* GL_TEXTURE_PRIORITY */
  961. //
  962. ///* TextureTarget */
  963. ///* GL_TEXTURE_1D */
  964. ///* GL_TEXTURE_2D */
  965. ///* GL_PROXY_TEXTURE_1D */
  966. ///* GL_PROXY_TEXTURE_2D */
  967. //
  968. ///* TextureWrapMode */
  969. #define GL_CLAMP 0x2900
  970. //#define GL_REPEAT 0x2901
  971. //
  972. //#define GL_TEXTURE0 0x84C0
  973. //#define GL_TEXTURE1 0x84C1
  974. //#define GL_TEXTURE2 0x84C2
  975. //#define GL_TEXTURE3 0x84C3
  976. //#define GL_TEXTURE4 0x84C4
  977. //#define GL_TEXTURE5 0x84C5
  978. //#define GL_TEXTURE6 0x84C6
  979. //#define GL_TEXTURE7 0x84C7
  980. //#define GL_TEXTURE8 0x84C8
  981. //#define GL_TEXTURE9 0x84C9
  982. //#define GL_TEXTURE10 0x84CA
  983. //#define GL_TEXTURE11 0x84CB
  984. //#define GL_TEXTURE12 0x84CC
  985. //#define GL_TEXTURE13 0x84CD
  986. //#define GL_TEXTURE14 0x84CE
  987. //#define GL_TEXTURE15 0x84CF
  988. //#define GL_TEXTURE16 0x84D0
  989. //#define GL_TEXTURE17 0x84D1
  990. //#define GL_TEXTURE18 0x84D2
  991. //#define GL_TEXTURE19 0x84D3
  992. //#define GL_TEXTURE20 0x84D4
  993. //#define GL_TEXTURE21 0x84D5
  994. //#define GL_TEXTURE22 0x84D6
  995. //#define GL_TEXTURE23 0x84D7
  996. //#define GL_TEXTURE24 0x84D8
  997. //#define GL_TEXTURE25 0x84D9
  998. //#define GL_TEXTURE26 0x84DA
  999. //#define GL_TEXTURE27 0x84DB
  1000. //#define GL_TEXTURE28 0x84DC
  1001. //#define GL_TEXTURE29 0x84DD
  1002. //#define GL_TEXTURE30 0x84DE
  1003. //#define GL_TEXTURE31 0x84DF
  1004. //#define GL_ACTIVE_TEXTURE 0x84E0
  1005. //#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1
  1006. //#define GL_MAX_TEXTURE_UNITS 0x84E2
  1007. //#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3
  1008. //#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4
  1009. //#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5
  1010. //#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6
  1011. //#define GL_MULTISAMPLE 0x809D
  1012. //#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
  1013. //#define GL_SAMPLE_ALPHA_TO_ONE 0x809F
  1014. //#define GL_SAMPLE_COVERAGE 0x80A0
  1015. //#define GL_SAMPLE_BUFFERS 0x80A8
  1016. //#define GL_SAMPLES 0x80A9
  1017. //#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
  1018. //#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
  1019. //#define GL_MULTISAMPLE_BIT 0x20000000
  1020. //#define GL_NORMAL_MAP 0x8511
  1021. //#define GL_REFLECTION_MAP 0x8512
  1022. //#define GL_TEXTURE_CUBE_MAP 0x8513
  1023. //#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
  1024. //#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
  1025. //#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
  1026. //#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
  1027. //#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
  1028. //#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
  1029. //#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
  1030. //#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B
  1031. //#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
  1032. //#define GL_COMPRESSED_ALPHA 0x84E9
  1033. //#define GL_COMPRESSED_LUMINANCE 0x84EA
  1034. //#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB
  1035. //#define GL_COMPRESSED_INTENSITY 0x84EC
  1036. //#define GL_COMPRESSED_RGB 0x84ED
  1037. //#define GL_COMPRESSED_RGBA 0x84EE
  1038. //#define GL_TEXTURE_COMPRESSION_HINT 0x84EF
  1039. //#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0
  1040. //#define GL_TEXTURE_COMPRESSED 0x86A1
  1041. //#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
  1042. //#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
  1043. //#define GL_CLAMP_TO_BORDER 0x812D
  1044. //#define GL_COMBINE 0x8570
  1045. //#define GL_COMBINE_RGB 0x8571
  1046. //#define GL_COMBINE_ALPHA 0x8572
  1047. #define GL_SOURCE0_RGB 0x8580
  1048. #define GL_SOURCE1_RGB 0x8581
  1049. #define GL_SOURCE2_RGB 0x8582
  1050. #define GL_SOURCE0_ALPHA 0x8588
  1051. #define GL_SOURCE1_ALPHA 0x8589
  1052. #define GL_SOURCE2_ALPHA 0x858A
  1053. //#define GL_OPERAND0_RGB 0x8590
  1054. //#define GL_OPERAND1_RGB 0x8591
  1055. //#define GL_OPERAND2_RGB 0x8592
  1056. //#define GL_OPERAND0_ALPHA 0x8598
  1057. //#define GL_OPERAND1_ALPHA 0x8599
  1058. //#define GL_OPERAND2_ALPHA 0x859A
  1059. //#define GL_RGB_SCALE 0x8573
  1060. //#define GL_ADD_SIGNED 0x8574
  1061. //#define GL_INTERPOLATE 0x8575
  1062. //#define GL_SUBTRACT 0x84E7
  1063. //#define GL_CONSTANT 0x8576
  1064. //#define GL_PRIMARY_COLOR 0x8577
  1065. //#define GL_PREVIOUS 0x8578
  1066. //#define GL_DOT3_RGB 0x86AE
  1067. //#define GL_DOT3_RGBA 0x86AF
  1068. //
  1069. ///* VertexPointerType */
  1070. ///* GL_SHORT */
  1071. ///* GL_INT */
  1072. ///* GL_FLOAT */
  1073. ///* GL_DOUBLE */
  1074. //
  1075. ///* ClientAttribMask */
  1076. //#define GL_CLIENT_PIXEL_STORE_BIT 0x00000001
  1077. //#define GL_CLIENT_VERTEX_ARRAY_BIT 0x00000002
  1078. //#define GL_CLIENT_ALL_ATTRIB_BITS 0xffffffff
  1079. //
  1080. ///* polygon_offset */
  1081. //#define GL_POLYGON_OFFSET_FACTOR 0x8038
  1082. //#define GL_POLYGON_OFFSET_UNITS 0x2A00
  1083. //#define GL_POLYGON_OFFSET_POINT 0x2A01
  1084. //#define GL_POLYGON_OFFSET_LINE 0x2A02
  1085. //#define GL_POLYGON_OFFSET_FILL 0x8037
  1086. //
  1087. ///* texture */
  1088. //#define GL_ALPHA4 0x803B
  1089. //#define GL_ALPHA8 0x803C
  1090. //#define GL_ALPHA12 0x803D
  1091. //#define GL_ALPHA16 0x803E
  1092. //#define GL_LUMINANCE4 0x803F
  1093. //#define GL_LUMINANCE8 0x8040
  1094. //#define GL_LUMINANCE12 0x8041
  1095. //#define GL_LUMINANCE16 0x8042
  1096. //#define GL_LUMINANCE4_ALPHA4 0x8043
  1097. //#define GL_LUMINANCE6_ALPHA2 0x8044
  1098. //#define GL_LUMINANCE8_ALPHA8 0x8045
  1099. //#define GL_LUMINANCE12_ALPHA4 0x8046
  1100. //#define GL_LUMINANCE12_ALPHA12 0x8047
  1101. //#define GL_LUMINANCE16_ALPHA16 0x8048
  1102. #define GL_INTENSITY 0x8049
  1103. //#define GL_INTENSITY4 0x804A
  1104. //#define GL_INTENSITY8 0x804B
  1105. //#define GL_INTENSITY12 0x804C
  1106. //#define GL_INTENSITY16 0x804D
  1107. //#define GL_R3_G3_B2 0x2A10
  1108. //#define GL_RGB4 0x804F
  1109. #define GL_RGB5 0x8050
  1110. #define GL_RGB8 0x8051
  1111. //#define GL_RGB10 0x8052
  1112. //#define GL_RGB12 0x8053
  1113. //#define GL_RGB16 0x8054
  1114. //#define GL_RGBA2 0x8055
  1115. #define GL_RGBA4 0x8056
  1116. #define GL_RGB5_A1 0x8057
  1117. #define GL_RGBA8 0x8058
  1118. //#define GL_RGB10_A2 0x8059
  1119. //#define GL_RGBA12 0x805A
  1120. //#define GL_RGBA16 0x805B
  1121. //#define GL_TEXTURE_RED_SIZE 0x805C
  1122. //#define GL_TEXTURE_GREEN_SIZE 0x805D
  1123. //#define GL_TEXTURE_BLUE_SIZE 0x805E
  1124. //#define GL_TEXTURE_ALPHA_SIZE 0x805F
  1125. //#define GL_TEXTURE_LUMINANCE_SIZE 0x8060
  1126. //#define GL_TEXTURE_INTENSITY_SIZE 0x8061
  1127. //#define GL_PROXY_TEXTURE_1D 0x8063
  1128. //#define GL_PROXY_TEXTURE_2D 0x8064
  1129. //
  1130. ///* texture_object */
  1131. //#define GL_TEXTURE_PRIORITY 0x8066
  1132. //#define GL_TEXTURE_RESIDENT 0x8067
  1133. //#define GL_TEXTURE_BINDING_1D 0x8068
  1134. //#define GL_TEXTURE_BINDING_2D 0x8069
  1135. //
  1136. ///* vertex_array */
  1137. //#define GL_VERTEX_ARRAY 0x8074
  1138. //#define GL_NORMAL_ARRAY 0x8075
  1139. //#define GL_COLOR_ARRAY 0x8076
  1140. //#define GL_INDEX_ARRAY 0x8077
  1141. //#define GL_TEXTURE_COORD_ARRAY 0x8078
  1142. //#define GL_EDGE_FLAG_ARRAY 0x8079
  1143. //#define GL_VERTEX_ARRAY_SIZE 0x807A
  1144. //#define GL_VERTEX_ARRAY_TYPE 0x807B
  1145. //#define GL_VERTEX_ARRAY_STRIDE 0x807C
  1146. //#define GL_NORMAL_ARRAY_TYPE 0x807E
  1147. //#define GL_NORMAL_ARRAY_STRIDE 0x807F
  1148. //#define GL_COLOR_ARRAY_SIZE 0x8081
  1149. //#define GL_COLOR_ARRAY_TYPE 0x8082
  1150. //#define GL_COLOR_ARRAY_STRIDE 0x8083
  1151. //#define GL_INDEX_ARRAY_TYPE 0x8085
  1152. //#define GL_INDEX_ARRAY_STRIDE 0x8086
  1153. //#define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088
  1154. //#define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089
  1155. //#define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A
  1156. //#define GL_EDGE_FLAG_ARRAY_STRIDE 0x808C
  1157. //#define GL_VERTEX_ARRAY_POINTER 0x808E
  1158. //#define GL_NORMAL_ARRAY_POINTER 0x808F
  1159. //#define GL_COLOR_ARRAY_POINTER 0x8090
  1160. //#define GL_INDEX_ARRAY_POINTER 0x8091
  1161. //#define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092
  1162. //#define GL_EDGE_FLAG_ARRAY_POINTER 0x8093
  1163. //#define GL_V2F 0x2A20
  1164. //#define GL_V3F 0x2A21
  1165. //#define GL_C4UB_V2F 0x2A22
  1166. //#define GL_C4UB_V3F 0x2A23
  1167. //#define GL_C3F_V3F 0x2A24
  1168. //#define GL_N3F_V3F 0x2A25
  1169. //#define GL_C4F_N3F_V3F 0x2A26
  1170. //#define GL_T2F_V3F 0x2A27
  1171. //#define GL_T4F_V4F 0x2A28
  1172. //#define GL_T2F_C4UB_V3F 0x2A29
  1173. //#define GL_T2F_C3F_V3F 0x2A2A
  1174. //#define GL_T2F_N3F_V3F 0x2A2B
  1175. //#define GL_T2F_C4F_N3F_V3F 0x2A2C
  1176. //#define GL_T4F_C4F_N3F_V4F 0x2A2D
  1177. //
  1178. ///* Extensions */
  1179. //#define GL_EXT_vertex_array 1
  1180. //#define GL_EXT_bgra 1
  1181. //#define GL_EXT_paletted_texture 1
  1182. //#define GL_WIN_swap_hint 1
  1183. //#define GL_WIN_draw_range_elements 1
  1184. //// #define GL_WIN_phong_shading 1
  1185. //// #define GL_WIN_specular_fog 1
  1186. //
  1187. ///* EXT_vertex_array */
  1188. //#define GL_VERTEX_ARRAY_EXT 0x8074
  1189. //#define GL_NORMAL_ARRAY_EXT 0x8075
  1190. //#define GL_COLOR_ARRAY_EXT 0x8076
  1191. //#define GL_INDEX_ARRAY_EXT 0x8077
  1192. //#define GL_TEXTURE_COORD_ARRAY_EXT 0x8078
  1193. //#define GL_EDGE_FLAG_ARRAY_EXT 0x8079
  1194. //#define GL_VERTEX_ARRAY_SIZE_EXT 0x807A
  1195. //#define GL_VERTEX_ARRAY_TYPE_EXT 0x807B
  1196. //#define GL_VERTEX_ARRAY_STRIDE_EXT 0x807C
  1197. //#define GL_VERTEX_ARRAY_COUNT_EXT 0x807D
  1198. //#define GL_NORMAL_ARRAY_TYPE_EXT 0x807E
  1199. //#define GL_NORMAL_ARRAY_STRIDE_EXT 0x807F
  1200. //#define GL_NORMAL_ARRAY_COUNT_EXT 0x8080
  1201. //#define GL_COLOR_ARRAY_SIZE_EXT 0x8081
  1202. //#define GL_COLOR_ARRAY_TYPE_EXT 0x8082
  1203. //#define GL_COLOR_ARRAY_STRIDE_EXT 0x8083
  1204. //#define GL_COLOR_ARRAY_COUNT_EXT 0x8084
  1205. //#define GL_INDEX_ARRAY_TYPE_EXT 0x8085
  1206. //#define GL_INDEX_ARRAY_STRIDE_EXT 0x8086
  1207. //#define GL_INDEX_ARRAY_COUNT_EXT 0x8087
  1208. //#define GL_TEXTURE_COORD_ARRAY_SIZE_EXT 0x8088
  1209. //#define GL_TEXTURE_COORD_ARRAY_TYPE_EXT 0x8089
  1210. //#define GL_TEXTURE_COORD_ARRAY_STRIDE_EXT 0x808A
  1211. //#define GL_TEXTURE_COORD_ARRAY_COUNT_EXT 0x808B
  1212. //#define GL_EDGE_FLAG_ARRAY_STRIDE_EXT 0x808C
  1213. //#define GL_EDGE_FLAG_ARRAY_COUNT_EXT 0x808D
  1214. //#define GL_VERTEX_ARRAY_POINTER_EXT 0x808E
  1215. //#define GL_NORMAL_ARRAY_POINTER_EXT 0x808F
  1216. //#define GL_COLOR_ARRAY_POINTER_EXT 0x8090
  1217. //#define GL_INDEX_ARRAY_POINTER_EXT 0x8091
  1218. //#define GL_TEXTURE_COORD_ARRAY_POINTER_EXT 0x8092
  1219. //#define GL_EDGE_FLAG_ARRAY_POINTER_EXT 0x8093
  1220. //#define GL_DOUBLE_EXT GL_DOUBLE
  1221. //
  1222. ///* EXT_bgra */
  1223. //#define GL_BGR_EXT 0x80E0
  1224. #define GL_BGRA_EXT 0x80E1
  1225. //
  1226. ///* Extensions */
  1227. //#define GL_EXT_abgr 1
  1228. //#define GL_EXT_blend_color 1
  1229. //#define GL_EXT_blend_minmax 1
  1230. //#define GL_EXT_blend_subtract 1
  1231. //
  1232. ///* EXT_abgr */
  1233. //#define GL_ABGR_EXT 0x8000
  1234. //
  1235. ///* EXT_blend_color */
  1236. #define GL_CONSTANT_COLOR_EXT 0x8001
  1237. //#define GL_ONE_MINUS_CONSTANT_COLOR_EXT 0x8002
  1238. //#define GL_CONSTANT_ALPHA_EXT 0x8003
  1239. //#define GL_ONE_MINUS_CONSTANT_ALPHA_EXT 0x8004
  1240. #define GL_BLEND_COLOR_EXT 0x8005
  1241. //
  1242. ///* EXT_blend_minmax */
  1243. #define GL_FUNC_ADD_EXT 0x8006
  1244. //#define GL_MIN_EXT 0x8007
  1245. //#define GL_MAX_EXT 0x8008
  1246. //#define GL_BLEND_EQUATION_EXT 0x8009
  1247. //
  1248. ///* EXT_blend_subtract */
  1249. //#define GL_FUNC_SUBTRACT_EXT 0x800A
  1250. //#define GL_FUNC_REVERSE_SUBTRACT_EXT 0x800B
  1251. //
  1252. ///* EXT_paletted_texture */
  1253. //
  1254. ///* These must match the GL_COLOR_TABLE_*_SGI enumerants */
  1255. //#define GL_COLOR_TABLE_FORMAT_EXT 0x80D8
  1256. //#define GL_COLOR_TABLE_WIDTH_EXT 0x80D9
  1257. //#define GL_COLOR_TABLE_RED_SIZE_EXT 0x80DA
  1258. //#define GL_COLOR_TABLE_GREEN_SIZE_EXT 0x80DB
  1259. //#define GL_COLOR_TABLE_BLUE_SIZE_EXT 0x80DC
  1260. //#define GL_COLOR_TABLE_ALPHA_SIZE_EXT 0x80DD
  1261. //#define GL_COLOR_TABLE_LUMINANCE_SIZE_EXT 0x80DE
  1262. //#define GL_COLOR_TABLE_INTENSITY_SIZE_EXT 0x80DF
  1263. //
  1264. //#define GL_COLOR_INDEX1_EXT 0x80E2
  1265. //#define GL_COLOR_INDEX2_EXT 0x80E3
  1266. //#define GL_COLOR_INDEX4_EXT 0x80E4
  1267. #define GL_COLOR_INDEX8_EXT 0x80E5
  1268. //#define GL_COLOR_INDEX12_EXT 0x80E6
  1269. //#define GL_COLOR_INDEX16_EXT 0x80E7
  1270. //
  1271. ///* WIN_draw_range_elements */
  1272. //#define GL_MAX_ELEMENTS_VERTICES_WIN 0x80E8
  1273. //#define GL_MAX_ELEMENTS_INDICES_WIN 0x80E9
  1274. //
  1275. ///* WIN_phong_shading */
  1276. //#define GL_PHONG_WIN 0x80EA
  1277. //#define GL_PHONG_HINT_WIN 0x80EB
  1278. //
  1279. ///* WIN_specular_fog */
  1280. //#define GL_FOG_SPECULAR_TEXTURE_WIN 0x80EC
  1281. //
  1282. ///* For compatibility with OpenGL v1.0 */
  1283. //#define GL_LOGIC_OP GL_INDEX_LOGIC_OP
  1284. //#define GL_TEXTURE_COMPONENTS GL_TEXTURE_INTERNAL_FORMAT
  1285. //
  1286. //// Pi
  1287. //#ifndef M_PI
  1288. //#define M_PI 3.1415926f
  1289. //#endif
  1290. //
  1291. //#ifndef EGL_FALSE
  1292. //#define EGL_FALSE 0
  1293. //#endif
  1294. //
  1295. //#ifndef EGL_TRUE
  1296. //#define EGL_TRUE 1
  1297. //#endif
  1298. //
  1299. //#define EGL_DRAW 0x3059
  1300. //#define EGL_READ 0x305A
  1301. //
  1302. //typedef void * EGLDisplay;
  1303. //typedef void * EGLConfig;
  1304. //typedef void * EGLSurface;
  1305. //typedef void * EGLContext;
  1306. //
  1307. //typedef int EGLBoolean;
  1308. //typedef unsigned int EGLint;
  1309. //
  1310. //
  1311. //#define EGL_DEFAULT_DISPLAY ((NativeDisplayType)0)
  1312. //#define EGL_NO_CONTEXT ((EGLContext)0)
  1313. //#define EGL_NO_DISPLAY ((EGLDisplay)0)
  1314. //#define EGL_NO_SURFACE ((EGLSurface)0)
  1315. //
  1316. //typedef void* NativeDisplayType;
  1317. //typedef void* NativeWindowType;
  1318. //typedef void* NativePixmapType;
  1319. #define GL_TEXTURE0_ARB 0x84C0
  1320. #define GL_TEXTURE1_ARB 0x84C1
  1321. #define GL_TEXTURE2_ARB 0x84C2
  1322. #define GL_TEXTURE3_ARB 0x84C3
  1323. //#define GL_TEXTURE4_ARB 0x84C4
  1324. //#define GL_TEXTURE5_ARB 0x84C5
  1325. //#define GL_TEXTURE6_ARB 0x84C6
  1326. //#define GL_TEXTURE7_ARB 0x84C7
  1327. //#define GL_TEXTURE8_ARB 0x84C8
  1328. //#define GL_TEXTURE9_ARB 0x84C9
  1329. //#define GL_TEXTURE10_ARB 0x84CA
  1330. //#define GL_TEXTURE11_ARB 0x84CB
  1331. //#define GL_TEXTURE12_ARB 0x84CC
  1332. //#define GL_TEXTURE13_ARB 0x84CD
  1333. //#define GL_TEXTURE14_ARB 0x84CE
  1334. //#define GL_TEXTURE15_ARB 0x84CF
  1335. //#define GL_TEXTURE16_ARB 0x84D0
  1336. //#define GL_TEXTURE17_ARB 0x84D1
  1337. //#define GL_TEXTURE18_ARB 0x84D2
  1338. //#define GL_TEXTURE19_ARB 0x84D3
  1339. //#define GL_TEXTURE20_ARB 0x84D4
  1340. //#define GL_TEXTURE21_ARB 0x84D5
  1341. //#define GL_TEXTURE22_ARB 0x84D6
  1342. //#define GL_TEXTURE23_ARB 0x84D7
  1343. //#define GL_TEXTURE24_ARB 0x84D8
  1344. //#define GL_TEXTURE25_ARB 0x84D9
  1345. //#define GL_TEXTURE26_ARB 0x84DA
  1346. //#define GL_TEXTURE27_ARB 0x84DB
  1347. //#define GL_TEXTURE28_ARB 0x84DC
  1348. //#define GL_TEXTURE29_ARB 0x84DD
  1349. //#define GL_TEXTURE30_ARB 0x84DE
  1350. //#define GL_TEXTURE31_ARB 0x84DF
  1351. //#define GL_ACTIVE_TEXTURE_ARB 0x84E0
  1352. //#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1
  1353. #define GL_MAX_TEXTURE_UNITS_ARB 0x84E2
  1354. //
  1355. //#define GL_COMPRESSED_ALPHA_ARB 0x84E9
  1356. //#define GL_COMPRESSED_LUMINANCE_ARB 0x84EA
  1357. //#define GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB
  1358. //#define GL_COMPRESSED_INTENSITY_ARB 0x84EC
  1359. #define GL_COMPRESSED_RGB_ARB 0x84ED
  1360. #define GL_COMPRESSED_RGBA_ARB 0x84EE
  1361. #define GL_TEXTURE_COMPRESSION_HINT_ARB 0x84EF
  1362. //#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0
  1363. //#define GL_TEXTURE_COMPRESSED_ARB 0x86A1
  1364. //#define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2
  1365. //#define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3
  1366. #ifndef GL_UNSIGNED_SHORT_1_5_5_5_REV
  1367. #define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
  1368. #endif
  1369. //
  1370. // ------------------------------------------------------------------------------------------------------
  1371. // Only function prototypes that were actually used in TGE are
  1372. // listed here
  1373. // ------------------------------------------------------------------------------------------------------
  1374. // straightforward conversions
  1375. #define glColor3f(r,g,b) glColor4f(r,g,b,1)
  1376. #define GLdouble F64
  1377. #define glOrtho( left, right, bottom, top, near, far ) glOrthof( left, right, bottom, top, near, far )
  1378. #define glFrustum( left, right, bottom, top, near, far ) glFrustumf( left, right, bottom, top, near, far )
  1379. #define glDepthRange( near, far ) glDepthRangef( near, far )
  1380. // functions that need workarounds
  1381. void glBegin( GLint );
  1382. void glEnd();
  1383. void glTexCoord2f( GLfloat, GLfloat );
  1384. void glActiveTextureARB( GLint );
  1385. void glMultiTexCoord2fARB( GLint, GLfloat, GLfloat);
  1386. void glPushAttrib( GLint );
  1387. void glPopAttrib();
  1388. void glReadBuffer( GLint );
  1389. void glVertex3f( GLfloat, GLfloat, GLfloat );
  1390. void glVertex2f( GLfloat, GLfloat );
  1391. void glVertex2i( GLint, GLint );
  1392. void glClientActiveTextureARB( GLint );
  1393. void glVertex3fv( const F32 * );
  1394. void glVertex2fv( const F32 * );
  1395. void glNormal3fv( const F32 * );
  1396. void glColor3fv( const F32 * );
  1397. void glColor4fv( const F32 * );
  1398. void glColor3i( GLint, GLint, GLint );
  1399. void glColor3ubv( const GLubyte *v );
  1400. void glColor4ubv( const GLubyte *v );
  1401. void glRecti( GLint, GLint, GLint, GLint );
  1402. void glGetDoublev( GLint, GLdouble * );
  1403. void glPolygonMode( GLint, GLint );
  1404. void glLockArraysEXT( GLint, GLint );
  1405. void glUnlockArraysEXT();
  1406. void glColor3ub( GLint, GLint, GLint );
  1407. void glFogi( GLint, GLint );
  1408. // PUAP -Mat see comment in mm file
  1409. //void glDrawBuffer( GLint );
  1410. void glColorTableEXT( GLint, GLint, GLint, GLint, GLint, const ColorI * );
  1411. void glBlendColorEXT( GLfloat, GLfloat, GLfloat, GLfloat );
  1412. void glBlendEquationEXT( GLint );
  1413. void glArrayElement( GLint );
  1414. void glFogCoordPointerEXT(GLenum, GLsizei, void *);
  1415. void glTexGeni( GLenum coord, GLenum pname, GLint param );
  1416. void glTexGenfv( GLenum coord, GLenum pname, const GLfloat *params );
  1417. void glClipPlane( GLuint plane, GLdouble * equation );
  1418. GLboolean glAreTexturesResident( GLsizei, const GLuint *, GLboolean*);
  1419. void gluOrtho2D( GLfloat, GLfloat, GLfloat, GLfloat );
  1420. GLint gluProject( GLdouble winx, GLdouble winy, GLdouble winz, const F64 *model, const F64 * proj, const GLint * vp, F64 * x, F64 * y, F64 * z );
  1421. GLint gluUnProject( GLdouble winx, GLdouble winy, GLdouble winz, const F64 *model, const F64 * proj, const GLint * vp, F64 * x, F64 * y, F64 * z );
  1422. #endif //_GL2ES_H_