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

Comparing ray/src/hd/rhpict.c (file contents):
Revision 3.1 by gwlarson, Thu Mar 4 10:30:04 1999 UTC vs.
Revision 3.2 by gwlarson, Fri Mar 5 17:02:41 1999 UTC

# Line 24 | Line 24 | double expval = 1.;            /* exposure value */
24  
25   COLOR   *mypixel;               /* pixels being rendered */
26   float   *myweight;              /* weights (used to compute final pixels) */
27 + float   *mydepth;               /* depth values (visibility culling) */
28   int     hres, vres;             /* current horizontal and vertical res. */
29  
30   extern int      nowarn;         /* turn warnings off? */
# Line 156 | Line 157 | render_frame(bl, nb)           /* render frame from beam values
157   register PACKHEAD       *bl;
158   int     nb;
159   {
160 <        extern int      render_beam();
160 >        extern int      pixBeam();
161          register HDBEAMI        *bil;
162          register int    i;
163  
# Line 167 | Line 168 | int    nb;
168                  bil[i].h = hdlist[bl[i].hd];
169                  bil[i].b = bl[i].bi;
170          }
171 <        hdloadbeams(bil, nb, render_beam);
171 >        hdloadbeams(bil, nb, pixBeam);
172 >        pixFlush();
173          free((char *)bil);
174   }
175  
# Line 209 | Line 211 | int    fn;
211                                  /* prepare image buffers */
212          bzero((char *)mypixel, hres*vres*sizeof(COLOR));
213          bzero((char *)myweight, hres*vres*sizeof(float));
214 +        bzero((char *)mydepth, hres*vres*sizeof(float));
215   }
216  
217  
# Line 269 | Line 272 | initialize()                   /* initialize holodeck and buffers */
272                                          /* allocate picture buffer */
273          mypixel = (COLOR *)bmalloc(xres*yres*sizeof(COLOR));
274          myweight = (float *)bmalloc(xres*yres*sizeof(float));
275 <        if (mypixel == NULL | myweight == NULL)
275 >        mydepth = (float *)bmalloc(xres*yres*sizeof(float));
276 >        if (mypixel == NULL | myweight == NULL | mydepth == NULL)
277                  error(SYSTEM, "out of memory in initialize");
278   }
279  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines