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.7 by greg, Wed Apr 23 02:28:06 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 79 | Line 77 | register OBJREC        *o;
77                  glPopAttrib();
78          }
79          rgl_checkerr("creating instance");
80 +        return(0);
81   }
82  
83  
# Line 197 | Line 196 | FVECT  cent;
196   }
197  
198  
199 + int
200   loadoct(fname)                          /* read in objects from octree */
201   char  *fname;
202   {
# Line 286 | Line 286 | ogetflt()                      /* get a floating point number */
286   }
287          
288  
289 < static
289 > static void
290   skiptree()                              /* skip octree on input */
291   {
292          register int  i;
# Line 311 | Line 311 | skiptree()                             /* skip octree on input */
311   }
312  
313  
314 < static
314 > static int
315   loadobj()                               /* get next object */
316   {
317          static OBJREC    ob;
# Line 384 | Line 384 | memerr:
384   }
385  
386  
387 < static
387 > static void
388   octerror(etyp, msg)                     /* octree error */
389   int  etyp;
390   char  *msg;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines