| 217 |
|
return -1; |
| 218 |
|
|
| 219 |
|
if (castonly && !cookedCall) |
| 220 |
< |
error(CONSISTENCY, "EnqueueBundle() called in castonly mode without cookedCall"); |
| 220 |
> |
error(INTERNAL, "EnqueueBundle() called in castonly mode without cookedCall"); |
| 221 |
|
|
| 222 |
|
if (!UpdateMode()) // update rendering mode if requested |
| 223 |
|
return -1; |
| 224 |
|
|
| 225 |
+ |
if (rID0 && curFlags&RTdoFIFO) |
| 226 |
+ |
error(INTERNAL, "Ray number assignment unsupported with FIFO"); |
| 227 |
+ |
|
| 228 |
|
while (n-- > 0) { // queue each ray |
| 229 |
|
VCOPY(res.rorg, orig_direc[0]); |
| 230 |
|
VCOPY(res.rdir, orig_direc[1]); |
| 231 |
|
orig_direc += 2; |
| 232 |
|
rayorigin(&res, PRIMARY, NULL, NULL); |
| 233 |
< |
if (rID0) res.rno = rID0++; |
| 231 |
< |
else res.rno = ++lastRayID; |
| 233 |
> |
res.rno = rID0 ? (lastRayID = rID0++) : ++lastRayID; |
| 234 |
|
if (curFlags & RTimmIrrad) |
| 235 |
|
res.revf = rayirrad; |
| 236 |
|
else if (castonly) |
| 237 |
|
res.revf = raycast; |
| 238 |
|
double d = normalize(res.rdir); |
| 239 |
|
bool sendRes = (cookedCall != NULL); |
| 240 |
< |
if (d > 0) { // direction vector is valid? |
| 240 |
> |
if (d > .0) { // direction vector is valid? |
| 241 |
|
if (curFlags & RTlimDist) |
| 242 |
|
res.rmax = d; |
| 243 |
|
if (((curFlags&RTdoFIFO) != 0) & (ray_pnprocs > 0)) { |