blob: f0f5adeabb4d25b580729d683ecc93f5c57c4978 [file] [log] [blame]
Guido van Rossum85a5fbb1990-10-14 12:07:46 +00001/*
2Input used to generate the Python module "glmodule.c".
3The stub generator is a Python script called "cgen".
4
5Each definition must be contained on one line:
6
7<returntype> <name> <type> <arg> <type> <arg>
8
9<returntype> can be: void, short, long (XXX maybe others?)
10
11<type> can be: char, string, short, float, long, or double
12 string indicates a null terminated string;
13 if <type> is char and <arg> begins with a *, the * is stripped
14 and <type> is changed into string
15
16<arg> has the form <mode> or <mode>[<subscript>]
17 where <mode> can be
18 s: arg is sent
19 r: arg is received (arg is a pointer)
20 and <subscript> can be (N and I are numbers):
21 N
22 argI
23 retval
24 N*argI
25 N*retval
26*/
27
28#include <stdio.h>
29#include <gl.h>
30#include <device.h>
31#include "PROTO.h"
32#include "object.h"
33#include "intobject.h"
34#include "floatobject.h"
35#include "listobject.h"
36#include "tupleobject.h"
37#include "dictobject.h"
38#include "methodobject.h"
39#include "moduleobject.h"
40#include "objimpl.h"
41#include "import.h"
42#include "sigtype.h"
43#include "modsupport.h"
44#include "cgensupport.h"
45#include "errors.h"
46
47/*
48Some stubs are too complicated for the stub generator.
49We can include manually written versions of them here.
50A line starting with '%' gives the name of the function so the stub
51generator can include it in the table of functions.
52*/
53
54/*
55varray -- an array of v.. calls.
56The argument is an array (maybe list or tuple) of points.
57Each point must be a tuple or list of coordinates (x, y, z).
58The points may be 2- or 3-dimensional but must all have the
59same dimension. Float and int values may be mixed however.
60The points are always converted to 3D double precision points
61by assuming z=0.0 if necessary (as indicated in the man page),
62and for each point v3d() is called.
63*/
64
65% varray
66
67static object *
68gl_varray(self, args)
69 object *self;
70 object *args;
71{
72 object *v, *w;
73 int i, n, width;
74 double vec[3];
75 object * (*getitem) FPROTO((object *, int));
76
77 if (!getiobjectarg(args, 1, 0, &v))
78 return NULL;
79
80 if (is_listobject(v)) {
81 n = getlistsize(v);
82 getitem = getlistitem;
83 }
84 else if (is_tupleobject(v)) {
85 n = gettuplesize(v);
86 getitem = gettupleitem;
87 }
88 else {
89 err_badarg();
90 return NULL;
91 }
92
93 if (n == 0) {
94 INCREF(None);
95 return None;
96 }
97 if (n > 0)
98 w = (*getitem)(v, 0);
99
100 width = 0;
101 if (w == NULL) {
102 }
103 else if (is_listobject(w)) {
104 width = getlistsize(w);
105 }
106 else if (is_tupleobject(w)) {
107 width = gettuplesize(w);
108 }
109
110 switch (width) {
111 case 2:
112 vec[2] = 0.0;
113 /* Fall through */
114 case 3:
115 break;
116 default:
117 err_badarg();
118 return NULL;
119 }
120
121 for (i = 0; i < n; i++) {
122 w = (*getitem)(v, i);
123 if (!getidoublearray(w, 1, 0, width, vec))
124 return NULL;
125 v3d(vec);
126 }
127
128 INCREF(None);
129 return None;
130}
131
132/*
133vnarray, nvarray -- an array of n3f and v3f calls.
134The argument is an array (list or tuple) of pairs of points and normals.
135Each pair is a tuple (NOT a list) of a point and a normal for that point.
136Each point or normal must be a tuple (NOT a list) of coordinates (x, y, z).
137Three coordinates must be given. Float and int values may be mixed.
138For each pair, n3f() is called for the normal, and then v3f() is called
139for the vector.
140
141vnarray and nvarray differ only in the order of the vector and normal in
142the pair: vnarray expects (v, n) while nvarray expects (n, v).
143*/
144
145static object *gen_nvarray(); /* Forward */
146
147% nvarray
148
149static object *
150gl_nvarray(self, args)
151 object *self;
152 object *args;
153{
154 return gen_nvarray(args, 0);
155}
156
157% vnarray
158
159static object *
160gl_vnarray(self, args)
161 object *self;
162 object *args;
163{
164 return gen_nvarray(args, 1);
165}
166
167/* Generic, internal version of {nv,nv}array: inorm indicates the
168 argument order, 0: normal first, 1: vector first. */
169
170static object *
171gen_nvarray(args, inorm)
172 object *args;
173 int inorm;
174{
175 object *v, *w, *wnorm, *wvec;
176 int i, n;
177 float norm[3], vec[3];
178 object * (*getitem) FPROTO((object *, int));
179
180 if (!getiobjectarg(args, 1, 0, &v))
181 return NULL;
182
183 if (is_listobject(v)) {
184 n = getlistsize(v);
185 getitem = getlistitem;
186 }
187 else if (is_tupleobject(v)) {
188 n = gettuplesize(v);
189 getitem = gettupleitem;
190 }
191 else {
192 err_badarg();
193 return NULL;
194 }
195
196 for (i = 0; i < n; i++) {
197 w = (*getitem)(v, i);
198 if (!is_tupleobject(w) || gettuplesize(w) != 2) {
199 err_badarg();
200 return NULL;
201 }
202 wnorm = gettupleitem(w, inorm);
203 wvec = gettupleitem(w, 1 - inorm);
204 if (!getifloatarray(wnorm, 1, 0, 3, norm) ||
205 !getifloatarray(wvec, 1, 0, 3, vec))
206 return NULL;
207 n3f(norm);
208 v3f(vec);
209 }
210
211 INCREF(None);
212 return None;
213}
214
215/* nurbssurface(s_knots[], t_knots[], ctl[][], s_order, t_order, type).
216 The dimensions of ctl[] are computed as follows:
217 [len(s_knots) - s_order], [len(t_knots) - t_order]
218*/
219
220% nurbssurface
221
222static object *
223gl_nurbssurface(self, args)
224 object *self;
225 object *args;
226{
227 long arg1 ;
228 double * arg2 ;
229 long arg3 ;
230 double * arg4 ;
231 double *arg5 ;
232 long arg6 ;
233 long arg7 ;
234 long arg8 ;
235 long ncoords;
236 long s_byte_stride, t_byte_stride;
237 long s_nctl, t_nctl;
238 long s, t;
239 object *v, *w, *pt;
240 double *pnext;
241 if (!getilongarraysize(args, 6, 0, &arg1))
242 return NULL;
243 if ((arg2 = NEW(double, arg1 )) == NULL) {
244 return err_nomem();
245 }
246 if (!getidoublearray(args, 6, 0, arg1 , arg2))
247 return NULL;
248 if (!getilongarraysize(args, 6, 1, &arg3))
249 return NULL;
250 if ((arg4 = NEW(double, arg3 )) == NULL) {
251 return err_nomem();
252 }
253 if (!getidoublearray(args, 6, 1, arg3 , arg4))
254 return NULL;
255 if (!getilongarg(args, 6, 3, &arg6))
256 return NULL;
257 if (!getilongarg(args, 6, 4, &arg7))
258 return NULL;
259 if (!getilongarg(args, 6, 5, &arg8))
260 return NULL;
261 if (arg8 == N_XYZ)
262 ncoords = 3;
263 else if (arg8 == N_XYZW)
264 ncoords = 4;
265 else {
266 err_badarg();
267 return NULL;
268 }
269 s_nctl = arg1 - arg6;
270 t_nctl = arg3 - arg7;
271 if (!getiobjectarg(args, 6, 2, &v))
272 return NULL;
273 if (!is_listobject(v) || getlistsize(v) != s_nctl) {
274 err_badarg();
275 return NULL;
276 }
277 if ((arg5 = NEW(double, s_nctl*t_nctl*ncoords )) == NULL) {
278 return err_nomem();
279 }
280 pnext = arg5;
281 for (s = 0; s < s_nctl; s++) {
282 w = getlistitem(v, s);
283 if (w == NULL || !is_listobject(w) ||
284 getlistsize(w) != t_nctl) {
285 err_badarg();
286 return NULL;
287 }
288 for (t = 0; t < t_nctl; t++) {
289 pt = getlistitem(w, t);
290 if (!getidoublearray(pt, 1, 0, ncoords, pnext))
291 return NULL;
292 pnext += ncoords;
293 }
294 }
295 s_byte_stride = sizeof(double) * ncoords;
296 t_byte_stride = s_byte_stride * s_nctl;
297 nurbssurface( arg1 , arg2 , arg3 , arg4 ,
298 s_byte_stride , t_byte_stride , arg5 , arg6 , arg7 , arg8 );
299 DEL(arg2);
300 DEL(arg4);
301 DEL(arg5);
302 INCREF(None);
303 return None;
304}
305
306/* nurbscurve(knots, ctlpoints, order, type).
307 The length of ctlpoints is len(knots)-order. */
308
309%nurbscurve
310
311static object *
312gl_nurbscurve(self, args)
313 object *self;
314 object *args;
315{
316 long arg1 ;
317 double * arg2 ;
318 long arg3 ;
319 double * arg4 ;
320 long arg5 ;
321 long arg6 ;
322 int ncoords, npoints;
323 int i;
324 object *v;
325 double *pnext;
326 if (!getilongarraysize(args, 4, 0, &arg1))
327 return NULL;
328 if ((arg2 = NEW(double, arg1 )) == NULL) {
329 return err_nomem();
330 }
331 if (!getidoublearray(args, 4, 0, arg1 , arg2))
332 return NULL;
333 if (!getilongarg(args, 4, 2, &arg5))
334 return NULL;
335 if (!getilongarg(args, 4, 3, &arg6))
336 return NULL;
337 if (arg6 == N_ST)
338 ncoords = 2;
339 else if (arg6 == N_STW)
340 ncoords = 3;
341 else {
342 err_badarg();
343 return NULL;
344 }
345 npoints = arg1 - arg5;
346 if (!getiobjectarg(args, 4, 1, &v))
347 return NULL;
348 if (!is_listobject(v) || getlistsize(v) != npoints) {
349 err_badarg();
350 return NULL;
351 }
352 if ((arg4 = NEW(double, npoints*ncoords )) == NULL) {
353 return err_nomem();
354 }
355 pnext = arg4;
356 for (i = 0; i < npoints; i++) {
357 if (!getidoublearray(getlistitem(v, i), 1, 0, ncoords, pnext))
358 return NULL;
359 pnext += ncoords;
360 }
361 arg3 = (sizeof(double)) * ncoords;
362 nurbscurve( arg1 , arg2 , arg3 , arg4 , arg5 , arg6 );
363 DEL(arg2);
364 DEL(arg4);
365 INCREF(None);
366 return None;
367}
368
369/* pwlcurve(points, type).
370 Points is a list of points. Type must be N_ST. */
371
372%pwlcurve
373
374static object *
375gl_pwlcurve(self, args)
376 object *self;
377 object *args;
378{
379 object *v;
380 long type;
381 double *data, *pnext;
382 long npoints, ncoords;
383 int i;
384 if (!getiobjectarg(args, 2, 0, &v))
385 return NULL;
386 if (!getilongarg(args, 2, 1, &type))
387 return NULL;
388 if (!is_listobject(v)) {
389 err_badarg();
390 return NULL;
391 }
392 npoints = getlistsize(v);
393 if (type == N_ST)
394 ncoords = 2;
395 else {
396 err_badarg();
397 return NULL;
398 }
399 if ((data = NEW(double, npoints*ncoords)) == NULL) {
400 return err_nomem();
401 }
402 pnext = data;
403 for (i = 0; i < npoints; i++) {
404 if (!getidoublearray(getlistitem(v, i), 1, 0, ncoords, pnext))
405 return NULL;
406 pnext += ncoords;
407 }
408 pwlcurve(npoints, data, sizeof(double)*ncoords, type);
409 DEL(data);
410 INCREF(None);
411 return None;
412}
413
414
415/* Picking and Selecting */
416
417static short *pickbuffer = NULL;
418static long pickbuffersize;
419
420static object *
421pick_select(args, func)
422 object *args;
423 void (*func)();
424{
425 if (!getilongarg(args, 1, 0, &pickbuffersize))
426 return NULL;
427 if (pickbuffer != NULL) {
428 err_setstr(RuntimeError,
429 "pick/gselect: already picking/selecting");
430 return NULL;
431 }
432 if ((pickbuffer = NEW(short, pickbuffersize)) == NULL) {
433 return err_nomem();
434 }
435 (*func)(pickbuffer, pickbuffersize);
436 INCREF(None);
437 return None;
438}
439
440static object *
441endpick_select(args, func)
442 object *args;
443 long (*func)();
444{
445 object *v, *w;
446 int i, nhits, n;
447 if (!getnoarg(args))
448 return NULL;
449 if (pickbuffer == NULL) {
450 err_setstr(RuntimeError,
451 "endpick/endselect: not in pick/select mode");
452 return NULL;
453 }
454 nhits = (*func)(pickbuffer);
455 if (nhits < 0) {
456 nhits = -nhits; /* How to report buffer overflow otherwise? */
457 }
458 /* Scan the buffer to see how many integers */
459 n = 0;
460 for (; nhits > 0; nhits--) {
461 n += 1 + pickbuffer[n];
462 }
463 v = newlistobject(n);
464 if (v == NULL)
465 return NULL;
466 /* XXX Could do it nicer and interpret the data structure here,
467 returning a list of lists. But this can be done in Python... */
468 for (i = 0; i < n; i++) {
469 w = newintobject((long)pickbuffer[i]);
470 if (w == NULL) {
471 DECREF(v);
472 return NULL;
473 }
474 setlistitem(v, i, w);
475 }
476 DEL(pickbuffer);
477 pickbuffer = NULL;
478 return v;
479}
480
481extern void pick(), gselect();
482extern long endpick(), endselect();
483
484%pick
485static object *gl_pick(self, args) object *self, *args; {
486 return pick_select(args, pick);
487}
488
489%endpick
490static object *gl_endpick(self, args) object *self, *args; {
491 return endpick_select(args, endpick);
492}
493
494%gselect
495static object *gl_gselect(self, args) object *self, *args; {
496 return pick_select(args, gselect);
497}
498
499%endselect
500static object *gl_endselect(self, args) object *self, *args; {
501 return endpick_select(args, endselect);
502}
503
504
505/* XXX The generator botches this one. Here's a quick hack to fix it. */
506
507% getmatrix float r[16]
508
509static object *
510gl_getmatrix(self, args)
511 object *self;
512 object *args;
513{
514 float arg1 [ 16 ] ;
515 object *v, *w;
516 int i;
517 getmatrix( arg1 );
518 v = newlistobject(16);
519 if (v == NULL) {
520 return err_nomem();
521 }
522 for (i = 0; i < 16; i++) {
523 w = mknewfloatobject(arg1[i]);
524 if (w == NULL) {
525 DECREF(v);
526 return NULL;
527 }
528 setlistitem(v, i, w);
529 }
530 return v;
531}
532
533/* End of manually written stubs */
534
535%%
536
537long getshade
538void devport short s long s
539void rdr2i long s long s
540void rectfs short s short s short s short s
541void rects short s short s short s short s
542void rmv2i long s long s
543void noport
544void popviewport
545void clear
546void clearhitcode
547void closeobj
548void cursoff
549void curson
550void doublebuffer
551void finish
552void gconfig
553void ginit
554void greset
555void multimap
556void onemap
557void popattributes
558void popmatrix
559void pushattributes
560void pushmatrix
561void pushviewport
562void qreset
563void RGBmode
564void singlebuffer
565void swapbuffers
566void gsync
567void tpon
568void tpoff
569void clkon
570void clkoff
571void ringbell
572#void callfunc
573void gbegin
574void textinit
575void initnames
576void pclos
577void popname
578void spclos
579void zclear
580void screenspace
581void reshapeviewport
582void winpush
583void winpop
584void foreground
585void endfullscrn
586void endpupmode
587void fullscrn
588void pupmode
589void winconstraints
590void pagecolor short s
591void textcolor short s
592void color short s
593void curveit short s
594void font short s
595void linewidth short s
596void setlinestyle short s
597void setmap short s
598void swapinterval short s
599void writemask short s
600void textwritemask short s
601void qdevice short s
602void unqdevice short s
603void curvebasis short s
604void curveprecision short s
605void loadname short s
606void passthrough short s
607void pushname short s
608void setmonitor short s
609void setshade short s
610void setpattern short s
611void pagewritemask short s
612#
613void callobj long s
614void delobj long s
615void editobj long s
616void makeobj long s
617void maketag long s
618void chunksize long s
619void compactify long s
620void deltag long s
621void lsrepeat long s
622void objinsert long s
623void objreplace long s
624void winclose long s
625void blanktime long s
626void freepup long s
627# This is not in the library!?
628###void pupcolor long s
629#
630void backbuffer long s
631void frontbuffer long s
632void lsbackup long s
633void resetls long s
634void lampon long s
635void lampoff long s
636void setbell long s
637void blankscreen long s
638void depthcue long s
639void zbuffer long s
640void backface long s
641#
642void cmov2i long s long s
643void draw2i long s long s
644void move2i long s long s
645void pnt2i long s long s
646void patchbasis long s long s
647void patchprecision long s long s
648void pdr2i long s long s
649void pmv2i long s long s
650void rpdr2i long s long s
651void rpmv2i long s long s
652void xfpt2i long s long s
653void objdelete long s long s
654void patchcurves long s long s
655void minsize long s long s
656void maxsize long s long s
657void keepaspect long s long s
658void prefsize long s long s
659void stepunit long s long s
660void fudge long s long s
661void winmove long s long s
662#
663void attachcursor short s short s
664void deflinestyle short s short s
665void noise short s short s
666void picksize short s short s
667void qenter short s short s
668void setdepth short s short s
669void cmov2s short s short s
670void draw2s short s short s
671void move2s short s short s
672void pdr2s short s short s
673void pmv2s short s short s
674void pnt2s short s short s
675void rdr2s short s short s
676void rmv2s short s short s
677void rpdr2s short s short s
678void rpmv2s short s short s
679void xfpt2s short s short s
680#
681void cmov2 float s float s
682void draw2 float s float s
683void move2 float s float s
684void pnt2 float s float s
685void pdr2 float s float s
686void pmv2 float s float s
687void rdr2 float s float s
688void rmv2 float s float s
689void rpdr2 float s float s
690void rpmv2 float s float s
691void xfpt2 float s float s
692#
693void loadmatrix float s[16]
694void multmatrix float s[16]
695void crv float s[16]
696void rcrv float s[16]
697#
698# Methods that have strings.
699#
700void addtopup long s char *s long s
701void charstr char *s
702void getport char *s
703long strwidth char *s
704long winopen char *s
705void wintitle char *s
706#
707# Methods that have 1 long (# of elements) and an array
708#
709void polf long s float s[3*arg1]
710void polf2 long s float s[2*arg1]
711void poly long s float s[3*arg1]
712void poly2 long s float s[2*arg1]
713void crvn long s float s[3*arg1]
714void rcrvn long s float s[4*arg1]
715#
716void polf2i long s long s[2*arg1]
717void polfi long s long s[3*arg1]
718void poly2i long s long s[2*arg1]
719void polyi long s long s[3*arg1]
720#
721void polf2s long s short s[2*arg1]
722void polfs long s short s[3*arg1]
723void polys long s short s[3*arg1]
724void poly2s long s short s[2*arg1]
725#
726void defcursor short s short s[16]
727void writepixels short s short s[arg1]
728void defbasis long s float s[16]
729void gewrite short s short s[arg1]
730#
731void rotate short s char s
732# This is not in the library!?
733###void setbutton short s char s
734void rot float s char s
735#
736void circfi long s long s long s
737void circi long s long s long s
738void cmovi long s long s long s
739void drawi long s long s long s
740void movei long s long s long s
741void pnti long s long s long s
742void newtag long s long s long s
743void pdri long s long s long s
744void pmvi long s long s long s
745void rdri long s long s long s
746void rmvi long s long s long s
747void rpdri long s long s long s
748void rpmvi long s long s long s
749void xfpti long s long s long s
750#
751void circ float s float s float s
752void circf float s float s float s
753void cmov float s float s float s
754void draw float s float s float s
755void move float s float s float s
756void pnt float s float s float s
757void scale float s float s float s
758void translate float s float s float s
759void pdr float s float s float s
760void pmv float s float s float s
761void rdr float s float s float s
762void rmv float s float s float s
763void rpdr float s float s float s
764void rpmv float s float s float s
765void xfpt float s float s float s
766#
767void RGBcolor short s short s short s
768void RGBwritemask short s short s short s
769void setcursor short s short s short s
770void tie short s short s short s
771void circfs short s short s short s
772void circs short s short s short s
773void cmovs short s short s short s
774void draws short s short s short s
775void moves short s short s short s
776void pdrs short s short s short s
777void pmvs short s short s short s
778void pnts short s short s short s
779void rdrs short s short s short s
780void rmvs short s short s short s
781void rpdrs short s short s short s
782void rpmvs short s short s short s
783void xfpts short s short s short s
784void curorigin short s short s short s
785void cyclemap short s short s short s
786#
787void patch float s[16] float s[16] float s[16]
788void splf long s float s[3*arg1] short s[arg1]
789void splf2 long s float s[2*arg1] short s[arg1]
790void splfi long s long s[3*arg1] short s[arg1]
791void splf2i long s long s[2*arg1] short s[arg1]
792void splfs long s short s[3*arg1] short s[arg1]
793void splf2s long s short s[2*arg1] short s[arg1]
794void defpattern short s short s short s[arg2*arg2/16]
795#
796void rpatch float s[16] float s[16] float s[16] float s[16]
797#
798# routines that send 4 floats
799#
800void ortho2 float s float s float s float s
801void rect float s float s float s float s
802void rectf float s float s float s float s
803void xfpt4 float s float s float s float s
804#
805void textport short s short s short s short s
806void mapcolor short s short s short s short s
807void scrmask short s short s short s short s
808void setvaluator short s short s short s short s
809void viewport short s short s short s short s
810void shaderange short s short s short s short s
811void xfpt4s short s short s short s short s
812void rectfi long s long s long s long s
813void recti long s long s long s long s
814void xfpt4i long s long s long s long s
815void prefposition long s long s long s long s
816#
817void arc float s float s float s short s short s
818void arcf float s float s float s short s short s
819void arcfi long s long s long s short s short s
820void arci long s long s long s short s short s
821#
822void bbox2 short s short s float s float s float s float s
823void bbox2i short s short s long s long s long s long s
824void bbox2s short s short s short s short s short s short s
825void blink short s short s short s short s short s
826void ortho float s float s float s float s float s float s
827void window float s float s float s float s float s float s
828void lookat float s float s float s float s float s float s short s
829#
830void perspective short s float s float s float s
831void polarview float s short s short s short s
832# XXX getichararray not supported
833#void writeRGB short s char s[arg1] char s[arg1] char s[arg1]
834#
835void arcfs short s short s short s short s short s
836void arcs short s short s short s short s short s
837void rectcopy short s short s short s short s short s short s
838void RGBcursor short s short s short s short s short s short s short s
839#
840long getbutton short s
841long getcmmode
842long getlsbackup
843long getresetls
844long getdcm
845long getzbuffer
846long ismex
847long isobj long s
848long isqueued short s
849long istag long s
850#
851long genobj
852long gentag
853long getbuffer
854long getcolor
855long getdisplaymode
856long getfont
857long getheight
858long gethitcode
859long getlstyle
860long getlwidth
861long getmap
862long getplanes
863long getwritemask
864long qtest
865long getlsrepeat
866long getmonitor
867long getopenobj
868long getpattern
869long winget
870long winattach
871long getothermonitor
872long newpup
873#
874long getvaluator short s
875void winset long s
876long dopup long s
877void getdepth short r short r
878void getcpos short r short r
879void getsize long r long r
880void getorigin long r long r
881void getviewport short r short r short r short r
882void gettp short r short r short r short r
883void getgpos float r float r float r float r
884void winposition long s long s long s long s
885void gRGBcolor short r short r short r
886void gRGBmask short r short r short r
887void getscrmask short r short r short r short r
888void gRGBcursor short r short r short r short r short r short r short r short r long *
889void getmcolor short s short r short r short r
890void mapw long s short s short s float r float r float r float r float r float r
891void mapw2 long s short s short s float r float r
892void defrasterfont short s short s short s Fontchar s[arg3] short s short s[4*arg5]
893long qread short r
894void getcursor short r short r short r long r
895#
896# For these we receive arrays of stuff
897#
898void getdev long s short s[arg1] short r[arg1]
899#XXX not generated correctly yet
900#void getmatrix float r[16]
901long readpixels short s short r[retval]
902long readRGB short s char r[retval] char r[retval] char r[retval]
903long blkqread short s short r[arg1]
904#
905# New 4D routines
906#
907void cmode
908void concave long s
909void curstype long s
910void drawmode long s
911void gammaramp short s[256] short s[256] short s[256]
912long getbackface
913long getdescender
914long getdrawmode
915long getmmode
916long getsm
917long getvideo long s
918void imakebackground
919void lmbind short s short s
920void lmdef long s long s long s float s[arg3]
921void mmode long s
922void normal float s[3]
923void overlay long s
924void RGBrange short s short s short s short s short s short s short s short s
925void setvideo long s long s
926void shademodel long s
927void underlay long s
928#
929# New Personal Iris/GT Routines
930#
931void bgnclosedline
932void bgnline
933void bgnpoint
934void bgnpolygon
935void bgnsurface
936void bgntmesh
937void bgntrim
938void endclosedline
939void endline
940void endpoint
941void endpolygon
942void endsurface
943void endtmesh
944void endtrim
945void blendfunction long s long s
946void c3f float s[3]
947void c3i long s[3]
948void c3s short s[3]
949void c4f float s[4]
950void c4i long s[4]
951void c4s short s[4]
952void colorf float s
953void cpack long s
954void czclear long s long s
955void dglclose long s
956long dglopen char *s long s
957long getgdesc long s
958void getnurbsproperty long s float r
959void glcompat long s long s
960void iconsize long s long s
961void icontitle char *s
962void lRGBrange short s short s short s short s short s short s long s long s
963void linesmooth long s
964void lmcolor long s
965void logicop long s
966long lrectread short s short s short s short s long r[retval]
967void lrectwrite short s short s short s short s long s[(arg2-arg1+1)*(arg4-arg3+1)]
968long rectread short s short s short s short s short r[retval]
969void rectwrite short s short s short s short s short s[(arg2-arg1+1)*(arg4-arg3+1)]
970void lsetdepth long s long s
971void lshaderange short s short s long s long s
972void n3f float s[3]
973void noborder
974void pntsmooth long s
975void readsource long s
976void rectzoom float s float s
977void sbox float s float s float s float s
978void sboxi long s long s long s long s
979void sboxs short s short s short s short s
980void sboxf float s float s float s float s
981void sboxfi long s long s long s long s
982void sboxfs short s short s short s short s
983void setnurbsproperty long s float s
984void setpup long s long s long s
985void smoothline long s
986void subpixel long s
987void swaptmesh
988long swinopen long s
989void v2f float s[2]
990void v2i long s[2]
991void v2s short s[2]
992void v3f float s[3]
993void v3i long s[3]
994void v3s short s[3]
995void v4f float s[4]
996void v4i long s[4]
997void v4s short s[4]
998void videocmd long s
999long windepth long s
1000void wmpack long s
1001void zdraw long s
1002void zfunction long s
1003void zsource long s
1004void zwritemask long s
1005#
1006# uses doubles
1007#
1008void v2d double s[2]
1009void v3d double s[3]
1010void v4d double s[4]