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

Comparing ray/src/util/glrad.c (file contents):
Revision 3.26 by greg, Thu Apr 28 16:28:20 2016 UTC vs.
Revision 3.29 by greg, Tue Jun 3 21:31:51 2025 UTC

# Line 70 | Line 70 | VIEW   thisview = STDVIEW;             /* displayed view */
70   double  eyedist = 1;                    /* interocular distance */
71   VIEW    lastview;                       /* last recorded view */
72  
73 char    *progname;                      /* global argv[0] */
73   char    *radfile;                       /* rad input file */
74   char    *scene[MAXSCENE+1];             /* material and scene file list */
75   int     nscenef = 0;                    /* number of scene files */
76   char    *octree;                        /* octree name (NULL if unnec.) */
77  
78 < SUBPROC rtpd;                   /* rtrace process descriptors */
78 > SUBPROC rtpd = SP_INACTIVE;             /* rtrace process descriptors */
79  
80   int     silent = 0;                     /* run rad silently? */
81   int     backvis = 1;                    /* back faces visible? */
# Line 129 | Line 128 | main(
128          char    *viewsel = NULL;
129          long    vwintvl = 0;
130          int     i;
131 <
132 <        progname = argv[0];
131 >                                        /* set global progname */
132 >        fixargv0(argv[0]);
133          for (i = 1; i < argc && argv[i][0] == '-'; i++)
134                  switch (argv[i][1]) {
135                  case 'v':
# Line 211 | Line 210 | quit(                          /* exit gracefully */
210          if (ourdisplay != NULL)
211                  dev_close();
212          /* if (rtpd.pid > 0) { */
213 <        if (rtpd.running) {
213 >        if (rtpd.flags & PF_RUNNING) {
214                  if (close_process(&rtpd) > 0)
215                          wputs("bad exit status from rtrace\n");
216                  /* rtpd.pid = 0; */
# Line 741 | Line 740 | getintersect(          /* intersect ray with scene geometry */
740          float   fbuf[6];
741                                  /* check to see if rtrace is running */
742          /* if (rtpd.pid <= 0) */
743 <        if (!rtpd.running)
743 >        if (!(rtpd.flags & PF_RUNNING))
744                  return(0);
745                                  /* assign origin */
746          fbuf[0] = org[0]; fbuf[1] = org[1]; fbuf[2] = org[2];
# Line 749 | Line 748 | getintersect(          /* intersect ray with scene geometry */
748          if (md <= FTINY) md = FHUGE;
749          fbuf[3] = dir[0]*md; fbuf[4] = dir[1]*md; fbuf[5] = dir[2]*md;
750                                  /* trace that ray */
751 <        if (process(&rtpd, (char *)fbuf, (char *)fbuf,
751 >        if (process(&rtpd, fbuf, fbuf,
752                          4*sizeof(float), 6*sizeof(float)) != 4*sizeof(float))
753                  error(INTERNAL, "error getting data back from rtrace process");
754          if (fbuf[3] >= .99*FHUGE)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines