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

Comparing ray/src/hd/rhd_odraw.c (file contents):
Revision 3.16 by schorsch, Thu Jan 1 11:21:55 2004 UTC vs.
Revision 3.18 by greg, Fri May 20 02:06:39 2011 UTC

# Line 47 | Line 47 | static int     needmapping;    /* what needs doing with tone
47  
48  
49   #define SAMP32  (32*(2*sizeof(short)+sizeof(union ODfunion)+sizeof(TMbright)+\
50 <                        6*sizeof(BYTE))+sizeof(int32))
50 >                        6*sizeof(uby8))+sizeof(int32))
51  
52   static int sampcmp(const void *s0, const void *s1);
53   static int odAllocBlockSamp(int vn, int hh, int vh, double prox);
# Line 102 | Line 102 | odInit(                                /* initialize drawing routines */
102                  odS.redraw = (int32 *)(odS.f + n);
103                  odS.ip = (short (*)[2])(odS.redraw + n/32);
104                  odS.brt = (TMbright *)(odS.ip + n);
105 <                odS.chr = (BYTE (*)[3])(odS.brt + n);
106 <                odS.rgb = (BYTE (*)[3])(odS.chr + n);
105 >                odS.chr = (uby8 (*)[3])(odS.brt + n);
106 >                odS.rgb = (uby8 (*)[3])(odS.chr + n);
107                  odS.nsamp = n;
108          }
109          if (!n)
# Line 316 | Line 316 | odSample(                      /* add a sample value */
316                  if (id < 0)
317                          continue;               /* not good enough */
318                                                          /* convert color */
319 <                tmCvColrs(&odS.brt[id], odS.chr[id], (COLR *)c, 1);
319 >                tmCvColrs(tmGlobal, &odS.brt[id], odS.chr[id], (COLR *)c, 1);
320                  if (imm_mode | needmapping)             /* if immediate mode */
321                          needmapping |= NEWRGB;          /* map it later */
322                  else                                    /* else map it now */
323 <                        tmMapPixels(odS.rgb[id], &odS.brt[id], odS.chr[id], 1);
323 >                        tmMapPixels(tmGlobal, odS.rgb[id], &odS.brt[id],
324 >                                        odS.chr[id], 1);
325                  SET4(odS.redraw, id);                   /* mark for redraw */
326                  odView[i].n2redraw++;
327          }
# Line 484 | Line 485 | odUpdate(                              /* update this view */
485          if (needmapping & NEWRGB) {
486                  if (needmapping & NEWMAP) {
487                          if (needmapping & NEWHIST)
488 <                                tmClearHisto();
488 >                                tmClearHisto(tmGlobal);
489                          needmapping &= ~NEWHIST;
490 <                        if (tmAddHisto(odS.brt,odS.nsamp,1) != TM_E_OK)
490 >                        if (tmAddHisto(tmGlobal, odS.brt,odS.nsamp,1) != TM_E_OK)
491                                  return;
492 <                        if (tmComputeMapping(0.,0.,0.) != TM_E_OK)
492 >                        if (tmComputeMapping(tmGlobal, 0.,0.,0.) != TM_E_OK)
493                                  return;
494                          needmapping &= ~NEWMAP;
495                          odRedrawAll();                  /* redraw everything */
496                  }
497 <                if (tmMapPixels((BYTE *)(odS.rgb), odS.brt,
498 <                                (BYTE *)(odS.chr), odS.nsamp) != TM_E_OK)
497 >                if (tmMapPixels(tmGlobal, (uby8 *)(odS.rgb), odS.brt,
498 >                                (uby8 *)(odS.chr), odS.nsamp) != TM_E_OK)
499                          return;
500                  needmapping &= ~NEWRGB;
501          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines