PageRenderTime 33ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 1ms

/ecl-12.2.1/src/clx/gl.lisp

#
Lisp | 3692 lines | 2849 code | 578 blank | 265 comment | 6 complexity | b977e37f99e74b15f7e77de4cc672a87 MD5 | raw file
Possible License(s): JSON, CC-BY-SA-3.0, GPL-2.0, LGPL-2.1, LGPL-2.0
  1. (defpackage :gl
  2. (:use :common-lisp :xlib)
  3. (:import-from :glx
  4. "*CURRENT-CONTEXT*"
  5. "CONTEXT"
  6. "CONTEXT-P"
  7. "CONTEXT-DISPLAY"
  8. "CONTEXT-TAG"
  9. "CONTEXT-RBUF"
  10. "CONTEXT-INDEX"
  11. )
  12. (:import-from :xlib
  13. "DATA"
  14. "WITH-BUFFER-REQUEST"
  15. "WITH-BUFFER-REQUEST-AND-REPLY"
  16. "CARD32-GET"
  17. "SEQUENCE-GET"
  18. "WITH-DISPLAY"
  19. "DISPLAY-FORCE-OUTPUT"
  20. "INT8" "INT16" "INT32" "INTEGER"
  21. "CARD8" "CARD16" "CARD32"
  22. "ASET-CARD8"
  23. "ASET-CARD16"
  24. "ASET-CARD32"
  25. "ASET-INT8"
  26. "ASET-INT16"
  27. "ASET-INT32"
  28. "DECLARE-BUFFUN"
  29. ;; Types
  30. "ARRAY-INDEX"
  31. "BUFFER-BYTES"
  32. )
  33. (:export "GET-STRING"
  34. ;; Rendering commands (alphabetical order)
  35. "ACCUM"
  36. "ACTIVE-TEXTURE-ARB"
  37. "ALPHA-FUNC"
  38. "BEGIN"
  39. "BIND-TEXTURE"
  40. "BLEND-COLOR"
  41. "BLEND-EQUOTION"
  42. "BLEND-FUNC"
  43. "CALL-LIST"
  44. "CLEAR"
  45. "CLEAR-ACCUM"
  46. "CLEAR-COLOR"
  47. "CLEAR-DEPTH"
  48. "CLEAR-INDEX"
  49. "CLEAR-STENCIL"
  50. "CLIP-PLANE"
  51. "COLOR-3B"
  52. "COLOR-3D"
  53. "COLOR-3F"
  54. "COLOR-3I"
  55. "COLOR-3S"
  56. "COLOR-3UB"
  57. "COLOR-3UI"
  58. "COLOR-3US"
  59. "COLOR-4B"
  60. "COLOR-4D"
  61. "COLOR-4F"
  62. "COLOR-4I"
  63. "COLOR-4S"
  64. "COLOR-4UB"
  65. "COLOR-4UI"
  66. "COLOR-4US"
  67. "COLOR-MASK"
  68. "COLOR-MATERIAL"
  69. "CONVOLUTION-PARAMETER-F"
  70. "CONVOLUTION-PARAMETER-I"
  71. "COPY-COLOR-SUB-TABLE"
  72. "COPY-COLOR-TABLE"
  73. "COPY-CONVOLUTION-FILTER-ID"
  74. "COPY-CONVOLUTION-FILTER-2D"
  75. "COPY-PIXELS"
  76. "COPY-TEX-IMAGE-1D"
  77. "COPY-TEX-IMAGE-2D"
  78. "COPY-TEX-SUB-IMAGE-1D"
  79. "COPY-TEX-SUB-IMAGE-2D"
  80. "COPY-TEX-SUB-IMAGE-3D"
  81. "CULL-FACE"
  82. "DEPTH-FUNC"
  83. "DEPTH-MASK"
  84. "DEPTH-RANGE"
  85. "DRAW-BUFFER"
  86. "EDGE-FLAG-V"
  87. "END"
  88. "EVAL-COORD-1D"
  89. "EVAL-COORD-1F"
  90. "EVAL-COORD-2D"
  91. "EVAL-COORD-2F"
  92. "EVAL-MESH-1"
  93. "EVAL-MESH-2"
  94. "EVAL-POINT-1"
  95. "EVAL-POINT-2"
  96. "FOG-F"
  97. "FOG-I"
  98. "FRONT-FACE"
  99. "FRUSTUM"
  100. "HINT"
  101. "HISTOGRAM"
  102. "INDEX-MASK"
  103. "INDEX-D"
  104. "INDEX-F"
  105. "INDEX-I"
  106. "INDEX-S"
  107. "INDEX-UB"
  108. "INIT-NAMES"
  109. "LIGHT-MODEL-F"
  110. "LIGHT-MODEL-I"
  111. "LIGHT-F"
  112. "LIGHT-FV"
  113. "LIGHT-I"
  114. "LIGHT-IV"
  115. "LINE-STIPPLE"
  116. "LINE-WIDTH"
  117. "LIST-BASE"
  118. "LOAD-IDENTITY"
  119. "LOAD-NAME"
  120. "LOGIC-OP"
  121. "MAP-GRID-1D"
  122. "MAP-GRID-1F"
  123. "MAP-GRID-2D"
  124. "MAP-GRID-2F"
  125. "MATERIAL-F"
  126. "MATERIAL-FV"
  127. "MATERIAL-I"
  128. "MATERIAL-IV"
  129. "MATRIX-MODE"
  130. "MINMAX"
  131. "MULTI-TEX-COORD-1D-ARB"
  132. "MULTI-TEX-COORD-1F-ARB"
  133. "MULTI-TEX-COORD-1I-ARB"
  134. "MULTI-TEX-COORD-1S-ARB"
  135. "MULTI-TEX-COORD-2D-ARB"
  136. "MULTI-TEX-COORD-2F-ARB"
  137. "MULTI-TEX-COORD-2I-ARB"
  138. "MULTI-TEX-COORD-2S-ARB"
  139. "MULTI-TEX-COORD-3D-ARB"
  140. "MULTI-TEX-COORD-3F-ARB"
  141. "MULTI-TEX-COORD-3I-ARB"
  142. "MULTI-TEX-COORD-3S-ARB"
  143. "MULTI-TEX-COORD-4D-ARB"
  144. "MULTI-TEX-COORD-4F-ARB"
  145. "MULTI-TEX-COORD-4I-ARB"
  146. "MULTI-TEX-COORD-4S-ARB"
  147. "NORMAL-3B"
  148. "NORMAL-3D"
  149. "NORMAL-3F"
  150. "NORMAL-3I"
  151. "NORMAL-3S"
  152. "ORTHO"
  153. "PASS-THROUGH"
  154. "PIXEL-TRANSFER-F"
  155. "PIXEL-TRANSFER-I"
  156. "PIXEL-ZOOM"
  157. "POINT-SIZE"
  158. "POLYGON-MODE"
  159. "POLYGON-OFFSET"
  160. "POP-ATTRIB"
  161. "POP-MATRIX"
  162. "POP-NAME"
  163. "PUSH-ATTRIB"
  164. "PUSH-MATRIX"
  165. "PUSH-NAME"
  166. "RASTER-POS-2D"
  167. "RASTER-POS-2F"
  168. "RASTER-POS-2I"
  169. "RASTER-POS-2S"
  170. "RASTER-POS-3D"
  171. "RASTER-POS-3F"
  172. "RASTER-POS-3I"
  173. "RASTER-POS-3S"
  174. "RASTER-POS-4D"
  175. "RASTER-POS-4F"
  176. "RASTER-POS-4I"
  177. "RASTER-POS-4S"
  178. "READ-BUFFER"
  179. "RECT-D"
  180. "RECT-F"
  181. "RECT-I"
  182. "RECT-S"
  183. "RESET-HISTOGRAM"
  184. "RESET-MINMAX"
  185. "ROTATE-D"
  186. "ROTATE-F"
  187. "SCALE-D"
  188. "SCALE-F"
  189. "SCISSOR"
  190. "SHADE-MODEL"
  191. "STENCIL-FUNC"
  192. "STENCIL-MASK"
  193. "STENCIL-OP"
  194. "TEX-ENV-F"
  195. "TEX-ENV-I"
  196. "TEX-GEN-D"
  197. "TEX-GEN-F"
  198. "TEX-GEN-I"
  199. "TEX-PARAMETER-F"
  200. "TEX-PARAMETER-I"
  201. "TRANSLATE-D"
  202. "TRANSLATE-F"
  203. "VERTEX-2D"
  204. "VERTEX-2F"
  205. "VERTEX-2I"
  206. "VERTEX-2S"
  207. "VERTEX-3D"
  208. "VERTEX-3F"
  209. "VERTEX-3I"
  210. "VERTEX-3S"
  211. "VERTEX-4D"
  212. "VERTEX-4F"
  213. "VERTEX-4I"
  214. "VERTEX-4S"
  215. "VIEWPORT"
  216. ;; * Where did this come from?
  217. ;;"NO-FLOATS"
  218. ;; Non-rendering commands
  219. "NEW-LIST"
  220. "END-LIST"
  221. "GEN-LISTS"
  222. "ENABLE"
  223. "DISABLE"
  224. "FLUSH"
  225. "FINISH"
  226. ;; Constants
  227. ;; Boolean
  228. "+FALSE+"
  229. "+TRUE+"
  230. ;; Types
  231. "+BYTE+"
  232. "+UNSIGNED-BYTE+"
  233. "+SHORT+"
  234. "+UNSIGNED-SHORT+"
  235. "+INT+"
  236. "+UNSIGNED-INT+"
  237. "+FLOAT+"
  238. "+DOUBLE+"
  239. "+2-BYTES+"
  240. "+3-BYTES+"
  241. "+4-BYTES+"
  242. ;; Primitives
  243. "+POINTS+"
  244. "+LINES+"
  245. "+LINE-LOOP+"
  246. "+LINE-STRIP+"
  247. "+TRIANGLES+"
  248. "+TRIANGLE-STRIP+"
  249. "+triangle-fan+"
  250. "+QUADS+"
  251. "+QUAD-STRIP+"
  252. "+POLYGON+"
  253. ;; Arrays
  254. "+VERTEX-ARRAY+"
  255. "+NORMAL-ARRAY+"
  256. "+COLOR-ARRAY+"
  257. "+INDEX-ARRAY+"
  258. "+TEXTURE-COORD-ARRAY+"
  259. "+EDGE-FLAG-ARRAY+"
  260. "+VERTEX-ARRAY-SIZE+"
  261. "+VERTEX-ARRAY-TYPE+"
  262. "+VERTEX-ARRAY-STRIDE+"
  263. "+NORMAL-ARRAY-TYPE+"
  264. "+NORMAL-ARRAY-STRIDE+"
  265. "+COLOR-ARRAY-SIZE+"
  266. "+COLOR-ARRAY-TYPE+"
  267. "+COLOR-ARRAY-STRIDE+"
  268. "+INDEX-ARRAY-TYPE+"
  269. "+INDEX-ARRAY-STRIDE+"
  270. "+TEXTURE-COORD-ARRAY-SIZE+"
  271. "+TEXTURE-COORD-ARRAY-TYPE+"
  272. "+TEXTURE-COORD-ARRAY-STRIDE+"
  273. "+EDGE-FLAG-ARRAY-STRIDE+"
  274. "+VERTEX-ARRAY-POINTER+"
  275. "+NORMAL-ARRAY-POINTER+"
  276. "+COLOR-ARRAY-POINTER+"
  277. "+INDEX-ARRAY-POINTER+"
  278. "+TEXTURE-COORD-ARRAY-POINTER+"
  279. "+EDGE-FLAG-ARRAY-POINTER+"
  280. ;; Array formats
  281. "+V2F+"
  282. "+V3F+"
  283. "+C4UB-V2F+"
  284. "+C4UB-V3F+"
  285. "+C3F-V3F+"
  286. "+N3F-V3F+"
  287. "+C4F-N3F-V3F+"
  288. "+T2F-V3F+"
  289. "+T4F-V4F+"
  290. "+T2F-C4UB-V3F+"
  291. "+T2F-C3F-V3F+"
  292. "+T2F-N3F-V3F+"
  293. "+T2F-C4F-N3F-V3F+"
  294. "+T4F-C4F-N3F-V4F+"
  295. ;; Matrices
  296. "+MATRIX-MODE+"
  297. "+MODELVIEW+"
  298. "+PROJECTION+"
  299. "+TEXTURE+"
  300. ;; Points
  301. "+POINT-SMOOTH+"
  302. "+POINT-SIZE+"
  303. "+POINT-SIZE-GRANULARITY+"
  304. "+POINT-SIZE-RANGE+"
  305. ;; Lines
  306. "+LINE-SMOOTH+"
  307. "+LINE-STIPPLE+"
  308. "+LINE-STIPPLE-PATTERN+"
  309. "+LINE-STIPPLE-REPEAT+"
  310. "+LINE-WIDTH+"
  311. "+LINE-WIDTH-GRANULARITY+"
  312. "+LINE-WIDTH-RANGE+"
  313. ;; Polygons
  314. "+POINT+"
  315. "+LINE+"
  316. "+FILL+"
  317. "+CW+"
  318. "+CCW+"
  319. "+FRONT+"
  320. "+BACK+"
  321. "+POLYGON-MODE+"
  322. "+POLYGON-SMOOTH+"
  323. "+POLYGON-STIPPLE+"
  324. "+EDGE-FLAG+"
  325. "+CULL-FACE+"
  326. "+CULL-FACE-MODE+"
  327. "+FRONT-FACE+"
  328. "+POLYGON-OFFSET-FACTOR+"
  329. "+POLYGON-OFFSET-UNITS+"
  330. "+POLYGON-OFFSET-POINT+"
  331. "+POLYGON-OFFSET-LINE+"
  332. "+POLYGON-OFFSET-FILL+"
  333. ;; Display Lists
  334. "+COMPILE+"
  335. "+COMPILE-AND-EXECUTE+"
  336. "+LIST-BASE+"
  337. "+LIST-INDEX+"
  338. "+LIST-MODE+"
  339. ;; Depth Buffer
  340. "+NEVER+"
  341. "+LESS+"
  342. "+EQUAL+"
  343. "+LEQUAL+"
  344. "+GREATER+"
  345. "+NOTEQUAL+"
  346. "+GEQUAL+"
  347. "+ALWAYS+"
  348. "+DEPTH-TEST+"
  349. "+DEPTH-BITS+"
  350. "+DEPTH-CLEAR-VALUE+"
  351. "+DEPTH-FUNC+"
  352. "+DEPTH-RANGE+"
  353. "+DEPTH-WRITEMASK+"
  354. "+DEPTH-COMPONENT+"
  355. ;; Lighting
  356. "+LIGHTING+"
  357. "+LIGHT0+"
  358. "+LIGHT1+"
  359. "+LIGHT2+"
  360. "+LIGHT3+"
  361. "+LIGHT4+"
  362. "+LIGHT5+"
  363. "+LIGHT6+"
  364. "+LIGHT7+"
  365. "+SPOT-EXPONENT+"
  366. "+SPOT-CUTOFF+"
  367. "+CONSTANT-ATTENUATION+"
  368. "+LINEAR-ATTENUATION+"
  369. "+QUADRATIC-ATTENUATION+"
  370. "+AMBIENT+"
  371. "+DIFFUSE+"
  372. "+SPECULAR+"
  373. "+SHININESS+"
  374. "+EMISSION+"
  375. "+POSITION+"
  376. "+SPOT-DIRECTION+"
  377. "+AMBIENT-AND-DIFFUSE+"
  378. "+COLOR-INDEXES+"
  379. "+LIGHT-MODEL-TWO-SIDE+"
  380. "+LIGHT-MODEL-LOCAL-VIEWER+"
  381. "+LIGHT-MODEL-AMBIENT+"
  382. "+FRONT-AND-BACK+"
  383. "+SHADE-MODEL+"
  384. "+FLAT+"
  385. "+SMOOTH+"
  386. "+COLOR-MATERIAL+"
  387. "+COLOR-MATERIAL-FACE+"
  388. "+COLOR-MATERIAL-PARAMETER+"
  389. "+NORMALIZE+"
  390. ;; Clipping planes
  391. "+CLIP-PLANE0+"
  392. "+CLIP-PLANE1+"
  393. "+CLIP-PLANE2+"
  394. "+CLIP-PLANE3+"
  395. "+CLIP-PLANE4+"
  396. "+CLIP-PLANE5+"
  397. ;; Accumulation buffer
  398. "+ACCUM-RED-BITS+"
  399. "+ACCUM-GREEN-BITS+"
  400. "+ACCUM-BLUE-BITS+"
  401. "+ACCUM-ALPHA-BITS+"
  402. "+ACCUM-CLEAR-VALUE+"
  403. "+ACCUM+"
  404. "+ADD+"
  405. "+LOAD+"
  406. "+MULT+"
  407. "+RETURN+"
  408. ;; Alpha Testing
  409. "+ALPHA-TEST+"
  410. "+ALPHA-TEST-REF+"
  411. "+ALPHA-TEST-FUNC+"
  412. ;; Blending
  413. "+BLEND+"
  414. "+BLEND-SRC+"
  415. "+BLEND-DST+"
  416. "+ZERO+"
  417. "+ONE+"
  418. "+SRC-COLOR+"
  419. "+ONE-MINUS-SRC-COLOR+"
  420. "+DST-COLOR+"
  421. "+ONE-MINUS-DST-COLOR+"
  422. "+SRC-ALPHA+"
  423. "+ONE-MINUS-SRC-ALPHA+"
  424. "+DST-ALPHA+"
  425. "+ONE-MINUS-DST-ALPHA+"
  426. "+SRC-ALPHA-SATURATE+"
  427. "+CONSTANT-COLOR+"
  428. "+ONE-MINUS-CONSTANT-COLOR+"
  429. "+CONSTANT-ALPHA+"
  430. "+ONE-MINUS-CONSTANT-ALPHA+"
  431. ;; Render mode
  432. "+FEEDBACK+"
  433. "+RENDER+"
  434. "+SELECT+"
  435. ;; Feedback
  436. "+2D+"
  437. "+3D+"
  438. "+3D-COLOR+"
  439. "+3D-COLOR-TEXTURE+"
  440. "+4D-COLOR-TEXTURE+"
  441. "+POINT-TOKEN+"
  442. "+LINE-TOKEN+"
  443. "+LINE-RESET-TOKEN+"
  444. "+POLYGON-TOKEN+"
  445. "+BITMAP-TOKEN+"
  446. "+DRAW-PIXEL-TOKEN+"
  447. "+COPY-PIXEL-TOKEN+"
  448. "+PASS-THROUGH-TOKEN+"
  449. "+FEEDBACK-BUFFER-POINTER+"
  450. "+FEEDBACK-BUFFER-SIZE+"
  451. "+FEEDBACK-BUFFER-TYPE+"
  452. ;; Selection
  453. "+SELECTION-BUFFER-POINTER+"
  454. "+SELECTION-BUFFER-SIZE+"
  455. ;; Fog
  456. "+FOG+"
  457. "+FOG-MODE+"
  458. "+FOG-DENSITY+"
  459. "+FOG-COLOR+"
  460. "+FOG-INDEX+"
  461. "+FOG-START+"
  462. "+FOG-END+"
  463. "+LINEAR+"
  464. "+EXP+"
  465. "+EXP2+"
  466. ;; Logic operations
  467. "+LOGIC-OP+"
  468. "+INDEX-LOGIC-OP+"
  469. "+COLOR-LOGIC-OP+"
  470. "+LOGIC-OP-MODE+"
  471. "+CLEAR+"
  472. "+SET+"
  473. "+COPY+"
  474. "+COPY-INVERTED+"
  475. "+NOOP+"
  476. "+INVERT+"
  477. "+AND+"
  478. "+NAND+"
  479. "+OR+"
  480. "+NOR+"
  481. "+XOR+"
  482. "+EQUIV+"
  483. "+AND-REVERSE+"
  484. "+AND-INVERTED+"
  485. "+OR-REVERSE+"
  486. "+OR-INVERTED+"
  487. ;; Stencil
  488. "+STENCIL-TEST+"
  489. "+STENCIL-WRITEMASK+"
  490. "+STENCIL-BITS+"
  491. "+STENCIL-FUNC+"
  492. "+STENCIL-VALUE-MASK+"
  493. "+STENCIL-REF+"
  494. "+STENCIL-FAIL+"
  495. "+STENCIL-PASS-DEPTH-PASS+"
  496. "+STENCIL-PASS-DEPTH-FAIL+"
  497. "+STENCIL-CLEAR-VALUE+"
  498. "+STENCIL-INDEX+"
  499. "+KEEP+"
  500. "+REPLACE+"
  501. "+INCR+"
  502. "+DECR+"
  503. ;; Buffers, Pixel Drawing/Reading
  504. "+NONE+"
  505. "+LEFT+"
  506. "+RIGHT+"
  507. "+FRONT-LEFT+"
  508. "+FRONT-RIGHT+"
  509. "+BACK-LEFT+"
  510. "+BACK-RIGHT+"
  511. "+AUX0+"
  512. "+AUX1+"
  513. "+AUX2+"
  514. "+AUX3+"
  515. "+COLOR-INDEX+"
  516. "+RED+"
  517. "+GREEN+"
  518. "+BLUE+"
  519. "+ALPHA+"
  520. "+LUMINANCE+"
  521. "+LUMINANCE-ALPHA+"
  522. "+ALPHA-BITS+"
  523. "+RED-BITS+"
  524. "+GREEN-BITS+"
  525. "+BLUE-BITS+"
  526. "+INDEX-BITS+"
  527. "+SUBPIXEL-BITS+"
  528. "+AUX-BUFFERS+"
  529. "+READ-BUFFER+"
  530. "+DRAW-BUFFER+"
  531. "+DOUBLEBUFFER+"
  532. "+STEREO+"
  533. "+BITMAP+"
  534. "+COLOR+"
  535. "+DEPTH+"
  536. "+STENCIL+"
  537. "+DITHER+"
  538. "+RGB+"
  539. "+RGBA+"
  540. ;; Implementation Limits
  541. "+MAX-LIST-NESTING+"
  542. "+MAX-ATTRIB-STACK-DEPTH+"
  543. "+MAX-MODELVIEW-STACK-DEPTH+"
  544. "+MAX-NAME-STACK-DEPTH+"
  545. "+MAX-PROJECTION-STACK-DEPTH+"
  546. "+MAX-TEXTURE-STACK-DEPTH+"
  547. "+MAX-EVAL-ORDER+"
  548. "+MAX-LIGHTS+"
  549. "+MAX-CLIP-PLANES+"
  550. "+MAX-TEXTURE-SIZE+"
  551. "+MAX-PIXEL-MAP-TABLE+"
  552. "+MAX-VIEWPORT-DIMS+"
  553. "+MAX-CLIENT-ATTRIB-STACK-DEPTH+"
  554. ;; Gets
  555. "+ATTRIB-STACK-DEPTH+"
  556. "+CLIENT-ATTRIB-STACK-DEPTH+"
  557. "+COLOR-CLEAR-VALUE+"
  558. "+COLOR-WRITEMASK+"
  559. "+CURRENT-INDEX+"
  560. "+CURRENT-COLOR+"
  561. "+CURRENT-NORMAL+"
  562. "+CURRENT-RASTER-COLOR+"
  563. "+CURRENT-RASTER-DISTANCE+"
  564. "+current-raster-index+"
  565. "+CURRENT-RASTER-POSITION+"
  566. "+CURRENT-RASTER-TEXTURE-COORDS+"
  567. "+CURRENT-RASTER-POSITION-VALID+"
  568. "+CURRENT-TEXTURE-COORDS+"
  569. "+INDEX-CLEAR-VALUE+"
  570. "+INDEX-MODE+"
  571. "+INDEX-WRITEMASK+"
  572. "+MODELVIEW-MATRIX+"
  573. "+MODELVIEW-STACK-DEPTH+"
  574. "+NAME-STACK-DEPTH+"
  575. "+PROJECTION-MATRIX+"
  576. "+PROJECTION-STACK-DEPTH+"
  577. "+RENDER-MODE+"
  578. "+RGBA-MODE+"
  579. "+TEXTURE-MATRIX+"
  580. "+TEXTURE-STACK-DEPTH+"
  581. "+VIEWPORT+"
  582. ;; GL Evaluators
  583. "+AUTO-NORMAL+"
  584. "+MAP1-COLOR-4+"
  585. "+MAP1-GRID-DOMAIN+"
  586. "+MAP1-GRID-SEGMENTS+"
  587. "+MAP1-INDEX+"
  588. "+MAP1-NORMAL+"
  589. "+MAP1-TEXTURE-COORD-1+"
  590. "+MAP1-TEXTURE-COORD-2+"
  591. "+MAP1-TEXTURE-COORD-3+"
  592. "+MAP1-TEXTURE-COORD-4+"
  593. "+MAP1-VERTEX-3+"
  594. "+MAP1-VERTEX-4+"
  595. "+MAP2-COLOR-4+"
  596. "+MAP2-GRID-DOMAIN+"
  597. "+MAP2-GRID-SEGMENTS+"
  598. "+MAP2-INDEX+"
  599. "+MAP2-NORMAL+"
  600. "+MAP2-TEXTURE-COORD-1+"
  601. "+MAP2-TEXTURE-COORD-2+"
  602. "+MAP2-TEXTURE-COORD-3+"
  603. "+MAP2-TEXTURE-COORD-4+"
  604. "+MAP2-VERTEX-3+"
  605. "+MAP2-VERTEX-4+"
  606. "+COEFF+"
  607. "+DOMAIN+"
  608. "+ORDER+"
  609. ;; Hints
  610. "+FOG-HINT+"
  611. "+LINE-SMOOTH-HINT+"
  612. "+PERSPECTIVE-CORRECTION-HINT+"
  613. "+POINT-SMOOTH-HINT+"
  614. "+POLYGON-SMOOTH-HINT+"
  615. "+DONT-CARE+"
  616. "+FASTEST+"
  617. "+NICEST+"
  618. ;; Scissor box
  619. "+SCISSOR-TEST+"
  620. "+SCISSOR-BOX+"
  621. ;; Pixel Mode / Transfer
  622. "+MAP-COLOR+"
  623. "+MAP-STENCIL+"
  624. "+INDEX-SHIFT+"
  625. "+INDEX-OFFSET+"
  626. "+RED-SCALE+"
  627. "+RED-BIAS+"
  628. "+GREEN-SCALE+"
  629. "+GREEN-BIAS+"
  630. "+BLUE-SCALE+"
  631. "+BLUE-BIAS+"
  632. "+ALPHA-SCALE+"
  633. "+ALPHA-BIAS+"
  634. "+DEPTH-SCALE+"
  635. "+DEPTH-BIAS+"
  636. "+PIXEL-MAP-S-TO-S-SIZE+"
  637. "+PIXEL-MAP-I-TO-I-SIZE+"
  638. "+PIXEL-MAP-I-TO-R-SIZE+"
  639. "+PIXEL-MAP-I-TO-G-SIZE+"
  640. "+PIXEL-MAP-I-TO-B-SIZE+"
  641. "+PIXEL-MAP-I-TO-A-SIZE+"
  642. "+PIXEL-MAP-R-TO-R-SIZE+"
  643. "+PIXEL-MAP-G-TO-G-SIZE+"
  644. "+PIXEL-MAP-B-TO-B-SIZE+"
  645. "+PIXEL-MAP-A-TO-A-SIZE+"
  646. "+PIXEL-MAP-S-TO-S+"
  647. "+PIXEL-MAP-I-TO-I+"
  648. "+PIXEL-MAP-I-TO-R+"
  649. "+PIXEL-MAP-I-TO-G+"
  650. "+PIXEL-MAP-I-TO-B+"
  651. "+PIXEL-MAP-I-TO-A+"
  652. "+PIXEL-MAP-R-TO-R+"
  653. "+PIXEL-MAP-G-TO-G+"
  654. "+PIXEL-MAP-B-TO-B+"
  655. "+PIXEL-MAP-A-TO-A+"
  656. "+PACK-ALIGNMENT+"
  657. "+PACK-LSB-FIRST+"
  658. "+PACK-ROW-LENGTH+"
  659. "+PACK-SKIP-PIXELS+"
  660. "+PACK-SKIP-ROWS+"
  661. "+PACK-SWAP-BYTES+"
  662. "+UNPACK-ALIGNMENT+"
  663. "+UNPACK-LSB-FIRST+"
  664. "+UNPACK-ROW-LENGTH+"
  665. "+UNPACK-SKIP-PIXELS+"
  666. "+UNPACK-SKIP-ROWS+"
  667. "+UNPACK-SWAP-BYTES+"
  668. "+ZOOM-X+"
  669. "+ZOOM-Y+"
  670. ;; Texture Mapping
  671. "+TEXTURE-ENV+"
  672. "+TEXTURE-ENV-MODE+"
  673. "+TEXTURE-1D+"
  674. "+TEXTURE-2D+"
  675. "+TEXTURE-WRAP-S+"
  676. "+TEXTURE-WRAP-T+"
  677. "+TEXTURE-MAG-FILTER+"
  678. "+TEXTURE-MIN-FILTER+"
  679. "+TEXTURE-ENV-COLOR+"
  680. "+TEXTURE-GEN-S+"
  681. "+TEXTURE-GEN-T+"
  682. "+TEXTURE-GEN-MODE+"
  683. "+TEXTURE-BORDER-COLOR+"
  684. "+TEXTURE-WIDTH+"
  685. "+TEXTURE-HEIGHT+"
  686. "+TEXTURE-BORDER+"
  687. "+TEXTURE-COMPONENTS+"
  688. "+TEXTURE-RED-SIZE+"
  689. "+TEXTURE-GREEN-SIZE+"
  690. "+TEXTURE-BLUE-SIZE+"
  691. "+TEXTURE-ALPHA-SIZE+"
  692. "+TEXTURE-LUMINANCE-SIZE+"
  693. "+TEXTURE-INTENSITY-SIZE+"
  694. "+NEAREST-MIPMAP-NEAREST+"
  695. "+NEAREST-MIPMAP-LINEAR+"
  696. "+LINEAR-MIPMAP-NEAREST+"
  697. "+LINEAR-MIPMAP-LINEAR+"
  698. "+OBJECT-LINEAR+"
  699. "+OBJECT-PLANE+"
  700. "+EYE-LINEAR+"
  701. "+EYE-PLANE+"
  702. "+SPHERE-MAP+"
  703. "+DECAL+"
  704. "+MODULATE+"
  705. "+NEAREST+"
  706. "+REPEAT+"
  707. "+CLAMP+"
  708. "+S+"
  709. "+T+"
  710. "+R+"
  711. "+Q+"
  712. "+TEXTURE-GEN-R+"
  713. "+TEXTURE-GEN-Q+"
  714. ;; GL 1.1 Texturing
  715. "+PROXY-TEXTURE-1D+"
  716. "+PROXY-TEXTURE-2D+"
  717. "+TEXTURE-PRIORITY+"
  718. "+TEXTURE-RESIDENT+"
  719. "+TEXTURE-BINDING-1D+"
  720. "+TEXTURE-BINDING-2D+"
  721. "+TEXTURE-INTERNAL-FORMAT+"
  722. "+PACK-SKIP-IMAGES+"
  723. "+PACK-IMAGE-HEIGHT+"
  724. "+UNPACK-SKIP-IMAGES+"
  725. "+UNPACK-IMAGE-HEIGHT+"
  726. "+TEXTURE-3D+"
  727. "+PROXY-TEXTURE-3D+"
  728. "+TEXTURE-DEPTH+"
  729. "+TEXTURE-WRAP-R+"
  730. "+MAX-3D-TEXTURE-SIZE+"
  731. "+TEXTURE-BINDING-3D+"
  732. ;; Internal texture formats (GL 1.1)
  733. "+ALPHA4+"
  734. "+ALPHA8+"
  735. "+ALPHA12+"
  736. "+ALPHA16+"
  737. "+LUMINANCE4+"
  738. "+LUMINANCE8+"
  739. "+LUMINANCE12+"
  740. "+LUMINANCE16+"
  741. "+LUMINANCE4-ALPHA4+"
  742. "+LUMINANCE6-ALPHA2+"
  743. "+LUMINANCE8-ALPHA8+"
  744. "+LUMINANCE12-ALPHA4+"
  745. "+LUMINANCE12-ALPHA12+"
  746. "+LUMINANCE16-ALPHA16+"
  747. "+INTENSITY+"
  748. "+INTENSITY4+"
  749. "+INTENSITY8+"
  750. "+INTENSITY12+"
  751. "+INTENSITY16+"
  752. "+R3-G3-B2+"
  753. "+RGB4+"
  754. "+RGB5+"
  755. "+RGB8+"
  756. "+RGB10+"
  757. "+RGB12+"
  758. "+RGB16+"
  759. "+RGBA2+"
  760. "+RGBA4+"
  761. "+RGB5-A1+"
  762. "+RGBA8+"
  763. "+rgb10-a2+"
  764. "+RGBA12+"
  765. "+RGBA16+"
  766. ;; Utility
  767. "+VENDOR+"
  768. "+RENDERER+"
  769. "+VERSION+"
  770. "+EXTENSIONS+"
  771. ;; Errors
  772. "+NO-ERROR+"
  773. "+INVALID-VALUE+"
  774. "+INVALID-ENUM+"
  775. "+INVALID-OPERATION+"
  776. "+STACK-OVERFLOW+"
  777. "+STACK-UNDERFLOW+"
  778. "+OUT-OF-MEMORY+"
  779. ;; OpenGL 1.2
  780. "+RESCALE-NORMAL+"
  781. "+CLAMP-TO-EDGE+"
  782. "+MAX-ELEMENTS-VERTICES+"
  783. "+MAX-ELEMENTS-INDICES+"
  784. "+BGR+"
  785. "+BGRA+"
  786. "+UNSIGNED-BYTE-3-3-2+"
  787. "+UNSIGNED-BYTE-2-3-3-REV+"
  788. "+UNSIGNED-SHORT-5-6-5+"
  789. "+UNSIGNED-SHORT-5-6-5-REV+"
  790. "+UNSIGNED-SHORT-4-4-4-4+"
  791. "+UNSIGNED-SHORT-4-4-4-4-REV+"
  792. "+UNSIGNED-SHORT-5-5-5-1+"
  793. "+UNSIGNED-SHORT-1-5-5-5-REV+"
  794. "+UNSIGNED-INT-8-8-8-8+"
  795. "+UNSIGNED-INT-8-8-8-8-REV+"
  796. "+UNSIGNED-INT-10-10-10-2+"
  797. "+UNSIGNED-INT-2-10-10-10-REV+"
  798. "+LIGHT-MODEL-COLOR-CONTROL+"
  799. "+SINGLE-COLOR+"
  800. "+SEPARATE-SPECULAR-COLOR+"
  801. "+TEXTURE-MIN-LOD+"
  802. "+TEXTURE-MAX-LOD+"
  803. "+TEXTURE-BASE-LEVEL+"
  804. "+TEXTURE-MAX-LEVEL+"
  805. "+SMOOTH-POINT-SIZE-RANGE+"
  806. "+SMOOTH-POINT-SIZE-GRANULARITY+"
  807. "+SMOOTH-LINE-WIDTH-RANGE+"
  808. "+SMOOTH-LINE-WIDTH-GRANULARITY+"
  809. "+ALIASED-POINT-SIZE-RANGE+"
  810. "+ALIASED-LINE-WIDTH-RANGE+"
  811. ;; OpenGL 1.2 Imaging subset
  812. ;; GL_EXT_color_table
  813. "+COLOR-TABLE+"
  814. "+POST-CONVOLUTION-COLOR-TABLE+"
  815. "+POST-COLOR-MATRIX-COLOR-TABLE+"
  816. "+PROXY-COLOR-TABLE+"
  817. "+PROXY-POST-CONVOLUTION-COLOR-TABLE+"
  818. "+PROXY-POST-COLOR-MATRIX-COLOR-TABLE+"
  819. "+COLOR-TABLE-SCALE+"
  820. "+COLOR-TABLE-BIAS+"
  821. "+COLOR-TABLE-FORMAT+"
  822. "+COLOR-TABLE-WIDTH+"
  823. "+COLOR-TABLE-RED-SIZE+"
  824. "+COLOR-TABLE-GREEN-SIZE+"
  825. "+COLOR-TABLE-BLUE-SIZE+"
  826. "+COLOR-TABLE-ALPHA-SIZE+"
  827. "+COLOR-TABLE-LUMINANCE-SIZE+"
  828. "+COLOR-TABLE-INTENSITY-SIZE+"
  829. ;; GL_EXT_convolution and GL_HP_convolution
  830. "+CONVOLUTION-1D+"
  831. "+CONVOLUTION-2D+"
  832. "+SEPARABLE-2D+"
  833. "+CONVOLUTION-BORDER-MODE+"
  834. "+CONVOLUTION-FILTER-SCALE+"
  835. "+CONVOLUTION-FILTER-BIAS+"
  836. "+REDUCE+"
  837. "+CONVOLUTION-FORMAT+"
  838. "+CONVOLUTION-WIDTH+"
  839. "+CONVOLUTION-HEIGHT+"
  840. "+MAX-CONVOLUTION-WIDTH+"
  841. "+MAX-CONVOLUTION-HEIGHT+"
  842. "+POST-CONVOLUTION-RED-SCALE+"
  843. "+POST-CONVOLUTION-GREEN-SCALE+"
  844. "+POST-CONVOLUTION-BLUE-SCALE+"
  845. "+POST-CONVOLUTION-ALPHA-SCALE+"
  846. "+POST-CONVOLUTION-RED-BIAS+"
  847. "+POST-CONVOLUTION-GREEN-BIAS+"
  848. "+POST-CONVOLUTION-BLUE-BIAS+"
  849. "+POST-CONVOLUTION-ALPHA-BIAS+"
  850. "+CONSTANT-BORDER+"
  851. "+REPLICATE-BORDER+"
  852. "+CONVOLUTION-BORDER-COLOR+"
  853. ;; GL_SGI_color_matrix
  854. "+COLOR-MATRIX+"
  855. "+COLOR-MATRIX-STACK-DEPTH+"
  856. "+MAX-COLOR-MATRIX-STACK-DEPTH+"
  857. "+POST-COLOR-MATRIX-RED-SCALE+"
  858. "+POST-COLOR-MATRIX-GREEN-SCALE+"
  859. "+POST-COLOR-MATRIX-BLUE-SCALE+"
  860. "+POST-COLOR-MATRIX-ALPHA-SCALE+"
  861. "+POST-COLOR-MATRIX-RED-BIAS+"
  862. "+POST-COLOR-MATRIX-GREEN-BIAS+"
  863. "+POST-COLOR-MATRIX-BLUE-BIAS+"
  864. "+POST-COLOR-MATRIX-ALPHA-BIAS+"
  865. ;; GL_EXT_histogram
  866. "+HISTOGRAM+"
  867. "+PROXY-HISTOGRAM+"
  868. "+HISTOGRAM-WIDTH+"
  869. "+HISTOGRAM-FORMAT+"
  870. "+HISTOGRAM-RED-SIZE+"
  871. "+HISTOGRAM-GREEN-SIZE+"
  872. "+HISTOGRAM-BLUE-SIZE+"
  873. "+HISTOGRAM-ALPHA-SIZE+"
  874. "+HISTOGRAM-LUMINANCE-SIZE+"
  875. "+HISTOGRAM-SINK+"
  876. "+MINMAX+"
  877. "+MINMAX-FORMAT+"
  878. "+MINMAX-SINK+"
  879. "+TABLE-TOO-LARGE+"
  880. ;; GL_EXT_blend_color, GL_EXT_blend_minmax
  881. "+BLEND-EQUATION+"
  882. "+MIN+"
  883. "+MAX+"
  884. "+FUNC-ADD+"
  885. "+FUNC-SUBTRACT+"
  886. "+FUNC-REVERSE-SUBTRACT+"
  887. ;; glPush/PopAttrib bits
  888. "+CURRENT-BIT+"
  889. "+POINT-BIT+"
  890. "+LINE-BIT+"
  891. "+POLYGON-BIT+"
  892. "+POLYGON-STIPPLE-BIT+"
  893. "+PIXEL-MODE-BIT+"
  894. "+LIGHTING-BIT+"
  895. "+FOG-BIT+"
  896. "+DEPTH-BUFFER-BIT+"
  897. "+ACCUM-BUFFER-BIT+"
  898. "+STENCIL-BUFFER-BIT+"
  899. "+VIEWPORT-BIT+"
  900. "+TRANSFORM-BIT+"
  901. "+ENABLE-BIT+"
  902. "+COLOR-BUFFER-BIT+"
  903. "+HINT-BIT+"
  904. "+EVAL-BIT+"
  905. "+LIST-BIT+"
  906. "+TEXTURE-BIT+"
  907. "+SCISSOR-BIT+"
  908. "+ALL-ATTRIB-BITS+"
  909. "+CLIENT-PIXEL-STORE-BIT+"
  910. "+CLIENT-VERTEX-ARRAY-BIT+"
  911. "+CLIENT-ALL-ATTRIB-BITS+"
  912. ;; ARB Multitexturing extension
  913. "+ARB-MULTITEXTURE+"
  914. "+TEXTURE0-ARB+"
  915. "+TEXTURE1-ARB+"
  916. "+TEXTURE2-ARB+"
  917. "+TEXTURE3-ARB+"
  918. "+TEXTURE4-ARB+"
  919. "+TEXTURE5-ARB+"
  920. "+TEXTURE6-ARB+"
  921. "+TEXTURE7-ARB+"
  922. "+TEXTURE8-ARB+"
  923. "+TEXTURE9-ARB+"
  924. "+TEXTURE10-ARB+"
  925. "+TEXTURE11-ARB+"
  926. "+TEXTURE12-ARB+"
  927. "+TEXTURE13-ARB+"
  928. "+TEXTURE14-ARB+"
  929. "+TEXTURE15-ARB+"
  930. "+TEXTURE16-ARB+"
  931. "+TEXTURE17-ARB+"
  932. "+TEXTURE18-ARB+"
  933. "+TEXTURE19-ARB+"
  934. "+TEXTURE20-ARB+"
  935. "+TEXTURE21-ARB+"
  936. "+TEXTURE22-ARB+"
  937. "+TEXTURE23-ARB+"
  938. "+TEXTURE24-ARB+"
  939. "+TEXTURE25-ARB+"
  940. "+TEXTURE26-ARB+"
  941. "+TEXTURE27-ARB+"
  942. "+TEXTURE28-ARB+"
  943. "+TEXTURE29-ARB+"
  944. "+TEXTURE30-ARB+"
  945. "+TEXTURE31-ARB+"
  946. "+ACTIVE-TEXTURE-ARB+"
  947. "+CLIENT-ACTIVE-TEXTURE-ARB+"
  948. "+MAX-TEXTURE-UNITS-ARB+"
  949. ;;; Misc extensions
  950. "+EXT-ABGR+"
  951. "+ABGR-EXT+"
  952. "+EXT-BLEND-COLOR+"
  953. "+CONSTANT-COLOR-EXT+"
  954. "+ONE-MINUS-CONSTANT-COLOR-EXT+"
  955. "+CONSTANT-ALPHA-EXT+"
  956. "+ONE-MINUS-CONSTANT-ALPHA-EXT+"
  957. "+blend-color-ext+"
  958. "+EXT-POLYGON-OFFSET+"
  959. "+POLYGON-OFFSET-EXT+"
  960. "+POLYGON-OFFSET-FACTOR-EXT+"
  961. "+POLYGON-OFFSET-BIAS-EXT+"
  962. "+EXT-TEXTURE3D+"
  963. "+PACK-SKIP-IMAGES-EXT+"
  964. "+PACK-IMAGE-HEIGHT-EXT+"
  965. "+UNPACK-SKIP-IMAGES-EXT+"
  966. "+UNPACK-IMAGE-HEIGHT-EXT+"
  967. "+TEXTURE-3D-EXT+"
  968. "+PROXY-TEXTURE-3D-EXT+"
  969. "+TEXTURE-DEPTH-EXT+"
  970. "+TEXTURE-WRAP-R-EXT+"
  971. "+MAX-3D-TEXTURE-SIZE-EXT+"
  972. "+TEXTURE-3D-BINDING-EXT+"
  973. "+EXT-TEXTURE-OBJECT+"
  974. "+TEXTURE-PRIORITY-EXT+"
  975. "+TEXTURE-RESIDENT-EXT+"
  976. "+TEXTURE-1D-BINDING-EXT+"
  977. "+TEXTURE-2D-BINDING-EXT+"
  978. "+EXT-RESCALE-NORMAL+"
  979. "+RESCALE-NORMAL-EXT+"
  980. "+EXT-VERTEX-ARRAY+"
  981. "+VERTEX-ARRAY-EXT+"
  982. "+NORMAL-ARRAY-EXT+"
  983. "+COLOR-ARRAY-EXT+"
  984. "+INDEX-ARRAY-EXT+"
  985. "+TEXTURE-COORD-ARRAY-EXT+"
  986. "+EDGE-FLAG-ARRAY-EXT+"
  987. "+VERTEX-ARRAY-SIZE-EXT+"
  988. "+VERTEX-ARRAY-TYPE-EXT+"
  989. "+VERTEX-ARRAY-STRIDE-EXT+"
  990. "+VERTEX-ARRAY-COUNT-EXT+"
  991. "+NORMAL-ARRAY-TYPE-EXT+"
  992. "+NORMAL-ARRAY-STRIDE-EXT+"
  993. "+NORMAL-ARRAY-COUNT-EXT+"
  994. "+COLOR-ARRAY-SIZE-EXT+"
  995. "+COLOR-ARRAY-TYPE-EXT+"
  996. "+COLOR-ARRAY-STRIDE-EXT+"
  997. "+COLOR-ARRAY-COUNT-EXT+"
  998. "+INDEX-ARRAY-TYPE-EXT+"
  999. "+INDEX-ARRAY-STRIDE-EXT+"
  1000. "+INDEX-ARRAY-COUNT-EXT+"
  1001. "+TEXTURE-COORD-ARRAY-SIZE-EXT+"
  1002. "+TEXTURE-COORD-ARRAY-TYPE-EXT+"
  1003. "+TEXTURE-COORD-ARRAY-STRIDE-EXT+"
  1004. "+TEXTURE-COORD-ARRAY-COUNT-EXT+"
  1005. "+EDGE-FLAG-ARRAY-STRIDE-EXT+"
  1006. "+EDGE-FLAG-ARRAY-COUNT-EXT+"
  1007. "+VERTEX-ARRAY-POINTER-EXT+"
  1008. "+NORMAL-ARRAY-POINTER-EXT+"
  1009. "+COLOR-ARRAY-POINTER-EXT+"
  1010. "+INDEX-ARRAY-POINTER-EXT+"
  1011. "+TEXTURE-COORD-ARRAY-POINTER-EXT+"
  1012. "+EDGE-FLAG-ARRAY-POINTER-EXT+"
  1013. "+SGIS-TEXTURE-EDGE-CLAMP+"
  1014. "+CLAMP-TO-EDGE-SGIS+"
  1015. "+EXT-BLEND-MINMAX+"
  1016. "+FUNC-ADD-EXT+"
  1017. "+MIN-EXT+"
  1018. "+MAX-EXT+"
  1019. "+BLEND-EQUATION-EXT+"
  1020. "+EXT-BLEND-SUBTRACT+"
  1021. "+FUNC-SUBTRACT-EXT+"
  1022. "+FUNC-REVERSE-SUBTRACT-EXT+"
  1023. "+EXT-BLEND-LOGIC-OP+"
  1024. "+EXT-POINT-PARAMETERS+"
  1025. "+POINT-SIZE-MIN-EXT+"
  1026. "+POINT-SIZE-MAX-EXT+"
  1027. "+POINT-FADE-THRESHOLD-SIZE-EXT+"
  1028. "+DISTANCE-ATTENUATION-EXT+"
  1029. "+EXT-PALETTED-TEXTURE+"
  1030. "+TABLE-TOO-LARGE-EXT+"
  1031. "+COLOR-TABLE-FORMAT-EXT+"
  1032. "+COLOR-TABLE-WIDTH-EXT+"
  1033. "+COLOR-TABLE-RED-SIZE-EXT+"
  1034. "+COLOR-TABLE-GREEN-SIZE-EXT+"
  1035. "+COLOR-TABLE-BLUE-SIZE-EXT+"
  1036. "+COLOR-TABLE-ALPHA-SIZE-EXT+"
  1037. "+COLOR-TABLE-LUMINANCE-SIZE-EXT+"
  1038. "+COLOR-TABLE-INTENSITY-SIZE-EXT+"
  1039. "+TEXTURE-INDEX-SIZE-EXT+"
  1040. "+COLOR-INDEX1-EXT+"
  1041. "+COLOR-INDEX2-EXT+"
  1042. "+COLOR-INDEX4-EXT+"
  1043. "+COLOR-INDEX8-EXT+"
  1044. "+COLOR-INDEX12-EXT+"
  1045. "+COLOR-INDEX16-EXT+"
  1046. "+EXT-CLIP-VOLUME-HINT+"
  1047. "+CLIP-VOLUME-CLIPPING-HINT-EXT+"
  1048. "+EXT-COMPILED-VERTEX-ARRAY+"
  1049. "+ARRAY-ELEMENT-LOCK-FIRST-EXT+"
  1050. "+ARRAY-ELEMENT-LOCK-COUNT-EXT+"
  1051. "+HP-OCCLUSION-TEST+"
  1052. "+OCCLUSION-TEST-HP+"
  1053. "+OCCLUSION-TEST-RESULT-HP+"
  1054. "+EXT-SHARED-TEXTURE-PALETTE+"
  1055. "+SHARED-TEXTURE-PALETTE-EXT+"
  1056. "+EXT-STENCIL-WRAP+"
  1057. "+INCR-WRAP-EXT+"
  1058. "+DECR-WRAP-EXT+"
  1059. "+NV-TEXGEN-REFLECTION+"
  1060. "+NORMAL-MAP-NV+"
  1061. "+REFLECTION-MAP-NV+"
  1062. "+EXT-TEXTURE-ENV-ADD+"
  1063. "+MESA-WINDOW-POS+"
  1064. "+MESA-RESIZE-BUFFERS+"
  1065. ))
  1066. (in-package :gl)
  1067. ;;; Opcodes.
  1068. (eval-when (:compile-toplevel :load-toplevel :execute)
  1069. (defconstant +get-string+ 129)
  1070. (defconstant +new-list+ 101)
  1071. (defconstant +end-list+ 102)
  1072. (defconstant +gen-lists+ 104)
  1073. (defconstant +finish+ 108)
  1074. (defconstant +disable+ 138)
  1075. (defconstant +enable+ 139)
  1076. (defconstant +flush+ 142)
  1077. ;;; Constants.
  1078. ;;; Shamelessly taken from CL-SDL.
  1079. ;; Boolean
  1080. (defconstant +false+ #x0)
  1081. (defconstant +true+ #x1)
  1082. ;; Types
  1083. (defconstant +byte+ #x1400)
  1084. (defconstant +unsigned-byte+ #x1401)
  1085. (defconstant +short+ #x1402)
  1086. (defconstant +unsigned-short+ #x1403)
  1087. (defconstant +int+ #x1404)
  1088. (defconstant +unsigned-int+ #x1405)
  1089. (defconstant +float+ #x1406)
  1090. (defconstant +double+ #x140a)
  1091. (defconstant +2-bytes+ #x1407)
  1092. (defconstant +3-bytes+ #x1408)
  1093. (defconstant +4-bytes+ #x1409)
  1094. ;; Primitives
  1095. (defconstant +points+ #x0000)
  1096. (defconstant +lines+ #x0001)
  1097. (defconstant +line-loop+ #x0002)
  1098. (defconstant +line-strip+ #x0003)
  1099. (defconstant +triangles+ #x0004)
  1100. (defconstant +triangle-strip+ #x0005)
  1101. (defconstant +triangle-fan+ #x0006)
  1102. (defconstant +quads+ #x0007)
  1103. (defconstant +quad-strip+ #x0008)
  1104. (defconstant +polygon+ #x0009)
  1105. ;; Arrays
  1106. (defconstant +vertex-array+ #x8074)
  1107. (defconstant +normal-array+ #x8075)
  1108. (defconstant +color-array+ #x8076)
  1109. (defconstant +index-array+ #x8077)
  1110. (defconstant +texture-coord-array+ #x8078)
  1111. (defconstant +edge-flag-array+ #x8079)
  1112. (defconstant +vertex-array-size+ #x807a)
  1113. (defconstant +vertex-array-type+ #x807b)
  1114. (defconstant +vertex-array-stride+ #x807c)
  1115. (defconstant +normal-array-type+ #x807e)
  1116. (defconstant +normal-array-stride+ #x807f)
  1117. (defconstant +color-array-size+ #x8081)
  1118. (defconstant +color-array-type+ #x8082)
  1119. (defconstant +color-array-stride+ #x8083)
  1120. (defconstant +index-array-type+ #x8085)
  1121. (defconstant +index-array-stride+ #x8086)
  1122. (defconstant +texture-coord-array-size+ #x8088)
  1123. (defconstant +texture-coord-array-type+ #x8089)
  1124. (defconstant +texture-coord-array-stride+ #x808a)
  1125. (defconstant +edge-flag-array-stride+ #x808c)
  1126. (defconstant +vertex-array-pointer+ #x808e)
  1127. (defconstant +normal-array-pointer+ #x808f)
  1128. (defconstant +color-array-pointer+ #x8090)
  1129. (defconstant +index-array-pointer+ #x8091)
  1130. (defconstant +texture-coord-array-pointer+ #x8092)
  1131. (defconstant +edge-flag-array-pointer+ #x8093)
  1132. ;; Array formats
  1133. (defconstant +v2f+ #x2a20)
  1134. (defconstant +v3f+ #x2a21)
  1135. (defconstant +c4ub-v2f+ #x2a22)
  1136. (defconstant +c4ub-v3f+ #x2a23)
  1137. (defconstant +c3f-v3f+ #x2a24)
  1138. (defconstant +n3f-v3f+ #x2a25)
  1139. (defconstant +c4f-n3f-v3f+ #x2a26)
  1140. (defconstant +t2f-v3f+ #x2a27)
  1141. (defconstant +t4f-v4f+ #x2a28)
  1142. (defconstant +t2f-c4ub-v3f+ #x2a29)
  1143. (defconstant +t2f-c3f-v3f+ #x2a2a)
  1144. (defconstant +t2f-n3f-v3f+ #x2a2b)
  1145. (defconstant +t2f-c4f-n3f-v3f+ #x2a2c)
  1146. (defconstant +t4f-c4f-n3f-v4f+ #x2a2d)
  1147. ;; Matrices
  1148. (defconstant +matrix-mode+ #x0ba0)
  1149. (defconstant +modelview+ #x1700)
  1150. (defconstant +projection+ #x1701)
  1151. (defconstant +texture+ #x1702)
  1152. ;; Points
  1153. (defconstant +point-smooth+ #x0b10)
  1154. (defconstant +point-size+ #x0b11)
  1155. (defconstant +point-size-granularity+ #x0b13)
  1156. (defconstant +point-size-range+ #x0b12)
  1157. ;; Lines
  1158. (defconstant +line-smooth+ #x0b20)
  1159. (defconstant +line-stipple+ #x0b24)
  1160. (defconstant +line-stipple-pattern+ #x0b25)
  1161. (defconstant +line-stipple-repeat+ #x0b26)
  1162. (defconstant +line-width+ #x0b21)
  1163. (defconstant +line-width-granularity+ #x0b23)
  1164. (defconstant +line-width-range+ #x0b22)
  1165. ;; Polygons
  1166. (defconstant +point+ #x1b00)
  1167. (defconstant +line+ #x1b01)
  1168. (defconstant +fill+ #x1b02)
  1169. (defconstant +cw+ #x0900)
  1170. (defconstant +ccw+ #x0901)
  1171. (defconstant +front+ #x0404)
  1172. (defconstant +back+ #x0405)
  1173. (defconstant +polygon-mode+ #x0b40)
  1174. (defconstant +polygon-smooth+ #x0b41)
  1175. (defconstant +polygon-stipple+ #x0b42)
  1176. (defconstant +edge-flag+ #x0b43)
  1177. (defconstant +cull-face+ #x0b44)
  1178. (defconstant +cull-face-mode+ #x0b45)
  1179. (defconstant +front-face+ #x0b46)
  1180. (defconstant +polygon-offset-factor+ #x8038)
  1181. (defconstant +polygon-offset-units+ #x2a00)
  1182. (defconstant +polygon-offset-point+ #x2a01)
  1183. (defconstant +polygon-offset-line+ #x2a02)
  1184. (defconstant +polygon-offset-fill+ #x8037)
  1185. ;; Display Lists
  1186. (defconstant +compile+ #x1300)
  1187. (defconstant +compile-and-execute+ #x1301)
  1188. (defconstant +list-base+ #x0b32)
  1189. (defconstant +list-index+ #x0b33)
  1190. (defconstant +list-mode+ #x0b30)
  1191. ;; Depth Buffer
  1192. (defconstant +never+ #x0200)
  1193. (defconstant +less+ #x0201)
  1194. (defconstant +equal+ #x0202)
  1195. (defconstant +lequal+ #x0203)
  1196. (defconstant +greater+ #x0204)
  1197. (defconstant +notequal+ #x0205)
  1198. (defconstant +gequal+ #x0206)
  1199. (defconstant +always+ #x0207)
  1200. (defconstant +depth-test+ #x0b71)
  1201. (defconstant +depth-bits+ #x0d56)
  1202. (defconstant +depth-clear-value+ #x0b73)
  1203. (defconstant +depth-func+ #x0b74)
  1204. (defconstant +depth-range+ #x0b70)
  1205. (defconstant +depth-writemask+ #x0b72)
  1206. (defconstant +depth-component+ #x1902)
  1207. ;; Lighting
  1208. (defconstant +lighting+ #x0b50)
  1209. (defconstant +light0+ #x4000)
  1210. (defconstant +light1+ #x4001)
  1211. (defconstant +light2+ #x4002)
  1212. (defconstant +light3+ #x4003)
  1213. (defconstant +light4+ #x4004)
  1214. (defconstant +light5+ #x4005)
  1215. (defconstant +light6+ #x4006)
  1216. (defconstant +light7+ #x4007)
  1217. (defconstant +spot-exponent+ #x1205)
  1218. (defconstant +spot-cutoff+ #x1206)
  1219. (defconstant +constant-attenuation+ #x1207)
  1220. (defconstant +linear-attenuation+ #x1208)
  1221. (defconstant +quadratic-attenuation+ #x1209)
  1222. (defconstant +ambient+ #x1200)
  1223. (defconstant +diffuse+ #x1201)
  1224. (defconstant +specular+ #x1202)
  1225. (defconstant +shininess+ #x1601)
  1226. (defconstant +emission+ #x1600)
  1227. (defconstant +position+ #x1203)
  1228. (defconstant +spot-direction+ #x1204)
  1229. (defconstant +ambient-and-diffuse+ #x1602)
  1230. (defconstant +color-indexes+ #x1603)
  1231. (defconstant +light-model-two-side+ #x0b52)
  1232. (defconstant +light-model-local-viewer+ #x0b51)
  1233. (defconstant +light-model-ambient+ #x0b53)
  1234. (defconstant +front-and-back+ #x0408)
  1235. (defconstant +shade-model+ #x0b54)
  1236. (defconstant +flat+ #x1d00)
  1237. (defconstant +smooth+ #x1d01)
  1238. (defconstant +color-material+ #x0b57)
  1239. (defconstant +color-material-face+ #x0b55)
  1240. (defconstant +color-material-parameter+ #x0b56)
  1241. (defconstant +normalize+ #x0ba1)
  1242. ;; Clipping planes
  1243. (defconstant +clip-plane0+ #x3000)
  1244. (defconstant +clip-plane1+ #x3001)
  1245. (defconstant +clip-plane2+ #x3002)
  1246. (defconstant +clip-plane3+ #x3003)
  1247. (defconstant +clip-plane4+ #x3004)
  1248. (defconstant +clip-plane5+ #x3005)
  1249. ;; Accumulation buffer
  1250. (defconstant +accum-red-bits+ #x0d58)
  1251. (defconstant +accum-green-bits+ #x0d59)
  1252. (defconstant +accum-blue-bits+ #x0d5a)
  1253. (defconstant +accum-alpha-bits+ #x0d5b)
  1254. (defconstant +accum-clear-value+ #x0b80)
  1255. (defconstant +accum+ #x0100)
  1256. (defconstant +add+ #x0104)
  1257. (defconstant +load+ #x0101)
  1258. (defconstant +mult+ #x0103)
  1259. (defconstant +return+ #x0102)
  1260. ;; Alpha Testing
  1261. (defconstant +alpha-test+ #x0bc0)
  1262. (defconstant +alpha-test-ref+ #x0bc2)
  1263. (defconstant +alpha-test-func+ #x0bc1)
  1264. ;; Blending
  1265. (defconstant +blend+ #x0be2)
  1266. (defconstant +blend-src+ #x0be1)
  1267. (defconstant +blend-dst+ #x0be0)
  1268. (defconstant +zero+ #x0)
  1269. (defconstant +one+ #x1)
  1270. (defconstant +src-color+ #x0300)
  1271. (defconstant +one-minus-src-color+ #x0301)
  1272. (defconstant +dst-color+ #x0306)
  1273. (defconstant +one-minus-dst-color+ #x0307)
  1274. (defconstant +src-alpha+ #x0302)
  1275. (defconstant +one-minus-src-alpha+ #x0303)
  1276. (defconstant +dst-alpha+ #x0304)
  1277. (defconstant +one-minus-dst-alpha+ #x0305)
  1278. (defconstant +src-alpha-saturate+ #x0308)
  1279. (defconstant +constant-color+ #x8001)
  1280. (defconstant +one-minus-constant-color+ #x8002)
  1281. (defconstant +constant-alpha+ #x8003)
  1282. (defconstant +one-minus-constant-alpha+ #x8004)
  1283. ;; Render mode
  1284. (defconstant +feedback+ #x1c01)
  1285. (defconstant +render+ #x1c00)
  1286. (defconstant +select+ #x1c02)
  1287. ;; Feedback
  1288. (defconstant +2d+ #x0600)
  1289. (defconstant +3d+ #x0601)
  1290. (defconstant +3d-color+ #x0602)
  1291. (defconstant +3d-color-texture+ #x0603)
  1292. (defconstant +4d-color-texture+ #x0604)
  1293. (defconstant +point-token+ #x0701)
  1294. (defconstant +line-token+ #x0702)
  1295. (defconstant +line-reset-token+ #x0707)
  1296. (defconstant +polygon-token+ #x0703)
  1297. (defconstant +bitmap-token+ #x0704)
  1298. (defconstant +draw-pixel-token+ #x0705)
  1299. (defconstant +copy-pixel-token+ #x0706)
  1300. (defconstant +pass-through-token+ #x0700)
  1301. (defconstant +feedback-buffer-pointer+ #x0df0)
  1302. (defconstant +feedback-buffer-size+ #x0df1)
  1303. (defconstant +feedback-buffer-type+ #x0df2)
  1304. ;; Selection
  1305. (defconstant +selection-buffer-pointer+ #x0df3)
  1306. (defconstant +selection-buffer-size+ #x0df4)
  1307. ;; Fog
  1308. (defconstant +fog+ #x0b60)
  1309. (defconstant +fog-mode+ #x0b65)
  1310. (defconstant +fog-density+ #x0b62)
  1311. (defconstant +fog-color+ #x0b66)
  1312. (defconstant +fog-index+ #x0b61)
  1313. (defconstant +fog-start+ #x0b63)
  1314. (defconstant +fog-end+ #x0b64)
  1315. (defconstant +linear+ #x2601)
  1316. (defconstant +exp+ #x0800)
  1317. (defconstant +exp2+ #x0801)
  1318. ;; Logic operations
  1319. (defconstant +logic-op+ #x0bf1)
  1320. (defconstant +index-logic-op+ #x0bf1)
  1321. (defconstant +color-logic-op+ #x0bf2)
  1322. (defconstant +logic-op-mode+ #x0bf0)
  1323. (defconstant +clear+ #x1500)
  1324. (defconstant +set+ #x150f)
  1325. (defconstant +copy+ #x1503)
  1326. (defconstant +copy-inverted+ #x150c)
  1327. (defconstant +noop+ #x1505)
  1328. (defconstant +invert+ #x150a)
  1329. (defconstant +and+ #x1501)
  1330. (defconstant +nand+ #x150e)
  1331. (defconstant +or+ #x1507)
  1332. (defconstant +nor+ #x1508)
  1333. (defconstant +xor+ #x1506)
  1334. (defconstant +equiv+ #x1509)
  1335. (defconstant +and-reverse+ #x1502)
  1336. (defconstant +and-inverted+ #x1504)
  1337. (defconstant +or-reverse+ #x150b)
  1338. (defconstant +or-inverted+ #x150d)
  1339. ;; Stencil
  1340. (defconstant +stencil-test+ #x0b90)
  1341. (defconstant +stencil-writemask+ #x0b98)
  1342. (defconstant +stencil-bits+ #x0d57)
  1343. (defconstant +stencil-func+ #x0b92)
  1344. (defconstant +stencil-value-mask+ #x0b93)
  1345. (defconstant +stencil-ref+ #x0b97)
  1346. (defconstant +stencil-fail+ #x0b94)
  1347. (defconstant +stencil-pass-depth-pass+ #x0b96)
  1348. (defconstant +stencil-pass-depth-fail+ #x0b95)
  1349. (defconstant +stencil-clear-value+ #x0b91)
  1350. (defconstant +stencil-index+ #x1901)
  1351. (defconstant +keep+ #x1e00)
  1352. (defconstant +replace+ #x1e01)
  1353. (defconstant +incr+ #x1e02)
  1354. (defconstant +decr+ #x1e03)
  1355. ;; Buffers, Pixel Drawing/Reading
  1356. (defconstant +none+ #x0)
  1357. (defconstant +left+ #x0406)
  1358. (defconstant +right+ #x0407)
  1359. (defconstant +front-left+ #x0400)
  1360. (defconstant +front-right+ #x0401)
  1361. (defconstant +back-left+ #x0402)
  1362. (defconstant +back-right+ #x0403)
  1363. (defconstant +aux0+ #x0409)
  1364. (defconstant +aux1+ #x040a)
  1365. (defconstant +aux2+ #x040b)
  1366. (defconstant +aux3+ #x040c)
  1367. (defconstant +color-index+ #x1900)
  1368. (defconstant +red+ #x1903)
  1369. (defconstant +green+ #x1904)
  1370. (defconstant +blue+ #x1905)
  1371. (defconstant +alpha+ #x1906)
  1372. (defconstant +luminance+ #x1909)
  1373. (defconstant +luminance-alpha+ #x190a)
  1374. (defconstant +alpha-bits+ #x0d55)
  1375. (defconstant +red-bits+ #x0d52)
  1376. (defconstant +green-bits+ #x0d53)
  1377. (defconstant +blue-bits+ #x0d54)
  1378. (defconstant +index-bits+ #x0d51)
  1379. (defconstant +subpixel-bits+ #x0d50)
  1380. (defconstant +aux-buffers+ #x0c00)
  1381. (defconstant +read-buffer+ #x0c02)
  1382. (defconstant +draw-buffer+ #x0c01)
  1383. (defconstant +doublebuffer+ #x0c32)
  1384. (defconstant +stereo+ #x0c33)
  1385. (defconstant +bitmap+ #x1a00)
  1386. (defconstant +color+ #x1800)
  1387. (defconstant +depth+ #x1801)
  1388. (defconstant +stencil+ #x1802)
  1389. (defconstant +dither+ #x0bd0)
  1390. (defconstant +rgb+ #x1907)
  1391. (defconstant +rgba+ #x1908)
  1392. ;; Implementation Limits
  1393. (defconstant +max-list-nesting+ #x0b31)
  1394. (defconstant +max-attrib-stack-depth+ #x0d35)
  1395. (defconstant +max-modelview-stack-depth+ #x0d36)
  1396. (defconstant +max-name-stack-depth+ #x0d37)
  1397. (defconstant +max-projection-stack-depth+ #x0d38)
  1398. (defconstant +max-texture-stack-depth+ #x0d39)
  1399. (defconstant +max-eval-order+ #x0d30)
  1400. (defconstant +max-lights+ #x0d31)
  1401. (defconstant +max-clip-planes+ #x0d32)
  1402. (defconstant +max-texture-size+ #x0d33)
  1403. (defconstant +max-pixel-map-table+ #x0d34)
  1404. (defconstant +max-viewport-dims+ #x0d3a)
  1405. (defconstant +max-client-attrib-stack-depth+ #x0d3b)
  1406. ;; Gets
  1407. (defconstant +attrib-stack-depth+ #x0bb0)
  1408. (defconstant +client-attrib-stack-depth+ #x0bb1)
  1409. (defconstant +color-clear-value+ #x0c22)
  1410. (defconstant +color-writemask+ #x0c23)
  1411. (defconstant +current-index+ #x0b01)
  1412. (defconstant +current-color+ #x0b00)
  1413. (defconstant +current-normal+ #x0b02)
  1414. (defconstant +current-raster-color+ #x0b04)
  1415. (defconstant +current-raster-distance+ #x0b09)
  1416. (defconstant +current-raster-index+ #x0b05)
  1417. (defconstant +current-raster-position+ #x0b07)
  1418. (defconstant +current-raster-texture-coords+ #x0b06)
  1419. (defconstant +current-raster-position-valid+ #x0b08)
  1420. (defconstant +current-texture-coords+ #x0b03)
  1421. (defconstant +index-clear-value+ #x0c20)
  1422. (defconstant +index-mode+ #x0c30)
  1423. (defconstant +index-writemask+ #x0c21)
  1424. (defconstant +modelview-matrix+ #x0ba6)
  1425. (defconstant +modelview-stack-depth+ #x0ba3)
  1426. (defconstant +name-stack-depth+ #x0d70)
  1427. (defconstant +projection-matrix+ #x0ba7)
  1428. (defconstant +projection-stack-depth+ #x0ba4)
  1429. (defconstant +render-mode+ #x0c40)
  1430. (defconstant +rgba-mode+ #x0c31)
  1431. (defconstant +texture-matrix+ #x0ba8)
  1432. (defconstant +texture-stack-depth+ #x0ba5)
  1433. (defconstant +viewport+ #x0ba2)
  1434. ;; GL Evaluators
  1435. (defconstant +auto-normal+ #x0d80)
  1436. (defconstant +map1-color-4+ #x0d90)
  1437. (defconstant +map1-grid-domain+ #x0dd0)
  1438. (defconstant +map1-grid-segments+ #x0dd1)
  1439. (defconstant +map1-index+ #x0d91)
  1440. (defconstant +map1-normal+ #x0d92)
  1441. (defconstant +map1-texture-coord-1+ #x0d93)
  1442. (defconstant +map1-texture-coord-2+ #x0d94)
  1443. (defconstant +map1-texture-coord-3+ #x0d95)
  1444. (defconstant +map1-texture-coord-4+ #x0d96)
  1445. (defconstant +map1-vertex-3+ #x0d97)
  1446. (defconstant +map1-vertex-4+ #x0d98)
  1447. (defconstant +map2-color-4+ #x0db0)
  1448. (defconstant +map2-grid-domain+ #x0dd2)
  1449. (defconstant +map2-grid-segments+ #x0dd3)
  1450. (defconstant +map2-index+ #x0db1)
  1451. (defconstant +map2-normal+ #x0db2)
  1452. (defconstant +map2-texture-coord-1+ #x0db3)
  1453. (defconstant +map2-texture-coord-2+ #x0db4)
  1454. (defconstant +map2-texture-coord-3+ #x0db5)
  1455. (defconstant +map2-texture-coord-4+ #x0db6)
  1456. (defconstant +map2-vertex-3+ #x0db7)
  1457. (defconstant +map2-vertex-4+ #x0db8)
  1458. (defconstant +coeff+ #x0a00)
  1459. (defconstant +domain+ #x0a02)
  1460. (defconstant +order+ #x0a01)
  1461. ;; Hints
  1462. (defconstant +fog-hint+ #x0c54)
  1463. (defconstant +line-smooth-hint+ #x0c52)
  1464. (defconstant +perspective-correction-hint+ #x0c50)
  1465. (defconstant +point-smooth-hint+ #x0c51)
  1466. (defconstant +polygon-smooth-hint+ #x0c53)
  1467. (defconstant +dont-care+ #x1100)
  1468. (defconstant +fastest+ #x1101)
  1469. (defconstant +nicest+ #x1102)
  1470. ;; Scissor box
  1471. (defconstant +scissor-test+ #x0c11)
  1472. (defconstant +scissor-box+ #x0c10)
  1473. ;; Pixel Mode / Transfer
  1474. (defconstant +map-color+ #x0d10)
  1475. (defconstant +map-stencil+ #x0d11)
  1476. (defconstant +index-shift+ #x0d12)
  1477. (defconstant +index-offset+ #x0d13)
  1478. (defconstant +red-scale+ #x0d14)
  1479. (defconstant +red-bias+ #x0d15)
  1480. (defconstant +green-scale+ #x0d18)
  1481. (defconstant +green-bias+ #x0d19)
  1482. (defconstant +blue-scale+ #x0d1a)
  1483. (defconstant +blue-bias+ #x0d1b)
  1484. (defconstant +alpha-scale+ #x0d1c)
  1485. (defconstant +alpha-bias+ #x0d1d)
  1486. (defconstant +depth-scale+ #x0d1e)
  1487. (defconstant +depth-bias+ #x0d1f)
  1488. (defconstant +pixel-map-s-to-s-size+ #x0cb1)
  1489. (defconstant +pixel-map-i-to-i-size+ #x0cb0)
  1490. (defconstant +pixel-map-i-to-r-size+ #x0cb2)
  1491. (defconstant +pixel-map-i-to-g-size+ #x0cb3)
  1492. (defconstant +pixel-map-i-to-b-size+ #x0cb4)
  1493. (defconstant +pixel-map-i-to-a-size+ #x0cb5)
  1494. (defconstant +pixel-map-r-to-r-size+ #x0cb6)
  1495. (defconstant +pixel-map-g-to-g-size+ #x0cb7)
  1496. (defconstant +pixel-map-b-to-b-size+ #x0cb8)
  1497. (defconstant +pixel-map-a-to-a-size+ #x0cb9)
  1498. (defconstant +pixel-map-s-to-s+ #x0c71)
  1499. (defconstant +pixel-map-i-to-i+ #x0c70)
  1500. (defconstant +pixel-map-i-to-r+ #x0c72)
  1501. (defconstant +pixel-map-i-to-g+ #x0c73)
  1502. (defconstant +pixel-map-i-to-b+ #x0c74)
  1503. (defconstant +pixel-map-i-to-a+ #x0c75)
  1504. (defconstant +pixel-map-r-to-r+ #x0c76)
  1505. (defconstant +pixel-map-g-to-g+ #x0c77)
  1506. (defconstant +pixel-map-b-to-b+ #x0c78)
  1507. (defconstant +pixel-map-a-to-a+ #x0c79)
  1508. (defconstant +pack-alignment+ #x0d05)
  1509. (defconstant +pack-lsb-first+ #x0d01)
  1510. (defconstant +pack-row-length+ #x0d02)
  1511. (defconstant +pack-skip-pixels+ #x0d04)
  1512. (defconstant +pack-skip-rows+ #x0d03)
  1513. (defconstant +pack-swap-bytes+ #x0d00)
  1514. (defconstant +unpack-alignment+ #x0cf5)
  1515. (defconstant +unpack-lsb-first+ #x0cf1)
  1516. (defconstant +unpack-row-length+ #x0cf2)
  1517. (defconstant +unpack-skip-pixels+ #x0cf4)
  1518. (defconstant +unpack-skip-rows+ #x0cf3)
  1519. (defconstant +unpack-swap-bytes+ #x0cf0)
  1520. (defconstant +zoom-x+ #x0d16)
  1521. (defconstant +zoom-y+ #x0d17)
  1522. ;; Texture Mapping
  1523. (defconstant +texture-env+ #x2300)
  1524. (defconstant +texture-env-mode+ #x2200)
  1525. (defconstant +texture-1d+ #x0de0)
  1526. (defconstant +texture-2d+ #x0de1)
  1527. (defconstant +texture-wrap-s+ #x2802)
  1528. (defconstant +texture-wrap-t+ #x2803)
  1529. (defconstant +texture-mag-filter+ #x2800)
  1530. (defconstant +texture-min-filter+ #x2801)
  1531. (defconstant +texture-env-color+ #x2201)
  1532. (defconstant +texture-gen-s+ #x0c60)
  1533. (defconstant +texture-gen-t+ #x0c61)
  1534. (defconstant +texture-gen-mode+ #x2500)
  1535. (defconstant +texture-border-color+ #x1004)
  1536. (defconstant +texture-width+ #x1000)
  1537. (defconstant +texture-height+ #x1001)
  1538. (defconstant +texture-border+ #x1005)
  1539. (defconstant +texture-components+ #x1003)
  1540. (defconstant +texture-red-size+ #x805c)
  1541. (defconstant +texture-green-size+ #x805d)
  1542. (defconstant +texture-blue-size+ #x805e)
  1543. (defconstant +texture-alpha-size+ #x805f)
  1544. (defconstant +texture-luminance-size+ #x8060)
  1545. (defconstant +texture-intensity-size+ #x8061)
  1546. (defconstant +nearest-mipmap-nearest+ #x2700)
  1547. (defconstant +nearest-mipmap-linear+ #x2702)
  1548. (defconstant +linear-mipmap-nearest+ #x2701)
  1549. (defconstant +linear-mipmap-linear+ #x2703)
  1550. (defconstant +object-linear+ #x2401)
  1551. (defconstant +object-plane+ #x2501)
  1552. (defconstant +eye-linear+ #x2400)
  1553. (defconstant +eye-plane+ #x2502)
  1554. (defconstant +sphere-map+ #x2402)
  1555. (defconstant +decal+ #x2101)
  1556. (defconstant +modulate+ #x2100)
  1557. (defconstant +nearest+ #x2600)
  1558. (defconstant +repeat+ #x2901)
  1559. (defconstant +clamp+ #x2900)
  1560. (defconstant +s+ #x2000)
  1561. (defconstant +t+ #x2001)
  1562. (defconstant +r+ #x2002)
  1563. (defconstant +q+ #x2003)
  1564. (defconstant +texture-gen-r+ #x0c62)
  1565. (defconstant +texture-gen-q+ #x0c63)
  1566. ;; GL 1.1 Texturing
  1567. (defconstant +proxy-texture-1d+ #x8063)
  1568. (defconstant +proxy-texture-2d+ #x8064)
  1569. (defconstant +texture-priority+ #x8066)
  1570. (defconstant +texture-resident+ #x8067)
  1571. (defconstant +texture-binding-1d+ #x8068)
  1572. (defconstant +texture-binding-2d+ #x8069)
  1573. (defconstant +texture-internal-format+ #x1003)
  1574. (defconstant +pack-skip-images+ #x806b)
  1575. (defconstant +pack-image-height+ #x806c)
  1576. (defconstant +unpack-skip-images+ #x806d)
  1577. (defconstant +unpack-image-height+ #x806e)
  1578. (defconstant +texture-3d+ #x806f)
  1579. (defconstant +proxy-texture-3d+ #x8070)
  1580. (defconstant +texture-depth+ #x8071)
  1581. (defconstant +texture-wrap-r+ #x8072)
  1582. (defconstant +max-3d-texture-size+ #x8073)
  1583. (defconstant +texture-binding-3d+ #x806a)
  1584. ;; Internal texture formats (GL 1.1)
  1585. (defconstant +alpha4+ #x803b)
  1586. (defconstant +alpha8+ #x803c)
  1587. (defconstant +alpha12+ #x803d)
  1588. (defconstant +alpha16+ #x803e)
  1589. (defconstant +luminance4+ #x803f)
  1590. (defconstant +luminance8+ #x8040)
  1591. (defconstant +luminance12+ #x8041)
  1592. (defconstant +luminance16+ #x8042)
  1593. (defconstant +luminance4-alpha4+ #x8043)
  1594. (defconstant +luminance6-alpha2+ #x8044)
  1595. (defconstant +luminance8-alpha8+ #x8045)
  1596. (defconstant +luminance12-alpha4+ #x8046)
  1597. (defconstant +luminance12-alpha12+ #x8047)
  1598. (defconstant +luminance16-alpha16+ #x8048)
  1599. (defconstant +intensity+ #x8049)
  1600. (defconstant +intensity4+ #x804a)
  1601. (defconstant +intensity8+ #x804b)
  1602. (defconstant +intensity12+ #x804c)
  1603. (defconstant +intensity16+ #x804d)
  1604. (defconstant +r3-g3-b2+ #x2a10)
  1605. (defconstant +rgb4+ #x804f)
  1606. (defconstant +rgb5+ #x8050)
  1607. (defconstant +rgb8+ #x8051)
  1608. (defconstant +rgb10+ #x8052)
  1609. (defconstant +rgb12+ #x8053)
  1610. (defconstant +rgb16+ #x8054)
  1611. (defconstant +rgba2+ #x8055)
  1612. (defconstant +rgba4+ #x8056)
  1613. (defconstant +rgb5-a1+ #x8057)
  1614. (defconstant +rgba8+ #x8058)
  1615. (defconstant +rgb10-a2+ #x8059)
  1616. (defconstant +rgba12+ #x805a)
  1617. (defconstant +rgba16+ #x805b)
  1618. ;; Utility
  1619. (defconstant +vendor+ #x1f00)
  1620. (defconstant +renderer+ #x1f01)
  1621. (defconstant +version+ #x1f02)
  1622. (defconstant +extensions+ #x1f03)
  1623. ;; Errors
  1624. (defconstant +no-error+ #x0)
  1625. (defconstant +invalid-value+ #x0501)
  1626. (defconstant +invalid-enum+ #x0500)
  1627. (defconstant +invalid-operation+ #x0502)
  1628. (defconstant +stack-overflow+ #x0503)
  1629. (defconstant +stack-underflow+ #x0504)
  1630. (defconstant +out-of-memory+ #x0505)
  1631. ;; OpenGL 1.2
  1632. (defconstant +rescale-normal+ #x803a)
  1633. (defconstant +clamp-to-edge+ #x812f)
  1634. (defconstant +max-elements-vertices+ #x80e8)
  1635. (defconstant +max-elements-indices+ #x80e9)
  1636. (defconstant +bgr+ #x80e0)
  1637. (defconstant +bgra+ #x80e1)
  1638. (defconstant +unsigned-byte-3-3-2+ #x8032)
  1639. (defconstant +unsigned-byte-2-3-3-rev+ #x8362)
  1640. (defconstant +unsigned-short-5-6-5+ #x8363)
  1641. (defconstant +unsigned-short-5-6-5-rev+ #x8364)
  1642. (defconstant +unsigned-short-4-4-4-4+ #x8033)
  1643. (defconstant +unsigned-short-4-4-4-4-rev+ #x8365)
  1644. (defconstant +unsigned-short-5-5-5-1+ #x8034)
  1645. (defconstant +unsigned-short-1-5-5-5-rev+ #x8366)
  1646. (defconstant +unsigned-int-8-8-8-8+ #x8035)
  1647. (defconstant +unsigned-int-8-8-8-8-rev+ #x8367)
  1648. (defconstant +unsigned-int-10-10-10-2+ #x8036)
  1649. (defconstant +unsigned-int-2-10-10-10-rev+ #x8368)
  1650. (defconstant +light-model-color-control+ #x81f8)
  1651. (defconstant +single-color+ #x81f9)
  1652. (defconstant +separate-specular-color+ #x81fa)
  1653. (defconstant +texture-min-lod+ #x813a)
  1654. (defconstant +texture-max-lod+ #x813b)
  1655. (defconstant +texture-base-level+ #x813c)
  1656. (defconstant +texture-max-level+ #x813d)
  1657. (defconstant +smooth-point-size-range+ #x0b12)
  1658. (defconstant +smooth-point-size-granularity+ #x0b13)
  1659. (defconstant +smooth-line-width-range+ #x0b22)
  1660. (defconstant +smooth-line-width-granularity+ #x0b23)
  1661. (defconstant +aliased-point-size-range+ #x846d)
  1662. (defconstant +aliased-line-width-range+ #x846e)
  1663. ;; OpenGL 1.2 Imaging subset
  1664. ;; GL_EXT_color_table
  1665. (defconstant +color-table+ #x80d0)
  1666. (defconstant +post-convolution-color-table+ #x80d1)
  1667. (defconstant +post-color-matrix-color-table+ #x80d2)
  1668. (defconstant +proxy-color-table+ #x80d3)
  1669. (defconstant +proxy-post-convolution-color-table+ #x80d4)
  1670. (defconstant +proxy-post-color-matrix-color-table+ #x80d5)
  1671. (defconstant +color-table-scale+ #x80d6)
  1672. (defconstant +color-table-bias+ #x80d7)
  1673. (defconstant +color-table-format+ #x80d8)
  1674. (defconstant +color-table-width+ #x80d9)
  1675. (defconstant +color-table-red-size+ #x80da)
  1676. (defconstant +color-table-green-size+ #x80db)
  1677. (defconstant +color-table-blue-size+ #x80dc)
  1678. (defconstant +color-table-alpha-size+ #x80dd)
  1679. (defconstant +color-table-luminance-size+ #x80de)
  1680. (defconstant +color-table-intensity-size+ #x80df)
  1681. ;; GL_EXT_convolution and GL_HP_convolution
  1682. (defconstant +convolution-1d+ #x8010)
  1683. (defconstant +convolution-2d+ #x8011)
  1684. (defconstant +separable-2d+ #x8012)
  1685. (defconstant +convolution-border-mode+ #x8013)
  1686. (defconstant +convolution-filter-scale+ #x8014)
  1687. (defconstant +convolution-filter-bias+ #x8015)
  1688. (defconstant +reduce+ #x8016)
  1689. (defconstant +convolution-format+ #x8017)
  1690. (defconstant +convolution-width+ #x8018)
  1691. (defconstant +convolution-height+ #x8019)
  1692. (defconstant +max-convolution-width+ #x801a)
  1693. (defconstant +max-convolution-height+ #x801b)
  1694. (defconstant +post-convolution-red-scale+ #x801c)
  1695. (defconstant +post-convolution-green-scale+ #x801d)
  1696. (defconstant +post-convolution-blue-scale+ #x801e)
  1697. (defconstant +post-convolution-alpha-scale+ #x801f)
  1698. (defconstant +post-convolution-red-bias+ #x8020)
  1699. (defconstant +post-convolution-green-bias+ #x8021)
  1700. (defconstant +post-convolution-blue-bias+ #x8022)
  1701. (defconstant +post-convolution-alpha-bias+ #x8023)
  1702. (defconstant +constant-border+ #x8151)
  1703. (defconstant +replicate-border+ #x8153)
  1704. (defconstant +convolution-border-color+ #x8154)
  1705. ;; GL_SGI_color_matrix
  1706. (defconstant +color-matrix+ #x80b1)
  1707. (defconstant +color-matrix-stack-depth+ #x80b2)
  1708. (defconstant +max-color-matrix-stack-depth+ #x80b3)
  1709. (defconstant +post-color-matrix-red-scale+ #x80b4)
  1710. (defconstant +post-color-matrix-green-scale+ #x80b5)
  1711. (defconstant +post-color-matrix-blue-scale+ #x80b6)
  1712. (defconstant +post-color-matrix-alpha-scale+ #x80b7)
  1713. (defconstant +post-color-matrix-red-bias+ #x80b8)
  1714. (defconstant +post-color-matrix-green-bias+ #x80b9)
  1715. (defconstant +post-color-matrix-blue-bias+ #x80ba)
  1716. (defconstant +post-color-matrix-alpha-bias+ #x80bb)
  1717. ;; GL_EXT_histogram
  1718. (defconstant +histogram+ #x8024)
  1719. (defconstant +proxy-histogram+ #x8025)
  1720. (defconstant +histogram-width+ #x8026)
  1721. (defconstant +histogram-format+ #x8027)
  1722. (defconstant +histogram-red-size+ #x8028)
  1723. (defconstant +histogram-green-size+ #x8029)
  1724. (defconstant +histogram-blue-size+ #x802a)
  1725. (defconstant +histogram-alpha-size+ #x802b)
  1726. (defconstant +histogram-luminance-size+ #x802c)
  1727. (defconstant +histogram-sink+ #x802d)
  1728. (defconstant +minmax+ #x802e)
  1729. (defconstant +minmax-format+ #x802f)
  1730. (defconstant +minmax-sink+ #x8030)
  1731. (defconstant +table-too-large+ #x8031)
  1732. ;; GL_EXT_blend_color, GL_EXT_blend_minmax
  1733. (defconstant +blend-equation+ #x8009)
  1734. (defconstant +min+ #x8007)
  1735. (defconstant +max+ #x8008)
  1736. (defconstant +func-add+ #x8006)
  1737. (defconstant +func-subtract+ #x800a)
  1738. (defconstant +func-reverse-subtract+ #x800b)
  1739. ;; glPush/PopAttrib bits
  1740. (defconstant +current-bit+ #x00000001)
  1741. (defconstant +point-bit+ #x00000002)
  1742. (defconstant +line-bit+ #x00000004)
  1743. (defconstant +polygon-bit+ #x00000008)
  1744. (defconstant +polygon-stipple-bit+ #x00000010)
  1745. (defconstant +pixel-mode-bit+ #x00000020)
  1746. (defconstant +lighting-bit+ #x00000040)
  1747. (defconstant +fog-bit+ #x00000080)
  1748. (defconstant +depth-buffer-bit+ #x00000100)
  1749. (defconstant +accum-buffer-bit+ #x00000200)
  1750. (defconstant +stencil-buffer-bit+ #x00000400)
  1751. (defconstant +viewport-bit+ #x00000800)
  1752. (defconstant +transform-bit+ #x00001000)
  1753. (defconstant +enable-bit+ #x00002000)
  1754. (defconstant +color-buffer-bit+ #x00004000)
  1755. (defconstant +hint-bit+ #x00008000)
  1756. (defconstant +eval-bit+ #x00010000)
  1757. (defconstant +list-bit+ #x00020000)
  1758. (defconstant +texture-bit+ #x00040000)
  1759. (defconstant +scissor-bit+ #x00080000)
  1760. (defconstant +all-attrib-bits+ #x000fffff)
  1761. (defconstant +client-pixel-store-bit+ #x00000001)
  1762. (defconstant +client-vertex-array-bit+ #x00000002)
  1763. (defconstant +client-all-attrib-bits+ #xffffffff)
  1764. ;; ARB Multitexturing extension
  1765. (defconstant +arb-multitexture+ 1)
  1766. (defconstant +texture0-arb+ #x84c0)
  1767. (defconstant +texture1-arb+ #x84c1)
  1768. (defconstant +texture2-arb+ #x84c2)
  1769. (defconstant +texture3-arb+ #x84c3)
  1770. (defconstant +texture4-arb+ #x84c4)
  1771. (defconstant +texture5-arb+ #x84c5)
  1772. (defconstant +texture6-arb+ #x84c6)
  1773. (defconstant +texture7-arb+ #x84c7)
  1774. (defconstant +texture8-arb+ #x84c8)
  1775. (defconstant +texture9-arb+ #x84c9)
  1776. (defconstant +texture10-arb+ #x84ca)
  1777. (defconstant +texture11-arb+ #x84cb)
  1778. (defconstant +texture12-arb+ #x84cc)
  1779. (defconstant +texture13-arb+ #x84cd)
  1780. (defconstant +texture14-arb+ #x84ce)
  1781. (defconstant +texture15-arb+ #x84cf)
  1782. (defconstant +texture16-arb+ #x84d0)
  1783. (defconstant +texture17-arb+ #x84d1)
  1784. (defconstant +texture18-arb+ #x84d2)
  1785. (defconstant +texture19-arb+ #x84d3)
  1786. (defconstant +texture20-arb+ #x84d4)
  1787. (defconstant +texture21-arb+ #x84d5)
  1788. (defconstant +texture22-arb+ #x84d6)
  1789. (defconstant +texture23-arb+ #x84d7)
  1790. (defconstant +texture24-arb+ #x84d8)
  1791. (defconstant +texture25-arb+ #x84d9)
  1792. (defconstant +texture26-arb+ #x84da)
  1793. (defconstant +texture27-arb+ #x84db)
  1794. (defconstant +texture28-arb+ #x84dc)
  1795. (defconstant +texture29-arb+ #x84dd)
  1796. (defconstant +texture30-arb+ #x84de)
  1797. (defconstant +texture31-arb+ #x84df)
  1798. (defconstant +active-texture-arb+ #x84e0)
  1799. (defconstant +client-active-texture-arb+ #x84e1)
  1800. (defconstant +max-texture-units-arb+ #x84e2)
  1801. ;;; Misc extensions
  1802. (defconstant +ext-abgr+ 1)
  1803. (defconstant +abgr-ext+ #x8000)
  1804. (defconstant +ext-blend-color+ 1)
  1805. (defconstant +constant-color-ext+ #x8001)
  1806. (defconstant +one-minus-constant-color-ext+ #x8002)
  1807. (defconstant +constant-alpha-ext+ #x8003)
  1808. (defconstant +one-minus-constant-alpha-ext+ #x8004)
  1809. (defconstant +blend-color-ext+ #x8005)
  1810. (defconstant +ext-polygon-offset+ 1)
  1811. (defconstant +polygon-offset-ext+ #x8037)
  1812. (defconstant +polygon-offset-factor-ext+ #x8038)
  1813. (defconstant +polygon-offset-bias-ext+ #x8039)
  1814. (defconstant +ext-texture3d+ 1)
  1815. (defconstant +pack-skip-images-ext+ #x806b)
  1816. (defconstant +pack-image-height-ext+ #x806c)
  1817. (defconstant +unpack-skip-images-ext+ #x806d)
  1818. (defconstant +unpack-image-height-ext+ #x806e)
  1819. (defconstant +texture-3d-ext+ #x806f)
  1820. (defconstant +proxy-texture-3d-ext+ #x8070)
  1821. (defconstant +texture-depth-ext+ #x8071)
  1822. (defconstant +texture-wrap-r-ext+ #x8072)
  1823. (defconstant +max-3d-texture-size-ext+ #x8073)
  1824. (defconstant +texture-3d-binding-ext+ #x806a)
  1825. (defconstant +ext-texture-object+ 1)
  1826. (defconstant +texture-priority-ext+ #x8066)
  1827. (defconstant +texture-resident-ext+ #x8067)
  1828. (defconstant +texture-1d-binding-ext+ #x8068)
  1829. (defconstant +texture-2d-binding-ext+ #x8069)
  1830. (defconstant +ext-rescale-normal+ 1)
  1831. (defconstant +rescale-normal-ext+ #x803a)
  1832. (defconstant +ext-vertex-array+ 1)
  1833. (defconstant +vertex-array-ext+ #x8074)
  1834. (defconstant +normal-array-ext+ #x8075)
  1835. (defconstant +color-array-ext+ #x8076)
  1836. (defconstant +index-array-ext+ #x8077)
  1837. (defconstant +texture-coord-array-ext+ #x8078)
  1838. (defconstant +edge-flag-array-ext+ #x8079)
  1839. (defconstant +vertex-array-size-ext+ #x807a)
  1840. (defconstant +vertex-array-type-ext+ #x807b)
  1841. (defconstant +vertex-array-stride-ext+ #x807c)
  1842. (defconstant +vertex-array-count-ext+ #x807d)
  1843. (defconstant +normal-array-type-ext+ #x807e)
  1844. (defconstant +normal-array-stride-ext+ #x807f)
  1845. (defconstant +normal-array-count-ext+ #x8080)
  1846. (defconstant +color-array-size-ext+ #x8081)
  1847. (defconstant +color-array-type-ext+ #x8082)
  1848. (defconstant +color-array-stride-ext+ #x8083)
  1849. (defconstant +color-array-count-ext+ #x8084)
  1850. (defconstant +index-array-type-ext+ #x8085)
  1851. (defconstant +index-array-stride-ext+ #x8086)
  1852. (defconstant +index-array-count-ext+ #x8087)
  1853. (defconstant +texture-coord-array-size-ext+ #x8088)
  1854. (defconstant +texture-coord-array-type-ext+ #x8089)
  1855. (defconstant +texture-coord-array-stride-ext+ #x808a)
  1856. (defconstant +texture-coord-array-count-ext+ #x808b)
  1857. (defconstant +edge-flag-array-stride-ext+ #x808c)
  1858. (defconstant +edge-flag-array-count-ext+ #x808d)
  1859. (defconstant +vertex-array-pointer-ext+ #x808e)
  1860. (defconstant +normal-array-pointer-ext+ #x808f)
  1861. (defconstant +color-array-pointer-ext+ #x8090)
  1862. (defconstant +index-array-pointer-ext+ #x8091)
  1863. (defconstant +texture-coord-array-pointer-ext+ #x8092)
  1864. (defconstant +edge-flag-array-pointer-ext+ #x8093)
  1865. (defconstant +sgis-texture-edge-clamp+ 1)
  1866. (defconstant +clamp-to-edge-sgis+ #x812f)
  1867. (defconstant +ext-blend-minmax+ 1)
  1868. (defconstant +func-add-ext+ #x8006)
  1869. (defconstant +min-ext+ #x8007)
  1870. (defconstant +max-ext+ #x8008)
  1871. (defconstant +blend-equation-ext+ #x8009)
  1872. (defconstant +ext-blend-subtract+ 1)
  1873. (defconstant +func-subtract-ext+ #x800a)
  1874. (defconstant +func-reverse-subtract-ext+ #x800b)
  1875. (defconstant +ext-blend-logic-op+ 1)
  1876. (defconstant +ext-point-parameters+ 1)
  1877. (defconstant +point-size-min-ext+ #x8126)
  1878. (defconstant +point-size-max-ext+ #x8127)
  1879. (defconstant +point-fade-threshold-size-ext+ #x8128)
  1880. (defconstant +distance-attenuation-ext+ #x8129)
  1881. (defconstant +ext-paletted-texture+ 1)
  1882. (defconstant +table-too-large-ext+ #x8031)
  1883. (defconstant +color-table-format-ext+ #x80d8)
  1884. (defconstant +color-table-width-ext+ #x80d9)
  1885. (defconstant +color-table-red-size-ext+ #x80da)
  1886. (defconstant +color-table-green-size-ext+ #x80db)
  1887. (defconstant +color-table-blue-size-ext+ #x80dc)
  1888. (defconstant +color-table-alpha-size-ext+ #x80dd)
  1889. (defconstant +color-table-luminance-size-ext+ #x80de)
  1890. (defconstant +color-table-intensity-size-ext+ #x80df)
  1891. (defconstant +texture-index-size-ext+ #x80ed)
  1892. (defconstant +color-index1-ext+ #x80e2)
  1893. (defconstant +color-index2-ext+ #x80e3)
  1894. (defconstant +color-index4-ext+ #x80e4)
  1895. (defconstant +color-index8-ext+ #x80e5)
  1896. (defconstant +color-index12-ext+ #x80e6)
  1897. (defconstant +color-index16-ext+ #x80e7)
  1898. (defconstant +ext-clip-volume-hint+ 1)
  1899. (defconstant +clip-volume-clipping-hint-ext+ #x80f0)
  1900. (defconstant +ext-compiled-vertex-array+ 1)
  1901. (defconstant +array-element-lock-first-ext+ #x81a8)
  1902. (defconstant +array-element-lock-count-ext+ #x81a9)
  1903. (defconstant +hp-occlusion-test+ 1)
  1904. (defconstant +occlusion-test-hp+ #x8165)
  1905. (defconstant +occlusion-test-result-hp+ #x8166)
  1906. (defconstant +ext-shared-texture-palette+ 1)
  1907. (defconstant +shared-texture-palette-ext+ #x81fb)
  1908. (defconstant +ext-stencil-wrap+ 1)
  1909. (defconstant +incr-wrap-ext+ #x8507)
  1910. (defconstant +decr-wrap-ext+ #x8508)
  1911. (defconstant +nv-texgen-reflection+ 1)
  1912. (defconstant +normal-map-nv+ #x8511)
  1913. (defconstant +reflection-map-nv+ #x8512)
  1914. (defconstant +ext-texture-env-add+ 1)
  1915. (defconstant +mesa-window-pos+ 1)
  1916. (defconstant +mesa-resize-buffers+ 1)
  1917. )
  1918. ;;; Utility stuff
  1919. (deftype bool () 'card8)
  1920. (deftype float32 () 'single-float)
  1921. (deftype float64 () 'double-float)
  1922. (declaim (inline aset-float32 aset-float64))
  1923. #+sbcl
  1924. (defun aset-float32 (value array index)
  1925. (declare (type single-float value)
  1926. (type buffer-bytes array)
  1927. (type array-index index))
  1928. #.(declare-buffun)
  1929. (let ((bits (sb-kernel:single-float-bits value)))
  1930. (declare (type (unsigned-byte 32) bits))
  1931. (aset-card32 bits array index))
  1932. value)
  1933. #+cmu
  1934. (defun aset-float32 (value array index)
  1935. (declare (type single-float value)
  1936. (type buffer-bytes array)
  1937. (type array-index index))
  1938. #.(declare-buffun)
  1939. (let ((bits (kernel:single-float-bits value)))
  1940. (declare (type (unsigned-byte 32) bits))
  1941. (aset-card32 bits array index))
  1942. value)
  1943. #+openmcl
  1944. (defun aset-float32 (value array index)
  1945. (declare (type single-float value)
  1946. (type buffer-bytes array)
  1947. (type array-index index))
  1948. #.(declare-buffun)
  1949. (let ((bits (ccl::single-float-bits value)))
  1950. (declare (type (unsigned-byte 32) bits))
  1951. (aset-card32 bits array index))
  1952. value)
  1953. #+sbcl
  1954. (defun aset-float64 (value array index)
  1955. (declare (type double-float value)
  1956. (type buffer-bytes array)
  1957. (type array-index index))
  1958. #.(declare-buffun)
  1959. (let ((low (sb-kernel:double-float-low-bits value))
  1960. (high (sb-kernel:double-float-high-bits value)))
  1961. (declare (type (unsigned-byte 32) low high))
  1962. (aset-card32 low array index)
  1963. (aset-card32 high array (the array-index (+ index 4))))
  1964. value)
  1965. #+cmu
  1966. (defun aset-float64 (value array index)
  1967. (declare (type double-float value)
  1968. (type buffer-bytes array)
  1969. (type array-index index))
  1970. #.(declare-buffun)
  1971. (let ((low (kernel:double-float-low-bits value))
  1972. (high (kernel:double-float-high-bits value)))
  1973. (declare (type (unsigned-byte 32) low high))
  1974. (aset-card32 low array index)
  1975. (aset-card32 high array (+ index 4)))
  1976. value)
  1977. #+openmcl
  1978. (defun aset-float64 (value array index)
  1979. (declare (type double-float value)
  1980. (type buffer-bytes array)
  1981. (type array-index index))
  1982. #.(declare-buffun)
  1983. (multiple-value-bind (low high)
  1984. (ccl::double-float-bits value)
  1985. (declare (type (unsigned-byte 32) low high))
  1986. (aset-card32 low array index)
  1987. (aset-card32 high array (the array-index (+ index 4))))
  1988. value)
  1989. (eval-when (:compile-toplevel :load-toplevel :execute)
  1990. (defun byte-width (type)
  1991. (ecase type
  1992. ((int8 card8 bool) 1)
  1993. ((int16 card16) 2)
  1994. ((int32 card32 float32) 4)
  1995. ((float64) 8)))
  1996. (defun setter (type)
  1997. (ecase type
  1998. (int8 'aset-int8)
  1999. (int16 'aset-int16)
  2000. (int32 'aset-int32)
  2001. (bool 'aset-card8)
  2002. (card8 'aset-card8)
  2003. (card16 'aset-card16)
  2004. (card32 'aset-card32)
  2005. (float32 'aset-float32)
  2006. (float64 'aset-float64)))
  2007. (defun sequence-setter (type)
  2008. (ecase type
  2009. (int8 'sset-int8)
  2010. (int16 'sset-int16)
  2011. (int32 'sset-int32)
  2012. (bool 'sset-card8)
  2013. (card8 'sset-card8)
  2014. (card16 'sset-card16)
  2015. (card32 'sset-card32)
  2016. (float32 'sset-float32)
  2017. (float64 'sset-float64)))
  2018. (defmacro define-sequence-setter (type)
  2019. `(defun ,(intern (format nil "~A-~A" 'sset type)) (seq buffer start length)
  2020. (declare (type sequence seq)
  2021. (type buffer-bytes buffer)
  2022. (type array-index start)
  2023. (type fixnum length))
  2024. #.(declare-buffun)
  2025. (assert (= length (length seq))
  2026. (length seq)
  2027. "SEQUENCE length should be ~D, not ~D." length (length seq))
  2028. (typecase seq
  2029. (list
  2030. (let ((offset 0))
  2031. (declare (type fixnum offset))
  2032. (dolist (n seq)
  2033. (declare (type ,type n))
  2034. (,(setter type) n buffer (the array-index (+ start offset)))
  2035. (incf offset ,(byte-width type)))))
  2036. ((simple-array ,type)
  2037. (dotimes (i ,(byte-width type))
  2038. (,(setter type)
  2039. (aref seq i)
  2040. buffer
  2041. (the array-index (+ start (* i ,(byte-width type)))))))
  2042. (vector
  2043. (dotimes (i ,(byte-width type))
  2044. (,(setter type)
  2045. (svref seq i)
  2046. buffer
  2047. (the array-index (+ start (* i ,(byte-width type))))))))))
  2048. (define-sequence-setter int8)
  2049. (define-sequence-setter int16)
  2050. (define-sequence-setter int32)
  2051. (define-sequence-setter bool)
  2052. (define-sequence-setter card8)
  2053. (define-sequence-setter card16)
  2054. (define-sequence-setter card32)
  2055. (define-sequence-setter float32)
  2056. (define-sequence-setter float64)
  2057. (defun make-argspecs (list)
  2058. (destructuring-bind (name type)
  2059. list
  2060. (etypecase type
  2061. (symbol `(,name ,type 1 nil))
  2062. (list
  2063. `(,name
  2064. ,(second type)
  2065. ,(third type)
  2066. ,(if (consp (third type))
  2067. (make-symbol (format nil "~A-~A" name 'length))
  2068. nil))))))
  2069. (defun byte-width-calculation (argspecs)
  2070. (let ((constant 0)
  2071. (calculated ()))
  2072. (loop
  2073. for (name type length length-var) in argspecs
  2074. do (let ((byte-width (byte-width type)))
  2075. (typecase length
  2076. (number (incf constant (* byte-width length)))
  2077. (symbol (push `(* ,byte-width ,length) calculated))
  2078. (cons (push `(* ,byte-width ,length-var) calculated)))))
  2079. (if (null calculated)
  2080. constant
  2081. (list* '+ constant calculated))))
  2082. (defun composite-args (argspecs)
  2083. (loop
  2084. for (name type length length-var) in argspecs
  2085. when (consp length)
  2086. collect (list length-var length)))
  2087. (defun make-setter-forms (argspecs)
  2088. (loop
  2089. for (name type length length-var) in argspecs
  2090. collecting `(progn
  2091. ,(if (and (numberp length)
  2092. (= 1 length))
  2093. `(,(setter type) ,name .rbuf. .index.)
  2094. `(,(sequence-setter type) ,name .rbuf. .index.
  2095. ,(if length-var length-var length)))
  2096. (setf .index. (the array-index
  2097. (+ .index.
  2098. (the fixnum (* ,(byte-width type)
  2099. ,(if length-var length-var length)))))))))
  2100. (defmacro define-rendering-command (name opcode &rest args)
  2101. ;; FIXME: Must heavily type-annotate.
  2102. (labels ((expand-args (list)
  2103. (loop
  2104. for (arg type) in list
  2105. if (consp arg)
  2106. append (loop
  2107. for name in arg
  2108. collecting (list name type))
  2109. else
  2110. collect (list arg type))))
  2111. (let* ((args (expand-args args))
  2112. (argspecs (mapcar 'make-argspecs args))
  2113. (total-byte-width (byte-width-calculation argspecs))
  2114. (composite-args (composite-args argspecs)))
  2115. `(defun ,name ,(mapcar #'first argspecs)
  2116. (declare ,@(mapcar #'(lambda (list)
  2117. (if (symbolp (second list))
  2118. (list* 'type (reverse list))
  2119. `(type sequence ,(first list))))
  2120. args))
  2121. #.(declare-buffun)
  2122. (assert (context-p *current-context*)
  2123. (*current-context*)
  2124. "*CURRENT-CONTEXT* is not set (~S)." *current-context*)
  2125. (let* ((.ctx. *current-context*)
  2126. (.index0. (context-index .ctx.))
  2127. (.index. (+ .index0. 4))
  2128. (.rbuf. (context-rbuf .ctx.))
  2129. ,@composite-args
  2130. (.length. (+ 4 (* 4 (ceiling ,total-byte-width 4)))))
  2131. (declare (type context .ctx.)
  2132. (type array-index .index. .index0.)
  2133. (type buffer-bytes .rbuf.)
  2134. ,@(mapcar #'(lambda (list)
  2135. `(type fixnum ,(first list)))
  2136. composite-args)
  2137. (type fixnum .length.))
  2138. (when (< (- (length .rbuf.) 8)
  2139. (+ .index. .length.))
  2140. (error "Rendering command sequence too long. Implement automatic buffer flushing."))
  2141. (aset-card16 .length. .rbuf. (the array-index .index0.))
  2142. (aset-card16 ,opcode .rbuf. (the array-index (+ .index0. 2)))
  2143. ,@(make-setter-forms argspecs)
  2144. (setf (context-index .ctx.) (the array-index (+ .index0. .length.))))))))
  2145. ) ;; eval-when
  2146. ;;; Command implementation.
  2147. (defun get-string (name)
  2148. (assert (context-p *current-context*)
  2149. (*current-context*)
  2150. "*CURRENT-CONTEXT* is not set (~S)." *current-context*)
  2151. (let* ((ctx *current-context*)
  2152. (display (context-display ctx)))
  2153. (with-buffer-request-and-reply (display (extension-opcode display "GLX") nil)
  2154. ((data +get-string+)
  2155. ;; *** This is CONTEXT-TAG
  2156. (card32 (context-tag ctx))
  2157. ;; *** This is ENUM.
  2158. (card32 name))
  2159. (let* ((length (card32-get 12))
  2160. (bytes (sequence-get :format card8
  2161. :result-type '(simple-array card8 (*))
  2162. :index 32
  2163. :length length)))
  2164. (declare (type (simple-array card8 (*)) bytes)
  2165. (type fixnum length))
  2166. ;; FIXME: How does this interact with unicode?
  2167. (map-into (make-string (1- length)) #'code-char bytes)))))
  2168. ;;; Rendering commands (in alphabetical order).
  2169. (define-rendering-command accum 137
  2170. ;; *** ENUM
  2171. (op card32)
  2172. (value float32))
  2173. (define-rendering-command active-texture-arb 197
  2174. ;; *** ENUM
  2175. (texture card32))
  2176. (define-rendering-command alpha-func 159
  2177. ;; *** ENUM
  2178. (func card32)
  2179. (ref float32))
  2180. (define-rendering-command begin 4
  2181. ;; *** ENUM
  2182. (mode card32))
  2183. (define-rendering-command bind-texture 4117
  2184. ;; *** ENUM
  2185. (target card32)
  2186. (texture card32))
  2187. (define-rendering-command blend-color 4096
  2188. (red float32)
  2189. (green float32)
  2190. (blue float32)
  2191. (alpha float32))
  2192. (define-rendering-command blend-equotion 4097
  2193. ;; *** ENUM
  2194. (mode card32))
  2195. (define-rendering-command blend-func 160
  2196. ;; *** ENUM
  2197. (sfactor card32)
  2198. ;; *** ENUM
  2199. (dfactor card32))
  2200. (define-rendering-command call-list 1
  2201. (list card32))
  2202. (define-rendering-command clear 127
  2203. ;; *** BITFIELD
  2204. (mask card32))
  2205. (define-rendering-command clear-accum 128
  2206. (red float32)
  2207. (green float32)
  2208. (blue float32)
  2209. (alpha float32))
  2210. (define-rendering-command clear-color 130
  2211. (red float32)
  2212. (green float32)
  2213. (blue float32)
  2214. (alpha float32))
  2215. (define-rendering-command clear-depth 132
  2216. (depth float64))
  2217. (define-rendering-command clear-index 129
  2218. (c float32))
  2219. (define-rendering-command clear-stencil 131
  2220. (s int32))
  2221. (define-rendering-command clip-plane 77
  2222. (equotion-0 float64)
  2223. (equotion-1 float64)
  2224. (equotion-2 float64)
  2225. (equotion-3 float64)
  2226. ;; *** ENUM
  2227. (plane card32))
  2228. (define-rendering-command color-3b 6
  2229. ((r g b) int8))
  2230. (define-rendering-command color-3d 7
  2231. ((r g b) float64))
  2232. (define-rendering-command color-3f 8
  2233. ((r g b) float32))
  2234. (define-rendering-command color-3i 9
  2235. ((r g b) int32))
  2236. (define-rendering-command color-3s 10
  2237. ((r g b) int16))
  2238. (define-rendering-command color-3ub 11
  2239. ((r g b) card8))
  2240. (define-rendering-command color-3ui 12
  2241. ((r g b) card32))
  2242. (define-rendering-command color-3us 13
  2243. ((r g b) card16))
  2244. (define-rendering-command color-4b 14
  2245. ((r g b a) int8))
  2246. (define-rendering-command color-4d 15
  2247. ((r g b a) float64))
  2248. (define-rendering-command color-4f 16
  2249. ((r g b a) float32))
  2250. (define-rendering-command color-4i 17
  2251. ((r g b a) int32))
  2252. (define-rendering-command color-4s 18
  2253. ((r g b a) int16))
  2254. (define-rendering-command color-4ub 19
  2255. ((r g b a) card8))
  2256. (define-rendering-command color-4ui 20
  2257. ((r g b a) card32))
  2258. (define-rendering-command color-4us 21
  2259. ((r g b a) card16))
  2260. (define-rendering-command color-mask 134
  2261. (red bool)
  2262. (green bool)
  2263. (blue bool)
  2264. (alpha bool))
  2265. (define-rendering-command color-material 78
  2266. ;; *** ENUM
  2267. (face card32)
  2268. ;; *** ENUM
  2269. (mode card32))
  2270. (define-rendering-command color-table-parameter-fv 2054
  2271. ;; *** ENUM
  2272. (target card32)
  2273. ;; TODO:
  2274. ;; +GL-COLOR-TABLE-SCALE+ (#x80D6) => (length params) = 4
  2275. ;; +GL-COLOR-TABLE-BIAS+ (#x80d7) => (length params) = 4
  2276. ;; else (length params) = 0 (command is erronous)
  2277. ;; *** ENUM
  2278. (pname card32)
  2279. (params (list float32 4)))
  2280. (define-rendering-command color-table-parameter-iv 2055
  2281. ;; *** ENUM
  2282. (target card32)
  2283. ;; TODO:
  2284. ;; +GL-COLOR-TABLE-SCALE+ (#x80D6) => (length params) = 4
  2285. ;; +GL-COLOR-TABLE-BIAS+ (#x80d7) => (length params) = 4
  2286. ;; else (length params) = 0 (command is erronous)
  2287. ;; *** ENUM
  2288. (pname card32)
  2289. (params (list int32 4)))
  2290. (define-rendering-command convolution-parameter-f 4103
  2291. ;; *** ENUM
  2292. (target card32)
  2293. ;; *** ENUM
  2294. (pname card32)
  2295. (params float32))
  2296. (define-rendering-command convolution-parameter-fv 4104
  2297. ;; *** ENUM
  2298. (target card32)
  2299. ;; *** ENUM
  2300. (pname card32)
  2301. (params (list float32 (ecase pname
  2302. ((#.+convolution-border-mode+
  2303. #.+convolution-format+
  2304. #.+convolution-width+
  2305. #.+convolution-height+
  2306. #.+max-convolution-width+
  2307. #.+max-convolution-width+)
  2308. 1)
  2309. ((#.+convolution-filter-scale+
  2310. #.+convolution-filter-bias+)
  2311. 4)))))
  2312. (define-rendering-command convolution-parameter-i 4105
  2313. ;; *** ENUM
  2314. (target card32)
  2315. ;; *** ENUM
  2316. (pname card32)
  2317. (params int32))
  2318. (define-rendering-command convolution-parameter-iv 4106
  2319. ;; *** ENUM
  2320. (target card32)
  2321. ;; *** ENUM
  2322. (pname card32)
  2323. (params (list int32 (ecase pname
  2324. ((#.+convolution-border-mode+
  2325. #.+convolution-format+
  2326. #.+convolution-width+
  2327. #.+convolution-height+
  2328. #.+max-convolution-width+
  2329. #.+max-convolution-width+)
  2330. 1)
  2331. ((#.+convolution-filter-scale+
  2332. #.+convolution-filter-bias+)
  2333. 4)))))
  2334. (define-rendering-command copy-color-sub-table 196
  2335. ;; *** ENUM
  2336. (target card32)
  2337. (start int32)
  2338. (x int32)
  2339. (y int32)
  2340. (width int32))
  2341. (define-rendering-command copy-color-table 2056
  2342. ;; *** ENUM
  2343. (target card32)
  2344. ;; *** ENUM
  2345. (internalformat card32)
  2346. (x int32)
  2347. (y int32)
  2348. (width int32))
  2349. (define-rendering-command copy-convolution-filter-id 4107
  2350. ;; *** ENUM
  2351. (target card32)
  2352. ;; *** ENUM
  2353. (internalformat card32)
  2354. (x int32)
  2355. (y int32)
  2356. (width int32))
  2357. (define-rendering-command copy-convolution-filter-2d 4108
  2358. ;; *** ENUM
  2359. (target card32)
  2360. ;; *** ENUM
  2361. (internalformat card32)
  2362. (x int32)
  2363. (y int32)
  2364. (width int32)
  2365. (height int32))
  2366. (define-rendering-command copy-pixels 172
  2367. (x int32)
  2368. (y int32)
  2369. (width int32)
  2370. (height int32)
  2371. ;; *** ENUM
  2372. (type card32))
  2373. (define-rendering-command copy-tex-image-1d 4119
  2374. ;; *** ENUM
  2375. (target card32)
  2376. (level int32)
  2377. ;; *** ENUM
  2378. (internalformat card32)
  2379. (x int32)
  2380. (y int32)
  2381. (width int32)
  2382. (border int32))
  2383. (define-rendering-command copy-tex-image-2d 4120
  2384. ;; *** ENUM
  2385. (target card32)
  2386. (level int32)
  2387. ;; *** ENUM
  2388. (internalformat card32)
  2389. (x int32)
  2390. (y int32)
  2391. (width int32)
  2392. (height int32)
  2393. (border int32))
  2394. (define-rendering-command copy-tex-sub-image-1d 4121
  2395. ;; *** ENUM
  2396. (target card32)
  2397. (level int32)
  2398. (xoffset int32)
  2399. (x int32)
  2400. (y int32)
  2401. (width int32))
  2402. (define-rendering-command copy-tex-sub-image-2d 4122
  2403. ;; *** ENUM
  2404. (target card32)
  2405. (level int32)
  2406. (xoffset int32)
  2407. (yoffset int32)
  2408. (x int32)
  2409. (y int32)
  2410. (width int32)
  2411. (height int32))
  2412. (define-rendering-command copy-tex-sub-image-3d 4123
  2413. ;; *** ENUM
  2414. (target card32)
  2415. (level int32)
  2416. (xoffset int32)
  2417. (yoffset int32)
  2418. (zoffset int32)
  2419. (x int32)
  2420. (y int32)
  2421. (width int32)
  2422. (height int32))
  2423. (define-rendering-command cull-face 79
  2424. ;; *** ENUM
  2425. (mode card32))
  2426. (define-rendering-command depth-func 164
  2427. ;; *** ENUM
  2428. (func card32))
  2429. (define-rendering-command depth-mask 135
  2430. (mask bool))
  2431. (define-rendering-command depth-range 174
  2432. (z-near float64)
  2433. (z-far float64))
  2434. (define-rendering-command draw-buffer 126
  2435. ;; *** ENUM
  2436. (mode card32))
  2437. (define-rendering-command edge-flag-v 22
  2438. (flag-0 bool))
  2439. (define-rendering-command end 23)
  2440. (define-rendering-command eval-coord-1d 151
  2441. (u-0 float64))
  2442. (define-rendering-command eval-coord-1f 152
  2443. (u-0 float32))
  2444. (define-rendering-command eval-coord-2d 153
  2445. ((u-0 u-1) float64))
  2446. (define-rendering-command eval-coord-2f 154
  2447. ((u-0 u-1) float32))
  2448. (define-rendering-command eval-mesh-1 155
  2449. ;; *** ENUM
  2450. (mode card32)
  2451. ((i1 i2) int32))
  2452. (define-rendering-command eval-mesh-2 157
  2453. ;; *** ENUM
  2454. (mode card32)
  2455. ((i1 i2 j1 j2) int32))
  2456. (define-rendering-command eval-point-1 156
  2457. (i int32))
  2458. (define-rendering-command eval-point-2 158
  2459. (i int32)
  2460. (j int32))
  2461. (define-rendering-command fog-f 80
  2462. ;; *** ENUM
  2463. (pname card32)
  2464. (param float32))
  2465. (define-rendering-command fog-fv 81
  2466. ;; *** ENUM
  2467. (pname card32)
  2468. (params (list float32 (ecase pname
  2469. ((#.+fog-index+
  2470. #.+fog-density+
  2471. #.+fog-start+
  2472. #.+fog-end+
  2473. #.+fog-mode+)
  2474. 1)
  2475. ((#.+fog-color+)
  2476. 4)))))
  2477. (define-rendering-command fog-i 82
  2478. ;; *** ENUM
  2479. (pname card32)
  2480. (param int32))
  2481. (define-rendering-command fog-iv 83
  2482. ;; *** ENUM
  2483. (pname card32)
  2484. (params (list int32 (ecase pname
  2485. ((#.+fog-index+
  2486. #.+fog-density+
  2487. #.+fog-start+
  2488. #.+fog-end+
  2489. #.+fog-mode+)
  2490. 1)
  2491. ((#.+fog-color+)
  2492. 4)))))
  2493. (define-rendering-command front-face 84
  2494. ;; *** ENUM
  2495. (mode card32))
  2496. (define-rendering-command frustum 175
  2497. (left float64)
  2498. (right float64)
  2499. (bottom float64)
  2500. (top float64)
  2501. (z-near float64)
  2502. (z-far float64))
  2503. (define-rendering-command hint 85
  2504. ;; *** ENUM
  2505. (target card32)
  2506. ;; *** ENUM
  2507. (mode card32))
  2508. (define-rendering-command histogram 4110
  2509. ;; *** ENUM
  2510. (target card32)
  2511. (width int32)
  2512. ;; *** ENUM
  2513. (internalformat card32)
  2514. (sink bool))
  2515. (define-rendering-command index-mask 136
  2516. (mask card32))
  2517. (define-rendering-command index-d 24
  2518. (c-0 float64))
  2519. (define-rendering-command index-f 25
  2520. (c-0 float32))
  2521. (define-rendering-command index-i 26
  2522. (c-0 int32))
  2523. (define-rendering-command index-s 27
  2524. (c-0 int16))
  2525. (define-rendering-command index-ub 194
  2526. (c-0 card8))
  2527. (define-rendering-command init-names 121)
  2528. (define-rendering-command light-model-f 90
  2529. ;; *** ENUM
  2530. (pname card32)
  2531. (param float32))
  2532. (define-rendering-command light-model-fv 91
  2533. ;; *** ENUM
  2534. (pname card32)
  2535. (params (list float32 (ecase pname
  2536. ((#.+light-model-color-control+
  2537. #.+light-model-local-viewer+
  2538. #.+light-model-two-side+)
  2539. 1)
  2540. ((#.+light-model-ambient+)
  2541. 4)))))
  2542. (define-rendering-command light-model-i 92
  2543. ;; *** ENUM
  2544. (pname card32)
  2545. (param int32))
  2546. (define-rendering-command light-model-iv 93
  2547. ;; *** ENUM
  2548. (pname card32)
  2549. (params (list int32 (ecase pname
  2550. ((#.+light-model-color-control+
  2551. #.+light-model-local-viewer+
  2552. #.+light-model-two-side+)
  2553. 1)
  2554. ((#.+light-model-ambient+)
  2555. 4)))))
  2556. (define-rendering-command light-f 86
  2557. ;; *** ENUM
  2558. (light card32)
  2559. ;; *** ENUM
  2560. (pname card32)
  2561. (param float32))
  2562. (define-rendering-command light-fv 87
  2563. ;; *** ENUM
  2564. (light card32)
  2565. ;; *** ENUM
  2566. (pname card32)
  2567. (params (list float32 (ecase pname
  2568. ((#.+ambient+
  2569. #.+diffuse+
  2570. #.+specular+
  2571. #.+position+)
  2572. 4)
  2573. ((#.+spot-direction+)
  2574. 3)
  2575. ((#.+spot-exponent+
  2576. #.+spot-cutoff+
  2577. #.+constant-attenuation+
  2578. #.+linear-attenuation+
  2579. #.+quadratic-attenuation+)
  2580. 1)))))
  2581. (define-rendering-command light-i 88
  2582. ;; *** ENUM
  2583. (light card32)
  2584. ;; *** ENUM
  2585. (pname card32)
  2586. (param int32))
  2587. (define-rendering-command light-iv 89
  2588. ;; *** ENUM
  2589. (light card32)
  2590. ;; *** ENUM
  2591. (pname card32)
  2592. (params (list int32 (ecase pname
  2593. ((#.+ambient+
  2594. #.+diffuse+
  2595. #.+specular+
  2596. #.+position+)
  2597. 4)
  2598. ((#.+spot-direction+)
  2599. 3)
  2600. ((#.+spot-exponent+
  2601. #.+spot-cutoff+
  2602. #.+constant-attenuation+
  2603. #.+linear-attenuation+
  2604. #.+quadratic-attenuation+)
  2605. 1)))))
  2606. (define-rendering-command line-stipple 94
  2607. (factor int32)
  2608. (pattern card16))
  2609. (define-rendering-command line-width 95
  2610. (width float32))
  2611. (define-rendering-command list-base 3
  2612. (base card32))
  2613. (define-rendering-command load-identity 176)
  2614. (define-rendering-command load-matrix-d 178
  2615. (m (list float64 16)))
  2616. (define-rendering-command load-matrix-f 177
  2617. (m (list float32 16)))
  2618. (define-rendering-command load-name 122
  2619. (name card32))
  2620. (define-rendering-command logic-op 161
  2621. ;; *** ENUM
  2622. (name card32))
  2623. (define-rendering-command map-grid-1d 147
  2624. (u1 float64)
  2625. (u2 float64)
  2626. (un int32))
  2627. (define-rendering-command map-grid-1f 148
  2628. (un int32)
  2629. (u1 float32)
  2630. (u2 float32))
  2631. (define-rendering-command map-grid-2d 149
  2632. (u1 float64)
  2633. (u2 float64)
  2634. (v1 float64)
  2635. (v2 float64)
  2636. (un int32)
  2637. (vn int32))
  2638. (define-rendering-command map-grid-2f 150
  2639. (un int32)
  2640. (u1 float32)
  2641. (u2 float32)
  2642. (vn int32)
  2643. (v1 float32)
  2644. (v2 float32))
  2645. (define-rendering-command material-f 96
  2646. ;; *** ENUM
  2647. (face card32)
  2648. ;; *** ENUM
  2649. (pname card32)
  2650. (param float32))
  2651. (define-rendering-command material-fv 97
  2652. ;; *** ENUM
  2653. (face card32)
  2654. ;; *** ENUM
  2655. (pname card32)
  2656. (params (list float32 (ecase pname
  2657. ((#.+ambient+
  2658. #.+diffuse+
  2659. #.+specular+
  2660. #.+emission+
  2661. #.+ambient-and-diffuse+)
  2662. 4)
  2663. ((#.+shininess+)
  2664. 1)
  2665. ((#.+color-index+)
  2666. 3)))))
  2667. (define-rendering-command material-i 98
  2668. ;; *** ENUM
  2669. (face card32)
  2670. ;; *** ENUM
  2671. (pname card32)
  2672. (param int32))
  2673. (define-rendering-command material-iv 99
  2674. ;; *** ENUM
  2675. (face card32)
  2676. ;; *** ENUM
  2677. (pname card32)
  2678. (params (list int32 (ecase pname
  2679. ((#.+ambient+
  2680. #.+diffuse+
  2681. #.+specular+
  2682. #.+emission+
  2683. #.+ambient-and-diffuse+)
  2684. 4)
  2685. ((#.+shininess+)
  2686. 1)
  2687. ((#.+color-index+)
  2688. 3)))))
  2689. (define-rendering-command matrix-mode 179
  2690. ;; *** ENUM
  2691. (mode card32))
  2692. (define-rendering-command minmax 4111
  2693. ;; *** ENUM
  2694. (target card32)
  2695. ;; *** ENUM
  2696. (internalformat card32)
  2697. (sink bool))
  2698. (define-rendering-command mult-matrix-d 181
  2699. (m (list float64 16)))
  2700. (define-rendering-command mult-matrix-f 180
  2701. (m (list float32 16)))
  2702. ;;; *** Note that TARGET is placed last for FLOAT64 versions.
  2703. (define-rendering-command multi-tex-coord-1d-arb 198
  2704. (v-0 float64)
  2705. ;; *** ENUM
  2706. (target card32))
  2707. (define-rendering-command multi-tex-coord-1f-arb 199
  2708. ;; *** ENUM
  2709. (target card32)
  2710. (v-0 float32))
  2711. (define-rendering-command multi-tex-coord-1i-arb 200
  2712. ;; *** ENUM
  2713. (target card32)
  2714. (v-0 int32))
  2715. (define-rendering-command multi-tex-coord-1s-arb 201
  2716. ;; *** ENUM
  2717. (target card32)
  2718. (v-0 int16))
  2719. (define-rendering-command multi-tex-coord-2d-arb 202
  2720. ((v-0 v-1) float64)
  2721. ;; *** ENUM
  2722. (target card32))
  2723. (define-rendering-command multi-tex-coord-2f-arb 203
  2724. ;; *** ENUM
  2725. (target card32)
  2726. ((v-0 v-1) float32))
  2727. (define-rendering-command multi-tex-coord-2i-arb 204
  2728. ;; *** ENUM
  2729. (target card32)
  2730. ((v-0 v-1) int32))
  2731. (define-rendering-command multi-tex-coord-2s-arb 205
  2732. ;; *** ENUM
  2733. (target card32)
  2734. ((v-0 v-1) int16))
  2735. (define-rendering-command multi-tex-coord-3d-arb 206
  2736. ((v-0 v-1 v-2) float64)
  2737. ;; *** ENUM
  2738. (target card32))
  2739. (define-rendering-command multi-tex-coord-3f-arb 207
  2740. ;; *** ENUM
  2741. (target card32)
  2742. ((v-0 v-1 v-2) float32))
  2743. (define-rendering-command multi-tex-coord-3i-arb 208
  2744. ;; *** ENUM
  2745. (target card32)
  2746. ((v-0 v-1 v-2) int32))
  2747. (define-rendering-command multi-tex-coord-3s-arb 209
  2748. ;; *** ENUM
  2749. (target card32)
  2750. ((v-0 v-1 v-2) int16))
  2751. (define-rendering-command multi-tex-coord-4d-arb 210
  2752. ((v-0 v-1 v-2 v-3) float64)
  2753. ;; *** ENUM
  2754. (target card32))
  2755. (define-rendering-command multi-tex-coord-4f-arb 211
  2756. ;; *** ENUM
  2757. (target card32)
  2758. ((v-0 v-1 v-2 v-3) float32))
  2759. (define-rendering-command multi-tex-coord-4i-arb 212
  2760. ;; *** ENUM
  2761. (target card32)
  2762. ((v-0 v-1 v-2 v-3) int32))
  2763. (define-rendering-command multi-tex-coord-4s-arb 213
  2764. ;; *** ENUM
  2765. (target card32)
  2766. ((v-0 v-1 v-2 v-3) int16))
  2767. (define-rendering-command normal-3b 28
  2768. ((v-0 v-1 v-2) int8))
  2769. (define-rendering-command normal-3d 29
  2770. ((v-0 v-1 v-2) float64))
  2771. (define-rendering-command normal-3f 30
  2772. ((v-0 v-1 v-2) float32))
  2773. (define-rendering-command normal-3i 31
  2774. ((v-0 v-1 v-2) int32))
  2775. (define-rendering-command normal-3s 32
  2776. ((v-0 v-1 v-2) int16))
  2777. (define-rendering-command ortho 182
  2778. (left float64)
  2779. (right float64)
  2780. (bottom float64)
  2781. (top float64)
  2782. (z-near float64)
  2783. (z-far float64))
  2784. (define-rendering-command pass-through 123
  2785. (token float32))
  2786. (define-rendering-command pixel-transfer-f 166
  2787. ;; *** ENUM
  2788. (pname card32)
  2789. (param float32))
  2790. (define-rendering-command pixel-transfer-i 167
  2791. ;; *** ENUM
  2792. (pname card32)
  2793. (param int32))
  2794. (define-rendering-command pixel-zoom 165
  2795. (xfactor float32)
  2796. (yfactor float32))
  2797. (define-rendering-command point-size 100
  2798. (size float32))
  2799. (define-rendering-command polygon-mode 101
  2800. ;; *** ENUM
  2801. (face card32)
  2802. ;; *** ENUM
  2803. (mode card32))
  2804. (define-rendering-command polygon-offset 192
  2805. (factor float32)
  2806. (units float32))
  2807. (define-rendering-command pop-attrib 141)
  2808. (define-rendering-command pop-matrix 183)
  2809. (define-rendering-command pop-name 124)
  2810. (define-rendering-command prioritize-textures 4118
  2811. (n int32)
  2812. (textures (list card32 n))
  2813. (priorities (list float32 n)))
  2814. (define-rendering-command push-attrib 142
  2815. ;; *** BITFIELD
  2816. (mask card32))
  2817. (define-rendering-command push-matrix 184)
  2818. (define-rendering-command push-name 125
  2819. (name card32))
  2820. (define-rendering-command raster-pos-2d 33
  2821. ((v-0 v-1) float64))
  2822. (define-rendering-command raster-pos-2f 34
  2823. ((v-0 v-1) float32))
  2824. (define-rendering-command raster-pos-2i 35
  2825. ((v-0 v-1) int32))
  2826. (define-rendering-command raster-pos-2s 36
  2827. ((v-0 v-1) int16))
  2828. (define-rendering-command raster-pos-3d 37
  2829. ((v-0 v-1 v-2) float64))
  2830. (define-rendering-command raster-pos-3f 38
  2831. ((v-0 v-1 v-2) float32))
  2832. (define-rendering-command raster-pos-3i 39
  2833. ((v-0 v-1 v-2) int32))
  2834. (define-rendering-command raster-pos-3s 40
  2835. ((v-0 v-1 v-2) int16))
  2836. (define-rendering-command raster-pos-4d 41
  2837. ((v-0 v-1 v-2 v-3) float64))
  2838. (define-rendering-command raster-pos-4f 42
  2839. ((v-0 v-1 v-2 v-3) float32))
  2840. (define-rendering-command raster-pos-4i 43
  2841. ((v-0 v-1 v-2 v-3) int32))
  2842. (define-rendering-command raster-pos-4s 44
  2843. ((v-0 v-1 v-2 v-3) int16))
  2844. (define-rendering-command read-buffer 171
  2845. ;; *** ENUM
  2846. (mode card32))
  2847. (define-rendering-command rect-d 45
  2848. ((v1-0 v1-1 v2-0 v2-1) float64))
  2849. (define-rendering-command rect-f 46
  2850. ((v1-0 v1-1 v2-0 v2-1) float32))
  2851. (define-rendering-command rect-i 47
  2852. ((v1-0 v1-1 v2-0 v2-1) int32))
  2853. (define-rendering-command rect-s 48
  2854. ((v1-0 v1-1 v2-0 v2-1) int16))
  2855. (define-rendering-command reset-histogram 4112
  2856. ;; *** ENUM
  2857. (target card32))
  2858. (define-rendering-command reset-minmax 4113
  2859. ;; *** ENUM
  2860. (target card32))
  2861. (define-rendering-command rotate-d 185
  2862. ((angle x y z) float64))
  2863. (define-rendering-command rotate-f 186
  2864. ((angle x y z) float32))
  2865. (define-rendering-command scale-d 187
  2866. ((x y z) float64))
  2867. (define-rendering-command scale-f 188
  2868. ((x y z) float32))
  2869. (define-rendering-command scissor 103
  2870. ((x y width height) int32))
  2871. (define-rendering-command shade-model 104
  2872. ;; *** ENUM
  2873. (mode card32))
  2874. (define-rendering-command stencil-func 162
  2875. ;; *** ENUM
  2876. (func card32)
  2877. (ref int32)
  2878. (mask card32))
  2879. (define-rendering-command stencil-mask 133
  2880. (mask card32))
  2881. (define-rendering-command stencil-op 163
  2882. ;; *** ENUM
  2883. (fail card32)
  2884. ;; *** ENUM
  2885. (zfail card32)
  2886. ;; *** ENUM
  2887. (zpass card32))
  2888. (define-rendering-command tex-env-f 111
  2889. ;; *** ENUM
  2890. (target card32)
  2891. ;; *** ENUM
  2892. (pname card32)
  2893. (param float32))
  2894. (define-rendering-command tex-env-fv 112
  2895. ;; *** ENUM
  2896. (target card32)
  2897. ;; *** ENUM
  2898. (pname card32)
  2899. (param (list float32 (ecase pname
  2900. (#.+texture-env-mode+ 1)
  2901. (#.+texture-env-color+ 4)))))
  2902. (define-rendering-command tex-env-i 113
  2903. ;; *** ENUM
  2904. (target card32)
  2905. ;; *** ENUM
  2906. (pname card32)
  2907. (param int32))
  2908. (define-rendering-command tex-env-iv 114
  2909. ;; *** ENUM
  2910. (target card32)
  2911. ;; *** ENUM
  2912. (pname card32)
  2913. (param (list int32 (ecase pname
  2914. (#.+texture-env-mode+ 1)
  2915. (#.+texture-env-color+ 4)))))
  2916. ;;; ***
  2917. ;;; last there.
  2918. (define-rendering-command tex-gen-d 115
  2919. (param float64)
  2920. ;; *** ENUM
  2921. (coord card32)
  2922. ;; *** ENUM
  2923. (pname card32))
  2924. (define-rendering-command tex-gen-dv 116
  2925. ;; *** ENUM
  2926. (coord card32)
  2927. ;; *** ENUM
  2928. (pname card32)
  2929. ;; +texture-gen-mode+ n=1
  2930. ;; +object-plane+ n=4
  2931. ;; +eye-plane+ n=1
  2932. (params (list float64 (ecase pname
  2933. ((#.+texture-gen-mode+ #.+eye-plane+) 1)
  2934. (#.+object-plane+ 4)))))
  2935. (define-rendering-command tex-gen-f 117
  2936. ;; *** ENUM
  2937. (coord card32)
  2938. ;; *** ENUM
  2939. (pname card32)
  2940. (param float32))
  2941. (define-rendering-command tex-gen-fv 118
  2942. ;; *** ENUM
  2943. (coord card32)
  2944. ;; *** ENUM
  2945. (pname card32)
  2946. (params (list float32 (ecase pname
  2947. ((#.+texture-gen-mode+ #.+eye-plane+) 1)
  2948. (#.+object-plane+ 4)))))
  2949. (define-rendering-command tex-gen-i 119
  2950. ;; *** ENUM
  2951. (coord card32)
  2952. ;; *** ENUM
  2953. (pname card32)
  2954. (param int32))
  2955. (define-rendering-command tex-gen-iv 120
  2956. ;; *** ENUM
  2957. (coord card32)
  2958. ;; *** ENUM
  2959. (pname card32)
  2960. (params (list int32 (ecase pname
  2961. ((#.+texture-gen-mode+ #.+eye-plane+) 1)
  2962. (#.+object-plane+ 4)))))
  2963. (define-rendering-command tex-parameter-f 105
  2964. ;; *** ENUM
  2965. (target card32)
  2966. ;; *** ENUM
  2967. (pname card32)
  2968. (param float32))
  2969. (define-rendering-command tex-parameter-fv 106
  2970. ;; *** ENUM
  2971. (target card32)
  2972. ;; *** ENUM
  2973. (pname card32)
  2974. (params (list float32 (ecase pname
  2975. ((#.+texture-border-color+)
  2976. 4)
  2977. ((#.+texture-mag-filter+
  2978. #.+texture-min-filter+
  2979. #.+texture-wrap-s+
  2980. #.+texture-wrap-t+)
  2981. 1)))))
  2982. (define-rendering-command tex-parameter-i 107
  2983. ;; *** ENUM
  2984. (target card32)
  2985. ;; *** ENUM
  2986. (pname card32)
  2987. (param int32))
  2988. (define-rendering-command tex-parameter-iv 108
  2989. ;; *** ENUM
  2990. (target card32)
  2991. ;; *** ENUM
  2992. (pname card32)
  2993. (params (list int32 (ecase pname
  2994. ((#.+texture-border-color+)
  2995. 4)
  2996. ((#.+texture-mag-filter+
  2997. #.+texture-min-filter+
  2998. #.+texture-wrap-s+
  2999. #.+texture-wrap-t+)
  3000. 1)))))
  3001. (define-rendering-command translate-d 189
  3002. ((x y z) float64))
  3003. (define-rendering-command translate-f 190
  3004. ((x y z) float32))
  3005. (define-rendering-command vertex-2d 65
  3006. ((x y) float64))
  3007. (define-rendering-command vertex-2f 66
  3008. ((x y) float32))
  3009. (define-rendering-command vertex-2i 67
  3010. ((x y) int32))
  3011. (define-rendering-command vertex-2s 68
  3012. ((x y) int16))
  3013. (define-rendering-command vertex-3d 69
  3014. ((x y z) float64))
  3015. (define-rendering-command vertex-3f 70
  3016. ((x y z) float32))
  3017. (define-rendering-command vertex-3i 71
  3018. ((x y z) int32))
  3019. (define-rendering-command vertex-3s 72
  3020. ((x y z) int16))
  3021. (define-rendering-command vertex-4d 73
  3022. ((x y z w) float64))
  3023. (define-rendering-command vertex-4f 74
  3024. ((x y z w) float32))
  3025. (define-rendering-command vertex-4i 75
  3026. ((x y z w) int32))
  3027. (define-rendering-command vertex-4s 76
  3028. ((x y z w) int16))
  3029. (define-rendering-command viewport 191
  3030. ((x y width height) int32))
  3031. ;;; Potentially lerge rendering commands.
  3032. #-(and)
  3033. (define-large-rendering-command call-lists 2
  3034. (n int32)
  3035. ;; *** ENUM
  3036. (type card32)
  3037. (lists (list type n)))
  3038. ;;; Requests for GL non-rendering commands.
  3039. (defun new-list (list mode)
  3040. (assert (context-p *current-context*)
  3041. (*current-context*)
  3042. "~S is not a context." *current-context*)
  3043. (let* ((ctx *current-context*)
  3044. (display (context-display ctx)))
  3045. (with-buffer-request (display (extension-opcode display "GLX"))
  3046. (data +new-list+)
  3047. ;; *** GLX_CONTEXT_TAG
  3048. (card32 (context-tag ctx))
  3049. (card32 list)
  3050. ;; *** ENUM
  3051. (card32 mode))))
  3052. (defun gen-lists (range)
  3053. (assert (context-p *current-context*)
  3054. (*current-context*)
  3055. "~S is not a context." *current-context*)
  3056. (let* ((ctx *current-context*)
  3057. (display (context-display ctx)))
  3058. (with-buffer-request-and-reply (display (extension-opcode display "GLX") nil)
  3059. ((data +gen-lists+)
  3060. ;; *** GLX_CONTEXT_TAG
  3061. (card32 (context-tag ctx))
  3062. (integer range))
  3063. (card32-get 8))))
  3064. (defun end-list ()
  3065. (assert (context-p *current-context*)
  3066. (*current-context*)
  3067. "~S is not a context." *current-context*)
  3068. (let* ((ctx *current-context*)
  3069. (display (context-display ctx)))
  3070. (with-buffer-request (display (extension-opcode display "GLX"))
  3071. (data +end-list+)
  3072. ;; *** GLX_CONTEXT_TAG
  3073. (card32 (context-tag ctx)))))
  3074. (defun enable (cap)
  3075. (assert (context-p *current-context*)
  3076. (*current-context*)
  3077. "~S is not a context." *current-context*)
  3078. (let* ((ctx *current-context*)
  3079. (display (context-display ctx)))
  3080. (with-buffer-request-and-reply (display (extension-opcode display "GLX") nil)
  3081. ((data +enable+)
  3082. ;; *** GLX_CONTEXT_TAG
  3083. (card32 (context-tag ctx))
  3084. ;; *** ENUM?
  3085. (card32 cap)))))
  3086. ;;; FIXME: FLUSH and FINISH should send *all* buffered data, including
  3087. ;;; buffered rendering commands.
  3088. (defun flush ()
  3089. (assert (context-p *current-context*)
  3090. (*current-context*)
  3091. "~S is not a context." *current-context*)
  3092. (let* ((ctx *current-context*)
  3093. (display (context-display ctx)))
  3094. (with-buffer-request (display (extension-opcode display "GLX"))
  3095. (data +flush+)
  3096. ;; *** GLX_CONTEXT_TAG
  3097. (card32 (context-tag ctx)))))
  3098. (defun finish ()
  3099. (assert (context-p *current-context*)
  3100. (*current-context*)
  3101. "~S is not a context." *current-context*)
  3102. (let* ((ctx *current-context*)
  3103. (display (context-display ctx)))
  3104. (with-buffer-request-and-reply (display (extension-opcode display "GLX") nil)
  3105. ((data +finish+)
  3106. ;; *** GLX_CONTEXT_TAG
  3107. (card32 (context-tag ctx))))))