--- ray/src/hd/rhd_odraw.c 2004/01/01 11:21:55 3.16 +++ ray/src/hd/rhd_odraw.c 2011/05/20 02:06:39 3.18 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rhd_odraw.c,v 3.16 2004/01/01 11:21:55 schorsch Exp $"; +static const char RCSid[] = "$Id: rhd_odraw.c,v 3.18 2011/05/20 02:06:39 greg Exp $"; #endif /* * Routines for drawing samples using depth buffer checks. @@ -47,7 +47,7 @@ static int needmapping; /* what needs doing with tone #define SAMP32 (32*(2*sizeof(short)+sizeof(union ODfunion)+sizeof(TMbright)+\ - 6*sizeof(BYTE))+sizeof(int32)) + 6*sizeof(uby8))+sizeof(int32)) static int sampcmp(const void *s0, const void *s1); static int odAllocBlockSamp(int vn, int hh, int vh, double prox); @@ -102,8 +102,8 @@ odInit( /* initialize drawing routines */ odS.redraw = (int32 *)(odS.f + n); odS.ip = (short (*)[2])(odS.redraw + n/32); odS.brt = (TMbright *)(odS.ip + n); - odS.chr = (BYTE (*)[3])(odS.brt + n); - odS.rgb = (BYTE (*)[3])(odS.chr + n); + odS.chr = (uby8 (*)[3])(odS.brt + n); + odS.rgb = (uby8 (*)[3])(odS.chr + n); odS.nsamp = n; } if (!n) @@ -316,11 +316,12 @@ odSample( /* add a sample value */ if (id < 0) continue; /* not good enough */ /* convert color */ - tmCvColrs(&odS.brt[id], odS.chr[id], (COLR *)c, 1); + tmCvColrs(tmGlobal, &odS.brt[id], odS.chr[id], (COLR *)c, 1); if (imm_mode | needmapping) /* if immediate mode */ needmapping |= NEWRGB; /* map it later */ else /* else map it now */ - tmMapPixels(odS.rgb[id], &odS.brt[id], odS.chr[id], 1); + tmMapPixels(tmGlobal, odS.rgb[id], &odS.brt[id], + odS.chr[id], 1); SET4(odS.redraw, id); /* mark for redraw */ odView[i].n2redraw++; } @@ -484,17 +485,17 @@ odUpdate( /* update this view */ if (needmapping & NEWRGB) { if (needmapping & NEWMAP) { if (needmapping & NEWHIST) - tmClearHisto(); + tmClearHisto(tmGlobal); needmapping &= ~NEWHIST; - if (tmAddHisto(odS.brt,odS.nsamp,1) != TM_E_OK) + if (tmAddHisto(tmGlobal, odS.brt,odS.nsamp,1) != TM_E_OK) return; - if (tmComputeMapping(0.,0.,0.) != TM_E_OK) + if (tmComputeMapping(tmGlobal, 0.,0.,0.) != TM_E_OK) return; needmapping &= ~NEWMAP; odRedrawAll(); /* redraw everything */ } - if (tmMapPixels((BYTE *)(odS.rgb), odS.brt, - (BYTE *)(odS.chr), odS.nsamp) != TM_E_OK) + if (tmMapPixels(tmGlobal, (uby8 *)(odS.rgb), odS.brt, + (uby8 *)(odS.chr), odS.nsamp) != TM_E_OK) return; needmapping &= ~NEWRGB; }