| 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? */ |
| 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 |
|
|
| 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 |
|
|
| 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 |
|
|
| 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 |
|
|