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.3 by gwlarson, Wed Jul 15 17:52:16 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 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