Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1246 lines
43 KiB

  1. #ifndef EMUGL_INCLUDED
  2. #define EMUGL_INCLUDED
  3. #define D3D_OVERLOADS
  4. #include "d3d8.h"
  5. #include "EmulateOpenGL_llist.hpp"
  6. typedef unsigned int GLenum;
  7. typedef unsigned char GLboolean;
  8. typedef unsigned int GLbitfield;
  9. typedef signed char GLbyte;
  10. typedef short GLshort;
  11. typedef int GLint;
  12. typedef int GLsizei;
  13. typedef unsigned char GLubyte;
  14. typedef unsigned short GLushort;
  15. typedef unsigned int GLuint;
  16. typedef float GLfloat;
  17. typedef float GLclampf;
  18. typedef double GLdouble;
  19. typedef double GLclampd;
  20. typedef void GLvoid;
  21. //#define DODPFS
  22. /* Version */
  23. #define GL_VERSION_1_1 1
  24. /* AccumOp */
  25. #define GL_ACCUM 0x0100
  26. #define GL_LOAD 0x0101
  27. #define GL_RETURN 0x0102
  28. #define GL_MULT 0x0103
  29. #define GL_ADD 0x0104
  30. /* AlphaFunction */
  31. #define GL_NEVER 0x0200
  32. #define GL_LESS 0x0201
  33. #define GL_EQUAL 0x0202
  34. #define GL_LEQUAL 0x0203
  35. #define GL_GREATER 0x0204
  36. #define GL_NOTEQUAL 0x0205
  37. #define GL_GEQUAL 0x0206
  38. #define GL_ALWAYS 0x0207
  39. /* AttribMask */
  40. #define GL_CURRENT_BIT 0x00000001
  41. #define GL_POINT_BIT 0x00000002
  42. #define GL_LINE_BIT 0x00000004
  43. #define GL_POLYGON_BIT 0x00000008
  44. #define GL_POLYGON_STIPPLE_BIT 0x00000010
  45. #define GL_PIXEL_MODE_BIT 0x00000020
  46. #define GL_LIGHTING_BIT 0x00000040
  47. #define GL_FOG_BIT 0x00000080
  48. #define GL_DEPTH_BUFFER_BIT 0x00000100
  49. #define GL_ACCUM_BUFFER_BIT 0x00000200
  50. #define GL_STENCIL_BUFFER_BIT 0x00000400
  51. #define GL_VIEWPORT_BIT 0x00000800
  52. #define GL_TRANSFORM_BIT 0x00001000
  53. #define GL_ENABLE_BIT 0x00002000
  54. #define GL_COLOR_BUFFER_BIT 0x00004000
  55. #define GL_HINT_BIT 0x00008000
  56. #define GL_EVAL_BIT 0x00010000
  57. #define GL_LIST_BIT 0x00020000
  58. #define GL_TEXTURE_BIT 0x00040000
  59. #define GL_SCISSOR_BIT 0x00080000
  60. #define GL_ALL_ATTRIB_BITS 0x000fffff
  61. /* BeginMode */
  62. #define GL_POINTS 0x0000
  63. #define GL_LINES 0x0001
  64. #define GL_LINE_LOOP 0x0002
  65. #define GL_LINE_STRIP 0x0003
  66. #define GL_TRIANGLES 0x0004
  67. #define GL_TRIANGLE_STRIP 0x0005
  68. #define GL_TRIANGLE_FAN 0x0006
  69. #define GL_QUADS 0x0007
  70. #define GL_QUAD_STRIP 0x0008
  71. #define GL_POLYGON 0x0009
  72. /* BlendingFactorDest */
  73. #define GL_ZERO 0
  74. #define GL_ONE 1
  75. #define GL_SRC_COLOR 0x0300
  76. #define GL_ONE_MINUS_SRC_COLOR 0x0301
  77. #define GL_SRC_ALPHA 0x0302
  78. #define GL_ONE_MINUS_SRC_ALPHA 0x0303
  79. #define GL_DST_ALPHA 0x0304
  80. #define GL_ONE_MINUS_DST_ALPHA 0x0305
  81. /* BlendingFactorSrc */
  82. /* GL_ZERO */
  83. /* GL_ONE */
  84. #define GL_DST_COLOR 0x0306
  85. #define GL_ONE_MINUS_DST_COLOR 0x0307
  86. #define GL_SRC_ALPHA_SATURATE 0x0308
  87. /* GL_SRC_ALPHA */
  88. /* GL_ONE_MINUS_SRC_ALPHA */
  89. /* GL_DST_ALPHA */
  90. /* GL_ONE_MINUS_DST_ALPHA */
  91. /* Boolean */
  92. #define GL_TRUE 1
  93. #define GL_FALSE 0
  94. /* ClearBufferMask */
  95. /* GL_COLOR_BUFFER_BIT */
  96. /* GL_ACCUM_BUFFER_BIT */
  97. /* GL_STENCIL_BUFFER_BIT */
  98. /* GL_DEPTH_BUFFER_BIT */
  99. /* ClientArrayType */
  100. /* GL_VERTEX_ARRAY */
  101. /* GL_NORMAL_ARRAY */
  102. /* GL_COLOR_ARRAY */
  103. /* GL_INDEX_ARRAY */
  104. /* GL_TEXTURE_COORD_ARRAY */
  105. /* GL_EDGE_FLAG_ARRAY */
  106. /* ClipPlaneName */
  107. #define GL_CLIP_PLANE0 0x3000
  108. #define GL_CLIP_PLANE1 0x3001
  109. #define GL_CLIP_PLANE2 0x3002
  110. #define GL_CLIP_PLANE3 0x3003
  111. #define GL_CLIP_PLANE4 0x3004
  112. #define GL_CLIP_PLANE5 0x3005
  113. /* ColorMaterialFace */
  114. /* GL_FRONT */
  115. /* GL_BACK */
  116. /* GL_FRONT_AND_BACK */
  117. /* ColorMaterialParameter */
  118. /* GL_AMBIENT */
  119. /* GL_DIFFUSE */
  120. /* GL_SPECULAR */
  121. /* GL_EMISSION */
  122. /* GL_AMBIENT_AND_DIFFUSE */
  123. /* ColorPointerType */
  124. /* GL_BYTE */
  125. /* GL_UNSIGNED_BYTE */
  126. /* GL_SHORT */
  127. /* GL_UNSIGNED_SHORT */
  128. /* GL_INT */
  129. /* GL_UNSIGNED_INT */
  130. /* GL_FLOAT */
  131. /* GL_DOUBLE */
  132. /* CullFaceMode */
  133. /* GL_FRONT */
  134. /* GL_BACK */
  135. /* GL_FRONT_AND_BACK */
  136. /* DataType */
  137. #define GL_BYTE 0x1400
  138. #define GL_UNSIGNED_BYTE 0x1401
  139. #define GL_SHORT 0x1402
  140. #define GL_UNSIGNED_SHORT 0x1403
  141. #define GL_INT 0x1404
  142. #define GL_UNSIGNED_INT 0x1405
  143. #define GL_FLOAT 0x1406
  144. #define GL_2_BYTES 0x1407
  145. #define GL_3_BYTES 0x1408
  146. #define GL_4_BYTES 0x1409
  147. #define GL_DOUBLE 0x140A
  148. /* DepthFunction */
  149. /* GL_NEVER */
  150. /* GL_LESS */
  151. /* GL_EQUAL */
  152. /* GL_LEQUAL */
  153. /* GL_GREATER */
  154. /* GL_NOTEQUAL */
  155. /* GL_GEQUAL */
  156. /* GL_ALWAYS */
  157. /* DrawBufferMode */
  158. #define GL_NONE 0
  159. #define GL_FRONT_LEFT 0x0400
  160. #define GL_FRONT_RIGHT 0x0401
  161. #define GL_BACK_LEFT 0x0402
  162. #define GL_BACK_RIGHT 0x0403
  163. #define GL_FRONT 0x0404
  164. #define GL_BACK 0x0405
  165. #define GL_LEFT 0x0406
  166. #define GL_RIGHT 0x0407
  167. #define GL_FRONT_AND_BACK 0x0408
  168. #define GL_AUX0 0x0409
  169. #define GL_AUX1 0x040A
  170. #define GL_AUX2 0x040B
  171. #define GL_AUX3 0x040C
  172. /* Enable */
  173. /* GL_FOG */
  174. /* GL_LIGHTING */
  175. /* GL_TEXTURE_1D */
  176. /* GL_TEXTURE_2D */
  177. /* GL_LINE_STIPPLE */
  178. /* GL_POLYGON_STIPPLE */
  179. /* GL_CULL_FACE */
  180. /* GL_ALPHA_TEST */
  181. /* GL_BLEND */
  182. /* GL_INDEX_LOGIC_OP */
  183. /* GL_COLOR_LOGIC_OP */
  184. /* GL_DITHER */
  185. /* GL_STENCIL_TEST */
  186. /* GL_DEPTH_TEST */
  187. /* GL_CLIP_PLANE0 */
  188. /* GL_CLIP_PLANE1 */
  189. /* GL_CLIP_PLANE2 */
  190. /* GL_CLIP_PLANE3 */
  191. /* GL_CLIP_PLANE4 */
  192. /* GL_CLIP_PLANE5 */
  193. /* GL_LIGHT0 */
  194. /* GL_LIGHT1 */
  195. /* GL_LIGHT2 */
  196. /* GL_LIGHT3 */
  197. /* GL_LIGHT4 */
  198. /* GL_LIGHT5 */
  199. /* GL_LIGHT6 */
  200. /* GL_LIGHT7 */
  201. /* GL_TEXTURE_GEN_S */
  202. /* GL_TEXTURE_GEN_T */
  203. /* GL_TEXTURE_GEN_R */
  204. /* GL_TEXTURE_GEN_Q */
  205. /* GL_MAP1_VERTEX_3 */
  206. /* GL_MAP1_VERTEX_4 */
  207. /* GL_MAP1_COLOR_4 */
  208. /* GL_MAP1_INDEX */
  209. /* GL_MAP1_NORMAL */
  210. /* GL_MAP1_TEXTURE_COORD_1 */
  211. /* GL_MAP1_TEXTURE_COORD_2 */
  212. /* GL_MAP1_TEXTURE_COORD_3 */
  213. /* GL_MAP1_TEXTURE_COORD_4 */
  214. /* GL_MAP2_VERTEX_3 */
  215. /* GL_MAP2_VERTEX_4 */
  216. /* GL_MAP2_COLOR_4 */
  217. /* GL_MAP2_INDEX */
  218. /* GL_MAP2_NORMAL */
  219. /* GL_MAP2_TEXTURE_COORD_1 */
  220. /* GL_MAP2_TEXTURE_COORD_2 */
  221. /* GL_MAP2_TEXTURE_COORD_3 */
  222. /* GL_MAP2_TEXTURE_COORD_4 */
  223. /* GL_POINT_SMOOTH */
  224. /* GL_LINE_SMOOTH */
  225. /* GL_POLYGON_SMOOTH */
  226. /* GL_SCISSOR_TEST */
  227. /* GL_COLOR_MATERIAL */
  228. /* GL_NORMALIZE */
  229. /* GL_AUTO_NORMAL */
  230. /* GL_VERTEX_ARRAY */
  231. /* GL_NORMAL_ARRAY */
  232. /* GL_COLOR_ARRAY */
  233. /* GL_INDEX_ARRAY */
  234. /* GL_TEXTURE_COORD_ARRAY */
  235. /* GL_EDGE_FLAG_ARRAY */
  236. /* GL_POLYGON_OFFSET_POINT */
  237. /* GL_POLYGON_OFFSET_LINE */
  238. /* GL_POLYGON_OFFSET_FILL */
  239. /* ErrorCode */
  240. #define GL_NO_ERROR 0
  241. #define GL_INVALID_ENUM 0x0500
  242. #define GL_INVALID_VALUE 0x0501
  243. #define GL_INVALID_OPERATION 0x0502
  244. #define GL_STACK_OVERFLOW 0x0503
  245. #define GL_STACK_UNDERFLOW 0x0504
  246. #define GL_OUT_OF_MEMORY 0x0505
  247. /* FeedBackMode */
  248. #define GL_2D 0x0600
  249. #define GL_3D 0x0601
  250. #define GL_3D_COLOR 0x0602
  251. #define GL_3D_COLOR_TEXTURE 0x0603
  252. #define GL_4D_COLOR_TEXTURE 0x0604
  253. /* FeedBackToken */
  254. #define GL_PASS_THROUGH_TOKEN 0x0700
  255. #define GL_POINT_TOKEN 0x0701
  256. #define GL_LINE_TOKEN 0x0702
  257. #define GL_POLYGON_TOKEN 0x0703
  258. #define GL_BITMAP_TOKEN 0x0704
  259. #define GL_DRAW_PIXEL_TOKEN 0x0705
  260. #define GL_COPY_PIXEL_TOKEN 0x0706
  261. #define GL_LINE_RESET_TOKEN 0x0707
  262. /* FogMode */
  263. /* GL_LINEAR */
  264. #define GL_EXP 0x0800
  265. #define GL_EXP2 0x0801
  266. /* FogParameter */
  267. /* GL_FOG_COLOR */
  268. /* GL_FOG_DENSITY */
  269. /* GL_FOG_END */
  270. /* GL_FOG_INDEX */
  271. /* GL_FOG_MODE */
  272. /* GL_FOG_START */
  273. /* FrontFaceDirection */
  274. #define GL_CW 0x0900
  275. #define GL_CCW 0x0901
  276. /* GetMapTarget */
  277. #define GL_COEFF 0x0A00
  278. #define GL_ORDER 0x0A01
  279. #define GL_DOMAIN 0x0A02
  280. /* GetPixelMap */
  281. /* GL_PIXEL_MAP_I_TO_I */
  282. /* GL_PIXEL_MAP_S_TO_S */
  283. /* GL_PIXEL_MAP_I_TO_R */
  284. /* GL_PIXEL_MAP_I_TO_G */
  285. /* GL_PIXEL_MAP_I_TO_B */
  286. /* GL_PIXEL_MAP_I_TO_A */
  287. /* GL_PIXEL_MAP_R_TO_R */
  288. /* GL_PIXEL_MAP_G_TO_G */
  289. /* GL_PIXEL_MAP_B_TO_B */
  290. /* GL_PIXEL_MAP_A_TO_A */
  291. /* GetPointerTarget */
  292. /* GL_VERTEX_ARRAY_POINTER */
  293. /* GL_NORMAL_ARRAY_POINTER */
  294. /* GL_COLOR_ARRAY_POINTER */
  295. /* GL_INDEX_ARRAY_POINTER */
  296. /* GL_TEXTURE_COORD_ARRAY_POINTER */
  297. /* GL_EDGE_FLAG_ARRAY_POINTER */
  298. /* GetTarget */
  299. #define GL_CURRENT_COLOR 0x0B00
  300. #define GL_CURRENT_INDEX 0x0B01
  301. #define GL_CURRENT_NORMAL 0x0B02
  302. #define GL_CURRENT_TEXTURE_COORDS 0x0B03
  303. #define GL_CURRENT_RASTER_COLOR 0x0B04
  304. #define GL_CURRENT_RASTER_INDEX 0x0B05
  305. #define GL_CURRENT_RASTER_TEXTURE_COORDS 0x0B06
  306. #define GL_CURRENT_RASTER_POSITION 0x0B07
  307. #define GL_CURRENT_RASTER_POSITION_VALID 0x0B08
  308. #define GL_CURRENT_RASTER_DISTANCE 0x0B09
  309. #define GL_POINT_SMOOTH 0x0B10
  310. #define GL_POINT_SIZE 0x0B11
  311. #define GL_POINT_SIZE_RANGE 0x0B12
  312. #define GL_POINT_SIZE_GRANULARITY 0x0B13
  313. #define GL_LINE_SMOOTH 0x0B20
  314. #define GL_LINE_WIDTH 0x0B21
  315. #define GL_LINE_WIDTH_RANGE 0x0B22
  316. #define GL_LINE_WIDTH_GRANULARITY 0x0B23
  317. #define GL_LINE_STIPPLE 0x0B24
  318. #define GL_LINE_STIPPLE_PATTERN 0x0B25
  319. #define GL_LINE_STIPPLE_REPEAT 0x0B26
  320. #define GL_LIST_MODE 0x0B30
  321. #define GL_MAX_LIST_NESTING 0x0B31
  322. #define GL_LIST_BASE 0x0B32
  323. #define GL_LIST_INDEX 0x0B33
  324. #define GL_POLYGON_MODE 0x0B40
  325. #define GL_POLYGON_SMOOTH 0x0B41
  326. #define GL_POLYGON_STIPPLE 0x0B42
  327. #define GL_EDGE_FLAG 0x0B43
  328. #define GL_CULL_FACE 0x0B44
  329. #define GL_CULL_FACE_MODE 0x0B45
  330. #define GL_FRONT_FACE 0x0B46
  331. #define GL_LIGHTING 0x0B50
  332. #define GL_LIGHT_MODEL_LOCAL_VIEWER 0x0B51
  333. #define GL_LIGHT_MODEL_TWO_SIDE 0x0B52
  334. #define GL_LIGHT_MODEL_AMBIENT 0x0B53
  335. #define GL_SHADE_MODEL 0x0B54
  336. #define GL_COLOR_MATERIAL_FACE 0x0B55
  337. #define GL_COLOR_MATERIAL_PARAMETER 0x0B56
  338. #define GL_COLOR_MATERIAL 0x0B57
  339. #define GL_FOG 0x0B60
  340. #define GL_FOG_INDEX 0x0B61
  341. #define GL_FOG_DENSITY 0x0B62
  342. #define GL_FOG_START 0x0B63
  343. #define GL_FOG_END 0x0B64
  344. #define GL_FOG_MODE 0x0B65
  345. #define GL_FOG_COLOR 0x0B66
  346. #define GL_DEPTH_RANGE 0x0B70
  347. #define GL_DEPTH_TEST 0x0B71
  348. #define GL_DEPTH_WRITEMASK 0x0B72
  349. #define GL_DEPTH_CLEAR_VALUE 0x0B73
  350. #define GL_DEPTH_FUNC 0x0B74
  351. #define GL_ACCUM_CLEAR_VALUE 0x0B80
  352. #define GL_STENCIL_TEST 0x0B90
  353. #define GL_STENCIL_CLEAR_VALUE 0x0B91
  354. #define GL_STENCIL_FUNC 0x0B92
  355. #define GL_STENCIL_VALUE_MASK 0x0B93
  356. #define GL_STENCIL_FAIL 0x0B94
  357. #define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
  358. #define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
  359. #define GL_STENCIL_REF 0x0B97
  360. #define GL_STENCIL_WRITEMASK 0x0B98
  361. #define GL_MATRIX_MODE 0x0BA0
  362. #define GL_NORMALIZE 0x0BA1
  363. #define GL_VIEWPORT 0x0BA2
  364. #define GL_MODELVIEW_STACK_DEPTH 0x0BA3
  365. #define GL_PROJECTION_STACK_DEPTH 0x0BA4
  366. #define GL_TEXTURE_STACK_DEPTH 0x0BA5
  367. #define GL_MODELVIEW_MATRIX 0x0BA6
  368. #define GL_PROJECTION_MATRIX 0x0BA7
  369. #define GL_TEXTURE_MATRIX 0x0BA8
  370. #define GL_ATTRIB_STACK_DEPTH 0x0BB0
  371. #define GL_CLIENT_ATTRIB_STACK_DEPTH 0x0BB1
  372. #define GL_ALPHA_TEST 0x0BC0
  373. #define GL_ALPHA_TEST_FUNC 0x0BC1
  374. #define GL_ALPHA_TEST_REF 0x0BC2
  375. #define GL_DITHER 0x0BD0
  376. #define GL_BLEND_DST 0x0BE0
  377. #define GL_BLEND_SRC 0x0BE1
  378. #define GL_BLEND 0x0BE2
  379. #define GL_LOGIC_OP_MODE 0x0BF0
  380. #define GL_INDEX_LOGIC_OP 0x0BF1
  381. #define GL_COLOR_LOGIC_OP 0x0BF2
  382. #define GL_AUX_BUFFERS 0x0C00
  383. #define GL_DRAW_BUFFER 0x0C01
  384. #define GL_READ_BUFFER 0x0C02
  385. #define GL_SCISSOR_BOX 0x0C10
  386. #define GL_SCISSOR_TEST 0x0C11
  387. #define GL_INDEX_CLEAR_VALUE 0x0C20
  388. #define GL_INDEX_WRITEMASK 0x0C21
  389. #define GL_COLOR_CLEAR_VALUE 0x0C22
  390. #define GL_COLOR_WRITEMASK 0x0C23
  391. #define GL_INDEX_MODE 0x0C30
  392. #define GL_RGBA_MODE 0x0C31
  393. #define GL_DOUBLEBUFFER 0x0C32
  394. #define GL_STEREO 0x0C33
  395. #define GL_RENDER_MODE 0x0C40
  396. #define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50
  397. #define GL_POINT_SMOOTH_HINT 0x0C51
  398. #define GL_LINE_SMOOTH_HINT 0x0C52
  399. #define GL_POLYGON_SMOOTH_HINT 0x0C53
  400. #define GL_FOG_HINT 0x0C54
  401. #define GL_TEXTURE_GEN_S 0x0C60
  402. #define GL_TEXTURE_GEN_T 0x0C61
  403. #define GL_TEXTURE_GEN_R 0x0C62
  404. #define GL_TEXTURE_GEN_Q 0x0C63
  405. #define GL_PIXEL_MAP_I_TO_I 0x0C70
  406. #define GL_PIXEL_MAP_S_TO_S 0x0C71
  407. #define GL_PIXEL_MAP_I_TO_R 0x0C72
  408. #define GL_PIXEL_MAP_I_TO_G 0x0C73
  409. #define GL_PIXEL_MAP_I_TO_B 0x0C74
  410. #define GL_PIXEL_MAP_I_TO_A 0x0C75
  411. #define GL_PIXEL_MAP_R_TO_R 0x0C76
  412. #define GL_PIXEL_MAP_G_TO_G 0x0C77
  413. #define GL_PIXEL_MAP_B_TO_B 0x0C78
  414. #define GL_PIXEL_MAP_A_TO_A 0x0C79
  415. #define GL_PIXEL_MAP_I_TO_I_SIZE 0x0CB0
  416. #define GL_PIXEL_MAP_S_TO_S_SIZE 0x0CB1
  417. #define GL_PIXEL_MAP_I_TO_R_SIZE 0x0CB2
  418. #define GL_PIXEL_MAP_I_TO_G_SIZE 0x0CB3
  419. #define GL_PIXEL_MAP_I_TO_B_SIZE 0x0CB4
  420. #define GL_PIXEL_MAP_I_TO_A_SIZE 0x0CB5
  421. #define GL_PIXEL_MAP_R_TO_R_SIZE 0x0CB6
  422. #define GL_PIXEL_MAP_G_TO_G_SIZE 0x0CB7
  423. #define GL_PIXEL_MAP_B_TO_B_SIZE 0x0CB8
  424. #define GL_PIXEL_MAP_A_TO_A_SIZE 0x0CB9
  425. #define GL_UNPACK_SWAP_BYTES 0x0CF0
  426. #define GL_UNPACK_LSB_FIRST 0x0CF1
  427. #define GL_UNPACK_ROW_LENGTH 0x0CF2
  428. #define GL_UNPACK_SKIP_ROWS 0x0CF3
  429. #define GL_UNPACK_SKIP_PIXELS 0x0CF4
  430. #define GL_UNPACK_ALIGNMENT 0x0CF5
  431. #define GL_PACK_SWAP_BYTES 0x0D00
  432. #define GL_PACK_LSB_FIRST 0x0D01
  433. #define GL_PACK_ROW_LENGTH 0x0D02
  434. #define GL_PACK_SKIP_ROWS 0x0D03
  435. #define GL_PACK_SKIP_PIXELS 0x0D04
  436. #define GL_PACK_ALIGNMENT 0x0D05
  437. #define GL_MAP_COLOR 0x0D10
  438. #define GL_MAP_STENCIL 0x0D11
  439. #define GL_INDEX_SHIFT 0x0D12
  440. #define GL_INDEX_OFFSET 0x0D13
  441. #define GL_RED_SCALE 0x0D14
  442. #define GL_RED_BIAS 0x0D15
  443. #define GL_ZOOM_X 0x0D16
  444. #define GL_ZOOM_Y 0x0D17
  445. #define GL_GREEN_SCALE 0x0D18
  446. #define GL_GREEN_BIAS 0x0D19
  447. #define GL_BLUE_SCALE 0x0D1A
  448. #define GL_BLUE_BIAS 0x0D1B
  449. #define GL_ALPHA_SCALE 0x0D1C
  450. #define GL_ALPHA_BIAS 0x0D1D
  451. #define GL_DEPTH_SCALE 0x0D1E
  452. #define GL_DEPTH_BIAS 0x0D1F
  453. #define GL_MAX_EVAL_ORDER 0x0D30
  454. #define GL_MAX_LIGHTS 0x0D31
  455. #define GL_MAX_CLIP_PLANES 0x0D32
  456. #define GL_MAX_TEXTURE_SIZE 0x0D33
  457. #define GL_MAX_PIXEL_MAP_TABLE 0x0D34
  458. #define GL_MAX_ATTRIB_STACK_DEPTH 0x0D35
  459. #define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36
  460. #define GL_MAX_NAME_STACK_DEPTH 0x0D37
  461. #define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38
  462. #define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39
  463. #define GL_MAX_VIEWPORT_DIMS 0x0D3A
  464. #define GL_MAX_CLIENT_ATTRIB_STACK_DEPTH 0x0D3B
  465. #define GL_SUBPIXEL_BITS 0x0D50
  466. #define GL_INDEX_BITS 0x0D51
  467. #define GL_RED_BITS 0x0D52
  468. #define GL_GREEN_BITS 0x0D53
  469. #define GL_BLUE_BITS 0x0D54
  470. #define GL_ALPHA_BITS 0x0D55
  471. #define GL_DEPTH_BITS 0x0D56
  472. #define GL_STENCIL_BITS 0x0D57
  473. #define GL_ACCUM_RED_BITS 0x0D58
  474. #define GL_ACCUM_GREEN_BITS 0x0D59
  475. #define GL_ACCUM_BLUE_BITS 0x0D5A
  476. #define GL_ACCUM_ALPHA_BITS 0x0D5B
  477. #define GL_NAME_STACK_DEPTH 0x0D70
  478. #define GL_AUTO_NORMAL 0x0D80
  479. #define GL_MAP1_COLOR_4 0x0D90
  480. #define GL_MAP1_INDEX 0x0D91
  481. #define GL_MAP1_NORMAL 0x0D92
  482. #define GL_MAP1_TEXTURE_COORD_1 0x0D93
  483. #define GL_MAP1_TEXTURE_COORD_2 0x0D94
  484. #define GL_MAP1_TEXTURE_COORD_3 0x0D95
  485. #define GL_MAP1_TEXTURE_COORD_4 0x0D96
  486. #define GL_MAP1_VERTEX_3 0x0D97
  487. #define GL_MAP1_VERTEX_4 0x0D98
  488. #define GL_MAP2_COLOR_4 0x0DB0
  489. #define GL_MAP2_INDEX 0x0DB1
  490. #define GL_MAP2_NORMAL 0x0DB2
  491. #define GL_MAP2_TEXTURE_COORD_1 0x0DB3
  492. #define GL_MAP2_TEXTURE_COORD_2 0x0DB4
  493. #define GL_MAP2_TEXTURE_COORD_3 0x0DB5
  494. #define GL_MAP2_TEXTURE_COORD_4 0x0DB6
  495. #define GL_MAP2_VERTEX_3 0x0DB7
  496. #define GL_MAP2_VERTEX_4 0x0DB8
  497. #define GL_MAP1_GRID_DOMAIN 0x0DD0
  498. #define GL_MAP1_GRID_SEGMENTS 0x0DD1
  499. #define GL_MAP2_GRID_DOMAIN 0x0DD2
  500. #define GL_MAP2_GRID_SEGMENTS 0x0DD3
  501. #define GL_TEXTURE_1D 0x0DE0
  502. #define GL_TEXTURE_2D 0x0DE1
  503. #define GL_FEEDBACK_BUFFER_POINTER 0x0DF0
  504. #define GL_FEEDBACK_BUFFER_SIZE 0x0DF1
  505. #define GL_FEEDBACK_BUFFER_TYPE 0x0DF2
  506. #define GL_SELECTION_BUFFER_POINTER 0x0DF3
  507. #define GL_SELECTION_BUFFER_SIZE 0x0DF4
  508. /* GL_TEXTURE_BINDING_1D */
  509. /* GL_TEXTURE_BINDING_2D */
  510. /* GL_VERTEX_ARRAY */
  511. /* GL_NORMAL_ARRAY */
  512. /* GL_COLOR_ARRAY */
  513. /* GL_INDEX_ARRAY */
  514. /* GL_TEXTURE_COORD_ARRAY */
  515. /* GL_EDGE_FLAG_ARRAY */
  516. /* GL_VERTEX_ARRAY_SIZE */
  517. /* GL_VERTEX_ARRAY_TYPE */
  518. /* GL_VERTEX_ARRAY_STRIDE */
  519. /* GL_NORMAL_ARRAY_TYPE */
  520. /* GL_NORMAL_ARRAY_STRIDE */
  521. /* GL_COLOR_ARRAY_SIZE */
  522. /* GL_COLOR_ARRAY_TYPE */
  523. /* GL_COLOR_ARRAY_STRIDE */
  524. /* GL_INDEX_ARRAY_TYPE */
  525. /* GL_INDEX_ARRAY_STRIDE */
  526. /* GL_TEXTURE_COORD_ARRAY_SIZE */
  527. /* GL_TEXTURE_COORD_ARRAY_TYPE */
  528. /* GL_TEXTURE_COORD_ARRAY_STRIDE */
  529. /* GL_EDGE_FLAG_ARRAY_STRIDE */
  530. /* GL_POLYGON_OFFSET_FACTOR */
  531. /* GL_POLYGON_OFFSET_UNITS */
  532. /* GetTextureParameter */
  533. /* GL_TEXTURE_MAG_FILTER */
  534. /* GL_TEXTURE_MIN_FILTER */
  535. /* GL_TEXTURE_WRAP_S */
  536. /* GL_TEXTURE_WRAP_T */
  537. #define GL_TEXTURE_WIDTH 0x1000
  538. #define GL_TEXTURE_HEIGHT 0x1001
  539. #define GL_TEXTURE_INTERNAL_FORMAT 0x1003
  540. #define GL_TEXTURE_BORDER_COLOR 0x1004
  541. #define GL_TEXTURE_BORDER 0x1005
  542. /* GL_TEXTURE_RED_SIZE */
  543. /* GL_TEXTURE_GREEN_SIZE */
  544. /* GL_TEXTURE_BLUE_SIZE */
  545. /* GL_TEXTURE_ALPHA_SIZE */
  546. /* GL_TEXTURE_LUMINANCE_SIZE */
  547. /* GL_TEXTURE_INTENSITY_SIZE */
  548. /* GL_TEXTURE_PRIORITY */
  549. /* GL_TEXTURE_RESIDENT */
  550. /* HintMode */
  551. #define GL_DONT_CARE 0x1100
  552. #define GL_FASTEST 0x1101
  553. #define GL_NICEST 0x1102
  554. /* HintTarget */
  555. /* GL_PERSPECTIVE_CORRECTION_HINT */
  556. /* GL_POINT_SMOOTH_HINT */
  557. /* GL_LINE_SMOOTH_HINT */
  558. /* GL_POLYGON_SMOOTH_HINT */
  559. /* GL_FOG_HINT */
  560. /* IndexPointerType */
  561. /* GL_SHORT */
  562. /* GL_INT */
  563. /* GL_FLOAT */
  564. /* GL_DOUBLE */
  565. /* LightModelParameter */
  566. /* GL_LIGHT_MODEL_AMBIENT */
  567. /* GL_LIGHT_MODEL_LOCAL_VIEWER */
  568. /* GL_LIGHT_MODEL_TWO_SIDE */
  569. /* LightName */
  570. #define GL_LIGHT0 0x4000
  571. #define GL_LIGHT1 0x4001
  572. #define GL_LIGHT2 0x4002
  573. #define GL_LIGHT3 0x4003
  574. #define GL_LIGHT4 0x4004
  575. #define GL_LIGHT5 0x4005
  576. #define GL_LIGHT6 0x4006
  577. #define GL_LIGHT7 0x4007
  578. /* LightParameter */
  579. #define GL_AMBIENT 0x1200
  580. #define GL_DIFFUSE 0x1201
  581. #define GL_SPECULAR 0x1202
  582. #define GL_POSITION 0x1203
  583. #define GL_SPOT_DIRECTION 0x1204
  584. #define GL_SPOT_EXPONENT 0x1205
  585. #define GL_SPOT_CUTOFF 0x1206
  586. #define GL_CONSTANT_ATTENUATION 0x1207
  587. #define GL_LINEAR_ATTENUATION 0x1208
  588. #define GL_QUADRATIC_ATTENUATION 0x1209
  589. /* InterleavedArrays */
  590. /* GL_V2F */
  591. /* GL_V3F */
  592. /* GL_C4UB_V2F */
  593. /* GL_C4UB_V3F */
  594. /* GL_C3F_V3F */
  595. /* GL_N3F_V3F */
  596. /* GL_C4F_N3F_V3F */
  597. /* GL_T2F_V3F */
  598. /* GL_T4F_V4F */
  599. /* GL_T2F_C4UB_V3F */
  600. /* GL_T2F_C3F_V3F */
  601. /* GL_T2F_N3F_V3F */
  602. /* GL_T2F_C4F_N3F_V3F */
  603. /* GL_T4F_C4F_N3F_V4F */
  604. /* ListMode */
  605. #define GL_COMPILE 0x1300
  606. #define GL_COMPILE_AND_EXECUTE 0x1301
  607. /* ListNameType */
  608. /* GL_BYTE */
  609. /* GL_UNSIGNED_BYTE */
  610. /* GL_SHORT */
  611. /* GL_UNSIGNED_SHORT */
  612. /* GL_INT */
  613. /* GL_UNSIGNED_INT */
  614. /* GL_FLOAT */
  615. /* GL_2_BYTES */
  616. /* GL_3_BYTES */
  617. /* GL_4_BYTES */
  618. /* LogicOp */
  619. #define GL_CLEAR 0x1500
  620. #define GL_AND 0x1501
  621. #define GL_AND_REVERSE 0x1502
  622. #define GL_COPY 0x1503
  623. #define GL_AND_INVERTED 0x1504
  624. #define GL_NOOP 0x1505
  625. #define GL_XOR 0x1506
  626. #define GL_OR 0x1507
  627. #define GL_NOR 0x1508
  628. #define GL_EQUIV 0x1509
  629. #define GL_INVERT 0x150A
  630. #define GL_OR_REVERSE 0x150B
  631. #define GL_COPY_INVERTED 0x150C
  632. #define GL_OR_INVERTED 0x150D
  633. #define GL_NAND 0x150E
  634. #define GL_SET 0x150F
  635. /* MapTarget */
  636. /* GL_MAP1_COLOR_4 */
  637. /* GL_MAP1_INDEX */
  638. /* GL_MAP1_NORMAL */
  639. /* GL_MAP1_TEXTURE_COORD_1 */
  640. /* GL_MAP1_TEXTURE_COORD_2 */
  641. /* GL_MAP1_TEXTURE_COORD_3 */
  642. /* GL_MAP1_TEXTURE_COORD_4 */
  643. /* GL_MAP1_VERTEX_3 */
  644. /* GL_MAP1_VERTEX_4 */
  645. /* GL_MAP2_COLOR_4 */
  646. /* GL_MAP2_INDEX */
  647. /* GL_MAP2_NORMAL */
  648. /* GL_MAP2_TEXTURE_COORD_1 */
  649. /* GL_MAP2_TEXTURE_COORD_2 */
  650. /* GL_MAP2_TEXTURE_COORD_3 */
  651. /* GL_MAP2_TEXTURE_COORD_4 */
  652. /* GL_MAP2_VERTEX_3 */
  653. /* GL_MAP2_VERTEX_4 */
  654. /* MaterialFace */
  655. /* GL_FRONT */
  656. /* GL_BACK */
  657. /* GL_FRONT_AND_BACK */
  658. /* MaterialParameter */
  659. #define GL_EMISSION 0x1600
  660. #define GL_SHININESS 0x1601
  661. #define GL_AMBIENT_AND_DIFFUSE 0x1602
  662. #define GL_COLOR_INDEXES 0x1603
  663. /* GL_AMBIENT */
  664. /* GL_DIFFUSE */
  665. /* GL_SPECULAR */
  666. /* MatrixMode */
  667. #define GL_MODELVIEW 0x1700
  668. #define GL_PROJECTION 0x1701
  669. #define GL_TEXTURE 0x1702
  670. /* MeshMode1 */
  671. /* GL_POINT */
  672. /* GL_LINE */
  673. /* MeshMode2 */
  674. /* GL_POINT */
  675. /* GL_LINE */
  676. /* GL_FILL */
  677. /* NormalPointerType */
  678. /* GL_BYTE */
  679. /* GL_SHORT */
  680. /* GL_INT */
  681. /* GL_FLOAT */
  682. /* GL_DOUBLE */
  683. /* PixelCopyType */
  684. #define GL_COLOR 0x1800
  685. #define GL_DEPTH 0x1801
  686. #define GL_STENCIL 0x1802
  687. /* PixelFormat */
  688. #define GL_COLOR_INDEX 0x1900
  689. #define GL_STENCIL_INDEX 0x1901
  690. #define GL_DEPTH_COMPONENT 0x1902
  691. #define GL_RED 0x1903
  692. #define GL_GREEN 0x1904
  693. #define GL_BLUE 0x1905
  694. #define GL_ALPHA 0x1906
  695. #define GL_RGB 0x1907
  696. #define GL_RGBA 0x1908
  697. #define GL_LUMINANCE 0x1909
  698. #define GL_LUMINANCE_ALPHA 0x190A
  699. /* PixelMap */
  700. /* GL_PIXEL_MAP_I_TO_I */
  701. /* GL_PIXEL_MAP_S_TO_S */
  702. /* GL_PIXEL_MAP_I_TO_R */
  703. /* GL_PIXEL_MAP_I_TO_G */
  704. /* GL_PIXEL_MAP_I_TO_B */
  705. /* GL_PIXEL_MAP_I_TO_A */
  706. /* GL_PIXEL_MAP_R_TO_R */
  707. /* GL_PIXEL_MAP_G_TO_G */
  708. /* GL_PIXEL_MAP_B_TO_B */
  709. /* GL_PIXEL_MAP_A_TO_A */
  710. /* PixelStore */
  711. /* GL_UNPACK_SWAP_BYTES */
  712. /* GL_UNPACK_LSB_FIRST */
  713. /* GL_UNPACK_ROW_LENGTH */
  714. /* GL_UNPACK_SKIP_ROWS */
  715. /* GL_UNPACK_SKIP_PIXELS */
  716. /* GL_UNPACK_ALIGNMENT */
  717. /* GL_PACK_SWAP_BYTES */
  718. /* GL_PACK_LSB_FIRST */
  719. /* GL_PACK_ROW_LENGTH */
  720. /* GL_PACK_SKIP_ROWS */
  721. /* GL_PACK_SKIP_PIXELS */
  722. /* GL_PACK_ALIGNMENT */
  723. /* PixelTransfer */
  724. /* GL_MAP_COLOR */
  725. /* GL_MAP_STENCIL */
  726. /* GL_INDEX_SHIFT */
  727. /* GL_INDEX_OFFSET */
  728. /* GL_RED_SCALE */
  729. /* GL_RED_BIAS */
  730. /* GL_GREEN_SCALE */
  731. /* GL_GREEN_BIAS */
  732. /* GL_BLUE_SCALE */
  733. /* GL_BLUE_BIAS */
  734. /* GL_ALPHA_SCALE */
  735. /* GL_ALPHA_BIAS */
  736. /* GL_DEPTH_SCALE */
  737. /* GL_DEPTH_BIAS */
  738. /* PixelType */
  739. #define GL_BITMAP 0x1A00
  740. /* GL_BYTE */
  741. /* GL_UNSIGNED_BYTE */
  742. /* GL_SHORT */
  743. /* GL_UNSIGNED_SHORT */
  744. /* GL_INT */
  745. /* GL_UNSIGNED_INT */
  746. /* GL_FLOAT */
  747. /* PolygonMode */
  748. #define GL_POINT 0x1B00
  749. #define GL_LINE 0x1B01
  750. #define GL_FILL 0x1B02
  751. /* ReadBufferMode */
  752. /* GL_FRONT_LEFT */
  753. /* GL_FRONT_RIGHT */
  754. /* GL_BACK_LEFT */
  755. /* GL_BACK_RIGHT */
  756. /* GL_FRONT */
  757. /* GL_BACK */
  758. /* GL_LEFT */
  759. /* GL_RIGHT */
  760. /* GL_AUX0 */
  761. /* GL_AUX1 */
  762. /* GL_AUX2 */
  763. /* GL_AUX3 */
  764. /* RenderingMode */
  765. #define GL_RENDER 0x1C00
  766. #define GL_FEEDBACK 0x1C01
  767. #define GL_SELECT 0x1C02
  768. /* ShadingModel */
  769. #define GL_FLAT 0x1D00
  770. #define GL_SMOOTH 0x1D01
  771. /* StencilFunction */
  772. /* GL_NEVER */
  773. /* GL_LESS */
  774. /* GL_EQUAL */
  775. /* GL_LEQUAL */
  776. /* GL_GREATER */
  777. /* GL_NOTEQUAL */
  778. /* GL_GEQUAL */
  779. /* GL_ALWAYS */
  780. /* StencilOp */
  781. /* GL_ZERO */
  782. #define GL_KEEP 0x1E00
  783. #define GL_REPLACE 0x1E01
  784. #define GL_INCR 0x1E02
  785. #define GL_DECR 0x1E03
  786. /* GL_INVERT */
  787. /* StringName */
  788. #define GL_VENDOR 0x1F00
  789. #define GL_RENDERER 0x1F01
  790. #define GL_VERSION 0x1F02
  791. #define GL_EXTENSIONS 0x1F03
  792. /* TextureCoordName */
  793. #define GL_S 0x2000
  794. #define GL_T 0x2001
  795. #define GL_R 0x2002
  796. #define GL_Q 0x2003
  797. /* TexCoordPointerType */
  798. /* GL_SHORT */
  799. /* GL_INT */
  800. /* GL_FLOAT */
  801. /* GL_DOUBLE */
  802. /* TextureEnvMode */
  803. #define GL_MODULATE 0x2100
  804. #define GL_DECAL 0x2101
  805. /* GL_BLEND */
  806. /* GL_REPLACE */
  807. /* TextureEnvParameter */
  808. #define GL_TEXTURE_ENV_MODE 0x2200
  809. #define GL_TEXTURE_ENV_COLOR 0x2201
  810. /* TextureEnvTarget */
  811. #define GL_TEXTURE_ENV 0x2300
  812. /* TextureGenMode */
  813. #define GL_EYE_LINEAR 0x2400
  814. #define GL_OBJECT_LINEAR 0x2401
  815. #define GL_SPHERE_MAP 0x2402
  816. /* TextureGenParameter */
  817. #define GL_TEXTURE_GEN_MODE 0x2500
  818. #define GL_OBJECT_PLANE 0x2501
  819. #define GL_EYE_PLANE 0x2502
  820. /* TextureMagFilter */
  821. #define GL_NEAREST 0x2600
  822. #define GL_LINEAR 0x2601
  823. /* TextureMinFilter */
  824. /* GL_NEAREST */
  825. /* GL_LINEAR */
  826. #define GL_NEAREST_MIPMAP_NEAREST 0x2700
  827. #define GL_LINEAR_MIPMAP_NEAREST 0x2701
  828. #define GL_NEAREST_MIPMAP_LINEAR 0x2702
  829. #define GL_LINEAR_MIPMAP_LINEAR 0x2703
  830. /* TextureParameterName */
  831. #define GL_TEXTURE_MAG_FILTER 0x2800
  832. #define GL_TEXTURE_MIN_FILTER 0x2801
  833. #define GL_TEXTURE_WRAP_S 0x2802
  834. #define GL_TEXTURE_WRAP_T 0x2803
  835. /* GL_TEXTURE_BORDER_COLOR */
  836. /* GL_TEXTURE_PRIORITY */
  837. /* TextureTarget */
  838. /* GL_TEXTURE_1D */
  839. /* GL_TEXTURE_2D */
  840. /* GL_PROXY_TEXTURE_1D */
  841. /* GL_PROXY_TEXTURE_2D */
  842. /* TextureWrapMode */
  843. #define GL_CLAMP 0x2900
  844. #define GL_REPEAT 0x2901
  845. /* VertexPointerType */
  846. /* GL_SHORT */
  847. /* GL_INT */
  848. /* GL_FLOAT */
  849. /* GL_DOUBLE */
  850. /* ClientAttribMask */
  851. #define GL_CLIENT_PIXEL_STORE_BIT 0x00000001
  852. #define GL_CLIENT_VERTEX_ARRAY_BIT 0x00000002
  853. #define GL_CLIENT_ALL_ATTRIB_BITS 0xffffffff
  854. /* polygon_offset */
  855. #define GL_POLYGON_OFFSET_FACTOR 0x8038
  856. #define GL_POLYGON_OFFSET_UNITS 0x2A00
  857. #define GL_POLYGON_OFFSET_POINT 0x2A01
  858. #define GL_POLYGON_OFFSET_LINE 0x2A02
  859. #define GL_POLYGON_OFFSET_FILL 0x8037
  860. /* texture */
  861. #define GL_ALPHA4 0x803B
  862. #define GL_ALPHA8 0x803C
  863. #define GL_ALPHA12 0x803D
  864. #define GL_ALPHA16 0x803E
  865. #define GL_LUMINANCE4 0x803F
  866. #define GL_LUMINANCE8 0x8040
  867. #define GL_LUMINANCE12 0x8041
  868. #define GL_LUMINANCE16 0x8042
  869. #define GL_LUMINANCE4_ALPHA4 0x8043
  870. #define GL_LUMINANCE6_ALPHA2 0x8044
  871. #define GL_LUMINANCE8_ALPHA8 0x8045
  872. #define GL_LUMINANCE12_ALPHA4 0x8046
  873. #define GL_LUMINANCE12_ALPHA12 0x8047
  874. #define GL_LUMINANCE16_ALPHA16 0x8048
  875. #define GL_INTENSITY 0x8049
  876. #define GL_INTENSITY4 0x804A
  877. #define GL_INTENSITY8 0x804B
  878. #define GL_INTENSITY12 0x804C
  879. #define GL_INTENSITY16 0x804D
  880. #define GL_R3_G3_B2 0x2A10
  881. #define GL_RGB4 0x804F
  882. #define GL_RGB5 0x8050
  883. #define GL_RGB8 0x8051
  884. #define GL_RGB10 0x8052
  885. #define GL_RGB12 0x8053
  886. #define GL_RGB16 0x8054
  887. #define GL_RGBA2 0x8055
  888. #define GL_RGBA4 0x8056
  889. #define GL_RGB5_A1 0x8057
  890. #define GL_RGBA8 0x8058
  891. #define GL_RGB10_A2 0x8059
  892. #define GL_RGBA12 0x805A
  893. #define GL_RGBA16 0x805B
  894. #define GL_TEXTURE_RED_SIZE 0x805C
  895. #define GL_TEXTURE_GREEN_SIZE 0x805D
  896. #define GL_TEXTURE_BLUE_SIZE 0x805E
  897. #define GL_TEXTURE_ALPHA_SIZE 0x805F
  898. #define GL_TEXTURE_LUMINANCE_SIZE 0x8060
  899. #define GL_TEXTURE_INTENSITY_SIZE 0x8061
  900. #define GL_PROXY_TEXTURE_1D 0x8063
  901. #define GL_PROXY_TEXTURE_2D 0x8064
  902. /* texture_object */
  903. #define GL_TEXTURE_PRIORITY 0x8066
  904. #define GL_TEXTURE_RESIDENT 0x8067
  905. #define GL_TEXTURE_BINDING_1D 0x8068
  906. #define GL_TEXTURE_BINDING_2D 0x8069
  907. /* vertex_array */
  908. #define GL_VERTEX_ARRAY 0x8074
  909. #define GL_NORMAL_ARRAY 0x8075
  910. #define GL_COLOR_ARRAY 0x8076
  911. #define GL_INDEX_ARRAY 0x8077
  912. #define GL_TEXTURE_COORD_ARRAY 0x8078
  913. #define GL_EDGE_FLAG_ARRAY 0x8079
  914. #define GL_VERTEX_ARRAY_SIZE 0x807A
  915. #define GL_VERTEX_ARRAY_TYPE 0x807B
  916. #define GL_VERTEX_ARRAY_STRIDE 0x807C
  917. #define GL_NORMAL_ARRAY_TYPE 0x807E
  918. #define GL_NORMAL_ARRAY_STRIDE 0x807F
  919. #define GL_COLOR_ARRAY_SIZE 0x8081
  920. #define GL_COLOR_ARRAY_TYPE 0x8082
  921. #define GL_COLOR_ARRAY_STRIDE 0x8083
  922. #define GL_INDEX_ARRAY_TYPE 0x8085
  923. #define GL_INDEX_ARRAY_STRIDE 0x8086
  924. #define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088
  925. #define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089
  926. #define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A
  927. #define GL_EDGE_FLAG_ARRAY_STRIDE 0x808C
  928. #define GL_VERTEX_ARRAY_POINTER 0x808E
  929. #define GL_NORMAL_ARRAY_POINTER 0x808F
  930. #define GL_COLOR_ARRAY_POINTER 0x8090
  931. #define GL_INDEX_ARRAY_POINTER 0x8091
  932. #define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092
  933. #define GL_EDGE_FLAG_ARRAY_POINTER 0x8093
  934. #define GL_V2F 0x2A20
  935. #define GL_V3F 0x2A21
  936. #define GL_C4UB_V2F 0x2A22
  937. #define GL_C4UB_V3F 0x2A23
  938. #define GL_C3F_V3F 0x2A24
  939. #define GL_N3F_V3F 0x2A25
  940. #define GL_C4F_N3F_V3F 0x2A26
  941. #define GL_T2F_V3F 0x2A27
  942. #define GL_T4F_V4F 0x2A28
  943. #define GL_T2F_C4UB_V3F 0x2A29
  944. #define GL_T2F_C3F_V3F 0x2A2A
  945. #define GL_T2F_N3F_V3F 0x2A2B
  946. #define GL_T2F_C4F_N3F_V3F 0x2A2C
  947. #define GL_T4F_C4F_N3F_V4F 0x2A2D
  948. /* Extensions */
  949. #define GL_EXT_vertex_array 1
  950. #define GL_WIN_swap_hint 1
  951. #define GL_EXT_bgra 1
  952. #define GL_EXT_paletted_texture 1
  953. /* EXT_vertex_array */
  954. #define GL_VERTEX_ARRAY_EXT 0x8074
  955. #define GL_NORMAL_ARRAY_EXT 0x8075
  956. #define GL_COLOR_ARRAY_EXT 0x8076
  957. #define GL_INDEX_ARRAY_EXT 0x8077
  958. #define GL_TEXTURE_COORD_ARRAY_EXT 0x8078
  959. #define GL_EDGE_FLAG_ARRAY_EXT 0x8079
  960. #define GL_VERTEX_ARRAY_SIZE_EXT 0x807A
  961. #define GL_VERTEX_ARRAY_TYPE_EXT 0x807B
  962. #define GL_VERTEX_ARRAY_STRIDE_EXT 0x807C
  963. #define GL_VERTEX_ARRAY_COUNT_EXT 0x807D
  964. #define GL_NORMAL_ARRAY_TYPE_EXT 0x807E
  965. #define GL_NORMAL_ARRAY_STRIDE_EXT 0x807F
  966. #define GL_NORMAL_ARRAY_COUNT_EXT 0x8080
  967. #define GL_COLOR_ARRAY_SIZE_EXT 0x8081
  968. #define GL_COLOR_ARRAY_TYPE_EXT 0x8082
  969. #define GL_COLOR_ARRAY_STRIDE_EXT 0x8083
  970. #define GL_COLOR_ARRAY_COUNT_EXT 0x8084
  971. #define GL_INDEX_ARRAY_TYPE_EXT 0x8085
  972. #define GL_INDEX_ARRAY_STRIDE_EXT 0x8086
  973. #define GL_INDEX_ARRAY_COUNT_EXT 0x8087
  974. #define GL_TEXTURE_COORD_ARRAY_SIZE_EXT 0x8088
  975. #define GL_TEXTURE_COORD_ARRAY_TYPE_EXT 0x8089
  976. #define GL_TEXTURE_COORD_ARRAY_STRIDE_EXT 0x808A
  977. #define GL_TEXTURE_COORD_ARRAY_COUNT_EXT 0x808B
  978. #define GL_EDGE_FLAG_ARRAY_STRIDE_EXT 0x808C
  979. #define GL_EDGE_FLAG_ARRAY_COUNT_EXT 0x808D
  980. #define GL_VERTEX_ARRAY_POINTER_EXT 0x808E
  981. #define GL_NORMAL_ARRAY_POINTER_EXT 0x808F
  982. #define GL_COLOR_ARRAY_POINTER_EXT 0x8090
  983. #define GL_INDEX_ARRAY_POINTER_EXT 0x8091
  984. #define GL_TEXTURE_COORD_ARRAY_POINTER_EXT 0x8092
  985. #define GL_EDGE_FLAG_ARRAY_POINTER_EXT 0x8093
  986. #define GL_DOUBLE_EXT GL_DOUBLE
  987. /* EXT_bgra */
  988. #define GL_BGR_EXT 0x80E0
  989. #define GL_BGRA_EXT 0x80E1
  990. /* EXT_paletted_texture */
  991. /* These must match the GL_COLOR_TABLE_*_SGI enumerants */
  992. #define GL_COLOR_TABLE_FORMAT_EXT 0x80D8
  993. #define GL_COLOR_TABLE_WIDTH_EXT 0x80D9
  994. #define GL_COLOR_TABLE_RED_SIZE_EXT 0x80DA
  995. #define GL_COLOR_TABLE_GREEN_SIZE_EXT 0x80DB
  996. #define GL_COLOR_TABLE_BLUE_SIZE_EXT 0x80DC
  997. #define GL_COLOR_TABLE_ALPHA_SIZE_EXT 0x80DD
  998. #define GL_COLOR_TABLE_LUMINANCE_SIZE_EXT 0x80DE
  999. #define GL_COLOR_TABLE_INTENSITY_SIZE_EXT 0x80DF
  1000. #define GL_COLOR_INDEX1_EXT 0x80E2
  1001. #define GL_COLOR_INDEX2_EXT 0x80E3
  1002. #define GL_COLOR_INDEX4_EXT 0x80E4
  1003. #define GL_COLOR_INDEX8_EXT 0x80E5
  1004. #define GL_COLOR_INDEX12_EXT 0x80E6
  1005. #define GL_COLOR_INDEX16_EXT 0x80E7
  1006. /* For compatibility with OpenGL v1.0 */
  1007. #define GL_LOGIC_OP GL_INDEX_LOGIC_OP
  1008. #define GL_TEXTURE_COMPONENTS GL_TEXTURE_INTERNAL_FORMAT
  1009. /* Multitexture extensions */
  1010. #define GL_TEXTURE0_SGIS 0x835E
  1011. #define GL_TEXTURE1_SGIS 0x835F
  1012. #define GL_TEXTURE2_SGIS 0x8360
  1013. #define GL_TEXTURE3_SGIS 0x8361
  1014. #define GL_TEXTURE0_ARB 0x84C0
  1015. #define GL_TEXTURE1_ARB 0x84C1
  1016. #define GL_MAX_ACTIVE_TEXTURES_ARB 0x84E2
  1017. #define MAXGLTEXHANDLES 65536
  1018. struct QuakeVertex
  1019. {
  1020. FLOAT x, y, z;
  1021. FLOAT nx, ny, nz;
  1022. D3DCOLOR color;
  1023. FLOAT tu, tv, tu2, tv2;
  1024. };
  1025. #define QUAKEVFMT (D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_DIFFUSE | D3DFVF_TEX2)
  1026. #define VBUFSIZE 8192
  1027. #define MAXVERTSPERPRIM 512
  1028. #define RGBA_MAKE(r, g, b, a) ((D3DCOLOR) (((a) << 24) | ((r) << 16) | ((g) << 8) | (b)))
  1029. #define RESPATH_QUAKE L"Software\\Microsoft\\Quake"
  1030. struct TexInfo {
  1031. DWORD m_block;
  1032. DWORD m_dwStage;
  1033. BOOL m_capture;
  1034. GLint m_internalformat;
  1035. D3DFORMAT m_fmt;
  1036. GLsizei m_width;
  1037. GLsizei m_height;
  1038. GLsizei m_oldwidth;
  1039. GLsizei m_oldheight;
  1040. IDirect3DTexture8 *m_ddsurf;
  1041. D3DTEXTUREFILTERTYPE m_minmode;
  1042. D3DTEXTUREFILTERTYPE m_magmode;
  1043. D3DTEXTUREFILTERTYPE m_mipmode;
  1044. DWORD m_addu, m_addv;
  1045. INT m_prev, m_next;
  1046. };
  1047. struct Globals {
  1048. // Cache Line 1
  1049. LPDIRECT3DDEVICE8 m_d3ddev;
  1050. DWORD m_curshader;
  1051. GLenum m_prim;
  1052. unsigned m_nfv;
  1053. unsigned m_vcnt;
  1054. QuakeVertex *m_verts;
  1055. BOOL m_texturing;
  1056. BOOL m_mtex;
  1057. // Cache Line 2
  1058. // Following always needs to be together
  1059. /********************************/
  1060. FLOAT m_nx, m_ny, m_nz;
  1061. D3DCOLOR m_color;
  1062. FLOAT m_tu, m_tv, m_tu2, m_tv2;
  1063. /********************************/
  1064. // Cache Line 3
  1065. LPDIRECT3DVERTEXBUFFER8 m_vbuf, m_xyzbuf, m_colbuf, m_texbuf, m_tex2buf;
  1066. LPDIRECT3DINDEXBUFFER8 m_ibuf;
  1067. DWORD m_shaders[2][10];
  1068. int m_winWidth;
  1069. int m_winHeight;
  1070. GLint m_scix, m_sciy;
  1071. GLsizei m_sciw, m_scih;
  1072. GLint m_vwx, m_vwy;
  1073. GLsizei m_vww, m_vwh;
  1074. GLint m_lckfirst;
  1075. GLsizei m_lckcount;
  1076. HWND m_hwnd;
  1077. HDC m_hdc;
  1078. D3DMATERIAL8 m_material;
  1079. D3DFORMAT m_ddFourBitAlphaSurfFormat;
  1080. D3DFORMAT m_ddEightBitAlphaSurfFormat;
  1081. D3DFORMAT m_ddEightBitAlphaOnlySurfFormat;
  1082. D3DFORMAT m_ddFiveBitSurfFormat;
  1083. D3DFORMAT m_ddEightBitSurfFormat;
  1084. D3DFORMAT m_ddLuminanceSurfFormat;
  1085. D3DCAPS8 m_dd;
  1086. GLenum m_cullMode;
  1087. GLenum m_FrontFace;
  1088. D3DTRANSFORMSTATETYPE m_matrixMode;
  1089. BOOL m_cullEnabled;
  1090. BOOL m_texHandleValid;
  1091. BOOL m_subsample;
  1092. BOOL m_usemtex;
  1093. BOOL m_usemipmap;
  1094. BOOL m_doFlip;
  1095. BOOL m_makeSquare;
  1096. BOOL m_scissoring;
  1097. BOOL m_updvwp;
  1098. BOOL m_polyoffset;
  1099. BOOL m_usecolorary, m_usetexcoordary[2], m_usevertexary;
  1100. BOOL m_withinprim;
  1101. BOOL m_texgen;
  1102. DWORD m_vshader[6];
  1103. GLuint m_curstagebinding[2];
  1104. GLenum m_curtgt, m_client_active_texture_arb;
  1105. int m_blendmode[2];
  1106. D3DCOLOR m_clearColor;
  1107. GLclampd m_clearDepth;
  1108. DWORD m_clearStencil;
  1109. const void *m_vertexary;
  1110. const void *m_colorary;
  1111. DWORD m_vertexarystride;
  1112. DWORD m_colorarystride;
  1113. DWORD m_clippstate;
  1114. DWORD m_free;
  1115. DWORD m_cbufbit;
  1116. DWORD m_lightdirty;
  1117. const void *m_texcoordary[2];
  1118. DWORD m_texcoordarystride[2];
  1119. LList<D3DMATRIX> m_matrixStack[4];
  1120. D3DVIEWPORT8 m_vport;
  1121. WNDPROC m_wndproc;
  1122. #if 0
  1123. DWORD m_lod;
  1124. #endif
  1125. DWORD m_vbufoff, m_vbufsz, m_ibufoff, m_ibufsz;
  1126. IDirect3DVertexBuffer8 *m_pStreams[4];
  1127. DWORD m_pStrides[4];
  1128. D3DLIGHT8 m_light[8];
  1129. FLOAT m_lightPositionW[8];
  1130. D3DMATRIX m_xfrm[512];
  1131. TexInfo m_tex[MAXGLTEXHANDLES]; // support upto MAXGLTEXHANDLES for the time being;
  1132. };
  1133. inline DWORD miplevels(DWORD w, DWORD h)
  1134. {
  1135. DWORD m = w > h ? w : h;
  1136. for(DWORD t = 0; m != 0; ++t)
  1137. {
  1138. m >>= 1;
  1139. }
  1140. return t;
  1141. }
  1142. #endif