ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/rglinst.c
(Generate patch)

Comparing ray/src/common/rglinst.c (file contents):
Revision 3.3 by gwlarson, Wed Jul 15 17:52:16 1998 UTC vs.
Revision 3.6 by greg, Tue Feb 25 02:47:22 2003 UTC

# Line 1 | Line 1
1 /* Copyright (c) 1998 Silicon Graphics, Inc. */
2
1   #ifndef lint
2 < static char SCCSid[] = "$SunId$ SGI";
2 > static const char       RCSid[] = "$Id$";
3   #endif
6
4   /*
5   * Routines for reading instances and converting to OpenGL.
6   */
7  
8 + #include "copyright.h"
9 +
10   #include "radogl.h"
11   #include "octree.h"
12  
# Line 20 | Line 19 | typedef struct {
19          char    octfile[256];                   /* octree file path */
20   } OCTINST;                              /* octree to instantiate */
21  
23 OBJECT  nobjects;                       /* number of objects loaded so far */
24
25 extern int      free();
26
22   static double  ogetflt();
23   static long  ogetint();
24   static char  *ogetstr();
25 < static int  loadobj(), octerror(), skiptree();
25 > static int  loadobj();
26 > static void  skiptree();
27 > static void  octerror();
28   static OCTINST  *getoct();
29  
30   static char  *infn;                     /* input file name */
# Line 35 | Line 32 | static FILE  *infp;                    /* input file stream */
32   static int  objsize;                    /* size of stored OBJECT's */
33   static short  otypmap[NUMOTYPE+8];      /* object type map */
34  
35 < static long     imhash(mod) char *mod; {return((long)mod);}
35 > static unsigned long    imhash(mod) char *mod; {return((unsigned long)mod);}
36   static LUTAB    imtab = {imhash,NULL,NULL,NULL,0,NULL,0};
37  
38   static LUTAB    ottab = LU_SINIT(free,free);
39  
40  
41 + int
42   o_instance(o)                           /* convert instance to list call */
43   register OBJREC *o;
44   {
# Line 69 | Line 67 | register OBJREC        *o;
67          }
68          ot = getoct(o->oargs.sarg[0]);  /* get octree reference */
69          if (ot->localmatl &= o->os != NULL)     /* set material */
70 <                setmaterial(o->os, ot->cent, 0);
70 >                setmaterial((MATREC *)o->os, ot->cent, 0);
71                                          /* call the assigned list */
72          glCallList(ot->listid);
73  
# Line 197 | Line 195 | FVECT  cent;
195   }
196  
197  
198 + int
199   loadoct(fname)                          /* read in objects from octree */
200   char  *fname;
201   {
# Line 286 | Line 285 | ogetflt()                      /* get a floating point number */
285   }
286          
287  
288 < static
288 > static void
289   skiptree()                              /* skip octree on input */
290   {
291          register int  i;
# Line 311 | Line 310 | skiptree()                             /* skip octree on input */
310   }
311  
312  
313 < static
313 > static int
314   loadobj()                               /* get next object */
315   {
316          static OBJREC    ob;
# Line 384 | Line 383 | memerr:
383   }
384  
385  
386 < static
386 > static void
387   octerror(etyp, msg)                     /* octree error */
388   int  etyp;
389   char  *msg;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines