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.1 by gwlarson, Tue Jun 9 11:18:35 1998 UTC vs.
Revision 3.4 by gwlarson, Wed Sep 2 18:42:11 1998 UTC

# Line 11 | Line 11 | static char SCCSid[] = "$SunId$ SGI";
11   #include "radogl.h"
12   #include "octree.h"
13  
14 + #define MAXLEVEL        16              /* maximum instance hierarchy level */
15 +
16   typedef struct {
17          int     listid;                         /* our list id */
18          short   localmatl;                      /* uses local material only */
# Line 33 | Line 35 | static FILE  *infp;                    /* input file stream */
35   static int  objsize;                    /* size of stored OBJECT's */
36   static short  otypmap[NUMOTYPE+8];      /* object type map */
37  
38 < static long     imhash(mod) char *mod; {return((long)mod);}
38 > static unsigned long    imhash(mod) char *mod; {return((unsigned long)mod);}
39   static LUTAB    imtab = {imhash,NULL,NULL,NULL,0,NULL,0};
40  
41   static LUTAB    ottab = LU_SINIT(free,free);
# Line 72 | Line 74 | register OBJREC        *o;
74          glCallList(ot->listid);
75  
76          if (o->oargs.nsargs > 1) {      /* end transform */
77 +                glMatrixMode(GL_MODELVIEW);
78                  glPopMatrix();
79                  glPopAttrib();
80          }
# Line 101 | Line 104 | LUENT  *lp;
104   int
105   loadoctrees()                           /* load octrees we've saved up */
106   {
107 +        int     levelsleft = MAXLEVEL;
108          int     nocts = 0;
109          LUTAB   looptab;
110                                  /* loop through new octree references */
111          while (ottab.tsiz) {
112 +                if (!levelsleft--)
113 +                        error(USER, "too many octree levels -- instance loop?");
114                  copystruct(&looptab, &ottab);
115                  ottab.tsiz = 0;
116                  nocts += lu_doall(&looptab, buildoctlist);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines