/[cmucl]/src/clx/gl.lisp
ViewVC logotype

Contents of /src/clx/gl.lisp

Parent Directory Parent Directory | Revision Log Revision Log


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