--- ray/src/rt/raypwin.c 2008/02/11 21:17:25 2.3 +++ ray/src/rt/raypwin.c 2008/04/17 18:48:09 2.5 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: raypwin.c,v 2.3 2008/02/11 21:17:25 greg Exp $"; +static const char RCSid[] = "$Id: raypwin.c,v 2.5 2008/04/17 18:48:09 greg Exp $"; #endif /* * raypwin.c - interface for parallel rendering using Radiance (Windows ver) @@ -55,7 +55,13 @@ ray_pqueue( /* queue a ray for computation */ { if (r == NULL) return(0); - ray_value(r); + if (ray_pnidle <= 0) { + RAY new_ray = *r; + *r = queued_ray; + queued_ray = new_ray; + } + samplendx++; + rayvalue(r); return(1); } @@ -69,8 +75,9 @@ ray_presult( /* check for a completed ray */ if (r == NULL) return(0); if (ray_pnidle <= 0) { - ray_value(&queued_ray); *r = queued_ray; + samplendx++; + rayvalue(r); ray_pnidle = 1; return(1); }