Back to index

radiance  4R0+20100331
Classes | Defines | Functions | Variables
rhd_odraw.h File Reference
#include "color.h"
#include "tonemap.h"
#include "rhdriver.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ODview
struct  ODview::ODblock
struct  ODsamp
union  ODsamp::ODfunion

Defines

#define FL4OP(f, i, op)   ((f)[(i)>>5] op (1L<<((i)&0x1f)))
#define CHK4(f, i)   FL4OP(f,i,&)
#define SET4(f, i)   FL4OP(f,i,|=)
#define CLR4(f, i)   FL4OP(f,i,&=~)
#define TGL4(f, i)   FL4OP(f,i,^=)
#define FL4NELS(n)   (((n)+0x1f)>>5)
#define CLR4ALL(f, n)   memset((char *)(f),'\0',FL4NELS(n)*sizeof(int32))
#define OMAXDEPTH   32000 /* maximum depth value */
#define nextfree(i)   f[i].next /* free pointers */
#define closeness(i)   f[i].prox /* viewpoint proximity */
#define ENDFREE   (-1) /* free list terminator */
#define odClean()   odInit(odS.nsamp) /* clear samples */
#define odDone()   odInit(0) /* free samples */

Functions

void gmNewGeom (char *file)
void gmEndGeom (void)
int gmDrawGeom (void)
void gmDrawPortals (int r, int g, int b, int a)
void gmDepthLimit (double dl[2], FVECT vorg, FVECT vdir)
void gmNewPortal (char *pflist)
int gmEndPortal (void)
int odInit (int n)
void odSample (COLR c, FVECT d, FVECT p)
void odRemap (int newhist)
void odRedrawAll (void)
void odRedraw (int vn, int hmin, int vmin, int hmax, int vmax)
void odDepthMap (int vn, GLfloat *dm)
void odUpdate (int vn)

Variables

struct ODviewodView
int odNViews
TMstructtmGlobal
struct ODsamp odS

Class Documentation

struct ODview

Definition at line 18 of file rhd_odraw.h.

Collaboration diagram for ODview:
Class Members
struct ODblock * bmap
GLfloat * dmap
int32 * emap
short hhi
short hlow
int n2redraw
int32 * pmap
int sfirst
int snext
short vhi
short vlow
struct ODview::ODblock

Definition at line 23 of file rhd_odraw.h.

Class Members
int first
int free
short nsamp
short nused
float pthresh
struct ODsamp

Definition at line 39 of file rhd_odraw.h.

Collaboration diagram for ODsamp:
Class Members
char * base
TMbright * brt
BYTE(* chr
union ODfunion * f
short(* ip
int nsamp
int32 * redraw
BYTE(* rgb
union ODsamp::ODfunion

Definition at line 40 of file rhd_odraw.h.

Class Members
int32 next
float prox

Define Documentation

#define CHK4 (   f,
  i 
)    FL4OP(f,i,&)

Definition at line 56 of file rhd_odraw.h.

#define closeness (   i)    f[i].prox /* viewpoint proximity */

Definition at line 67 of file rhd_odraw.h.

#define CLR4 (   f,
  i 
)    FL4OP(f,i,&=~)

Definition at line 58 of file rhd_odraw.h.

#define CLR4ALL (   f,
  n 
)    memset((char *)(f),'\0',FL4NELS(n)*sizeof(int32))

Definition at line 61 of file rhd_odraw.h.

#define ENDFREE   (-1) /* free list terminator */

Definition at line 68 of file rhd_odraw.h.

#define FL4NELS (   n)    (((n)+0x1f)>>5)

Definition at line 60 of file rhd_odraw.h.

#define FL4OP (   f,
  i,
  op 
)    ((f)[(i)>>5] op (1L<<((i)&0x1f)))

Definition at line 55 of file rhd_odraw.h.

#define nextfree (   i)    f[i].next /* free pointers */

Definition at line 66 of file rhd_odraw.h.

#define odClean ( )    odInit(odS.nsamp) /* clear samples */

Definition at line 70 of file rhd_odraw.h.

#define odDone ( )    odInit(0) /* free samples */

Definition at line 71 of file rhd_odraw.h.

#define OMAXDEPTH   32000 /* maximum depth value */

Definition at line 64 of file rhd_odraw.h.

#define SET4 (   f,
  i 
)    FL4OP(f,i,|=)

Definition at line 57 of file rhd_odraw.h.

#define TGL4 (   f,
  i 
)    FL4OP(f,i,^=)

Definition at line 59 of file rhd_odraw.h.


Function Documentation

void gmDepthLimit ( double  dl[2],
FVECT  vorg,
FVECT  vdir 
)

Definition at line 134 of file rhd_geom.c.

{
       FVECT  v;
       double dcent;
       register int  i;

       dl[0] = FHUGE; dl[1] = 0.;
       FORALLGEOM(gmCurrent, i) {
              VSUB(v, gmCurrent[i].cent, vorg);
              dcent = DOT(v, vdir);
              if (dl[0] > dcent-gmCurrent[i].rad)
                     dl[0] = dcent-gmCurrent[i].rad;
              if (dl[1] < dcent+gmCurrent[i].rad)
                     dl[1] = dcent+gmCurrent[i].rad;
       }
       if (dl[0] < 0.)
              dl[0] = 0.;
}

Here is the caller graph for this function:

int gmDrawGeom ( void  )

Definition at line 97 of file rhd_geom.c.

{
       register int  n;

       FORALLGEOM(gmCurrent, n)
              glCallList(gmCurrent[n].listid);
       return(n);
}

Here is the caller graph for this function:

void gmDrawPortals ( int  r,
int  g,
int  b,
int  a 
)

Definition at line 108 of file rhd_geom.c.

{
       if (!gmPortals || (r<0) & (g<0) & (b<0) & (a<0))
              return;
       glPushAttrib(GL_DEPTH_BUFFER_BIT|GL_COLOR_BUFFER_BIT|
                     GL_POLYGON_BIT|GL_LIGHTING_BIT);
       glDisable(GL_LIGHTING);
       glDisable(GL_DITHER);
       glShadeModel(GL_FLAT);
       glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
                                   /* don't actually write depth */
       glDepthMask(GL_FALSE);
                                   /* draw only selected channels */
       glColorMask(r>=0, g>=0, b>=0, a>=0);
       glColor4ub(r&0xff, g&0xff, b&0xff, a&0xff);
       glCallList(gmPortals);             /* draw them portals */
       glPopAttrib();
}

Here is the caller graph for this function:

void gmEndGeom ( void  )

Definition at line 77 of file rhd_geom.c.

{
       register int  i, j;

       FORALLGEOM(gmCurrent, i) {
              FORALLGEOM(gmNext, j)
                     if (gmNext[j].listid == gmCurrent[i].listid)
                            break;
              if (j >= MAXGEO || gmNext[j].gfile == NULL) {
                     glDeleteLists(gmCurrent[i].listid, /* not found */
                                   gmCurrent[i].nlists);
                     freestr(gmCurrent[i].gfile);
              }
       }
       memcpy((void *)gmCurrent, (void *)gmNext, sizeof(gmNext));
       memset((void *)gmNext, '\0', sizeof(gmNext));
}

Here is the call graph for this function:

Here is the caller graph for this function:

int gmEndPortal ( void  )

Definition at line 191 of file rhd_geom.c.

{
       register int  n;

       FORALLPORT(newportlist, n);
       if (!n) {                   /* free old GL list */
              if (gmPortals)
                     glDeleteLists(gmPortals, Nlists);
              gmPortals = 0;
       } else
              qsort(newportlist, n, sizeof(char *), sstrcmp);
       FORALLPORT(newportlist, n)         /* compare sorted lists */
              if (curportlist[n] == NULL ||
                            strcmp(curportlist[n],newportlist[n])) {
                                          /* load new list */
                     if (gmPortals)
                            glDeleteLists(gmPortals, 1);
                     FORALLPORT(newportlist, n);
                     dolights = 0;
                     domats = 0;
                     gmPortals = rgl_filelist(n, newportlist, &Nlists);
                     break;
              }
       FORALLPORT(curportlist, n)         /* free old file list */
              freestr(curportlist[n]);
       memcpy((void *)curportlist, (void *)newportlist, sizeof(newportlist));
       memset((void *)newportlist, '\0', sizeof(newportlist));
       return(gmPortals);                 /* return GL list id */
}

Here is the call graph for this function:

Here is the caller graph for this function:

void gmNewGeom ( char *  file)

Definition at line 43 of file rhd_geom.c.

{
       register int  i, j;
                                   /* check if already in next list */
       FORALLGEOM(gmNext, i)
              if (!strcmp(file, gmNext[i].gfile))
                     return;
       if (i >= MAXGEO) {
              error(WARNING, "too many section octrees -- ignoring extra");
              return;
       }
                                   /* check if copy in current list */
       FORALLGEOM(gmCurrent, j)
              if (!strcmp(file, gmCurrent[j].gfile)) {
                     gmNext[i] = gmCurrent[j];
                     return;
              }
                                   /* else load new octree */
       gmNext[i].gfile = savestr(file);
       dolights = 0;
       domats = 1;
       gmNext[i].listid = rgl_octlist(file, gmNext[i].cent, &gmNext[i].rad,
                                   &gmNext[i].nlists);
       gmNext[i].rad *= 1.732;            /* go to corners */
#ifdef DEBUG
       fprintf(stderr, "Loaded octree \"%s\" into listID %d with radius %f\n",
                     file, gmNext[i].listid, gmNext[i].rad);
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:

void gmNewPortal ( char *  pflist)

Definition at line 159 of file rhd_geom.c.

{
       register int  i;
       char   newfile[128];

       if (pflist == NULL)
              return;
       while ((pflist = nextword(newfile, sizeof(newfile), pflist)) != NULL) {
              FORALLPORT(newportlist,i)
                     if (!strcmp(newportlist[i], newfile))
                            goto endloop; /* in list already */
              if (i >= MAXPORT) {
                     error(WARNING, "too many portals -- ignoring extra");
                     return;
              }
              newportlist[i] = savestr(newfile);
       endloop:;
       }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void odDepthMap ( int  vn,
GLfloat *  dm 
)

Definition at line 399 of file rhd_odraw.c.

{
       double d0, d1;
       int    i, j, hmin, hmax, vmin, vmax;
       register int  k, l;

       if (dm == NULL) {                  /* free edge map */
              if ((vn<0) | (vn>=odNViews))
                     return;                     /* too late -- they're gone! */
              if (odView[vn].emap != NULL)
                     free((void *)odView[vn].emap);
              odView[vn].emap = NULL;
              odView[vn].dmap = NULL;
              return;
       }
       DCHECK(vn<0 | vn>=odNViews, CONSISTENCY,
                     "bad view number in odDepthMap");
       odView[vn].dmap = dm;                     /* initialize edge map */
       if (odView[vn].emap == NULL) {
              odView[vn].emap = (int32 *)malloc(
                     FL4NELS(odView[vn].hlow*odView[vn].vlow)*sizeof(int32));
              if (odView[vn].emap == NULL)
                     error(SYSTEM, "out of memory in odDepthMap");
       }
       CLR4ALL(odView[vn].emap, odView[vn].hlow*odView[vn].vlow);
                                          /* compute edge map */
       vmin = odView[vn].vhi;                    /* enter loopsville */
       for (j = odView[vn].vlow; j--; ) {
              vmax = vmin;
              vmin = j*odView[vn].vhi/odView[vn].vlow;
              hmin = odView[vn].hhi;
              for (i = odView[vn].hlow; i--; ) {
                     hmax = hmin;
                     hmin = i*odView[vn].hhi/odView[vn].hlow;
                     for (l = vmin; l < vmax; l++) {    /* vertical edges */
                            d1 = dm[l*odView[vn].hhi+hmin];
                            for (k = hmin+1; k < hmax; k++) {
                                   d0 = d1;
                                   d1 = dm[l*odView[vn].hhi+k];
                                   if (d0 > (1.+DEPTHEPS)*d1 ||
                                          (1.+DEPTHEPS)*d0 < d1) {
                                          SET4(odView[vn].emap,
                                                 j*odView[vn].hlow + i);
                                          break;
                                   }
                            }
                            if (k < hmax)
                                   break;
                     }
                     if (l < vmax)
                            continue;
                     for (k = hmin; k < hmax; k++) {    /* horizontal edges */
                            d1 = dm[vmin*odView[vn].hhi+k];
                            for (l = vmin+1; l < vmax; l++) {
                                   d0 = d1;
                                   d1 = dm[l*odView[vn].hhi+k];
                                   if (d0 > (1.+DEPTHEPS)*d1 ||
                                          (1.+DEPTHEPS)*d0 < d1) {
                                          SET4(odView[vn].emap,
                                                 j*odView[vn].hlow + i);
                                          break;
                                   }
                            }
                            if (l < vmax)
                                   break;
                     }
              }
       }
}

Here is the call graph for this function:

Here is the caller graph for this function:

int odInit ( int  n)

Definition at line 64 of file rhd_odraw.c.

{
       int    nbytes, i, j, k, nextsamp, count, blockdiv;
       int    res[2];

       if (odNViews > 0) {         /* deallocate view structures */
              for (i = odNViews; i--; ) {
                     free((void *)odView[i].bmap);
                     free((void *)odView[i].pmap);
                     if (odView[i].emap != NULL)
                            free((void *)odView[i].emap);
              }
              free((void *)odView);
              odView = NULL;
              odNViews = 0;
       }
       if (n && n != odS.nsamp) {
                            /* round space up to nearest power of 2 */
              nbytes = (n+31)/32 * SAMP32;
              for (i = 1024; nbytes > i-8; i <<= 1)
                     ;
              n = (i-8)/SAMP32 * 32;
              needmapping = NEWHIST;
       }
       if (n != odS.nsamp) {       /* (re)allocate sample array */
              if (odS.nsamp)
                     free(odS.base);
              odS.nsamp = 0;
              if (!n)
                     return(0);
              nbytes = (n+31)/32 * SAMP32;
              odS.base = (char *)malloc(nbytes);
              if (odS.base == NULL)
                     return(0);
                            /* assign larger alignment types earlier */
              odS.f = (union ODfunion *)odS.base;
              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.nsamp = n;
       }
       if (!n)
              return(0);
                            /* allocate view information */
       count = 0;                  /* count pixels */
       for (i = 0; dev_auxview(i, res) != NULL; i++)
              count += res[0]*res[1];
       odView = (struct ODview *)malloc(i*sizeof(struct ODview));
       if (odView == NULL)
              return(0);
       odNViews = i;
       blockdiv = sqrt(count/(n/SAMPSPERBLOCK)) + 0.5;
       if (blockdiv < 8) blockdiv = 8;
       nextsamp = 0; count /= blockdiv*blockdiv; /* # blocks */
       while (i--) {               /* initialize each view */
              dev_auxview(i, res);
              odView[i].hhi = res[0];
              odView[i].hlow = (res[0] + blockdiv/2) / blockdiv;
              if (odView[i].hlow < 1) odView[i].hlow = 1;
              odView[i].vhi = res[1];
              odView[i].vlow = (res[1] + blockdiv/2) / blockdiv;
              if (odView[i].vlow < 1) odView[i].vlow = 1;
              odView[i].emap = NULL;
              odView[i].dmap = NULL;
              odView[i].pmap = (int32 *)calloc(FL4NELS(res[0]*res[1]),
                            sizeof(int32));
              if (odView[i].pmap == NULL)
                     return(0);
              j = odView[i].hlow*odView[i].vlow;
              odView[i].bmap = (struct ODblock *)malloc(
                            j * sizeof(struct ODblock));
              if (odView[i].bmap == NULL)
                     return(0);
              DCHECK(count<=0 | nextsamp>=n,
                            CONSISTENCY, "counter botch in odInit");
              if (!i) count = j;
              odView[i].sfirst = nextsamp;
              while (j--) {        /* initialize blocks & free lists */
                     odView[i].bmap[j].pthresh = FHUGE;
                     odView[i].bmap[j].first = k = nextsamp;
                     nextsamp += odView[i].bmap[j].nsamp = 
                            (n - nextsamp)/count--;
                     odView[i].bmap[j].free = k;
                     while (++k < nextsamp)
                            odS.nextfree(k-1) = k;
                     odS.nextfree(k-1) = ENDFREE;
                     odView[i].bmap[j].nused = 0;
              }
              odView[i].snext = nextsamp;
              odView[i].n2redraw = 0;
       }
       CLR4ALL(odS.redraw, odS.nsamp);           /* clear redraw flags */
       for (i = odS.nsamp; i--; ) {              /* clear values */
              odS.ip[i][0] = odS.ip[i][1] = -1;
              odS.brt[i] = TM_NOBRT;
       }
       needmapping |= NEWMAP;                    /* compute new map on update */
       return(odS.nsamp);                 /* return number of samples */
}

Here is the call graph for this function:

Here is the caller graph for this function:

void odRedraw ( int  vn,
int  hmin,
int  vmin,
int  hmax,
int  vmax 
)

Definition at line 359 of file rhd_odraw.c.

{
       int    i, j;
       register struct ODblock     *bp;
       register int  k;

       if ((vn<0) | (vn>=odNViews))
              return;
                            /* check view limits */
       if (hmin < 0) hmin = 0;
       if (hmax >= odView[vn].hhi) hmax = odView[vn].hhi-1;
       if (vmin < 0) vmin = 0;
       if (vmax >= odView[vn].vhi) vmax = odView[vn].vhi-1;
       if ((hmax <= hmin) | (vmax <= vmin))
              return;
                            /* convert to low resolution */
       hmin = hmin * odView[vn].hlow / odView[vn].hhi;
       hmax = hmax * odView[vn].hlow / odView[vn].hhi;
       vmin = vmin * odView[vn].vlow / odView[vn].vhi;
       vmax = vmax * odView[vn].vlow / odView[vn].vhi;
                            /* mark block samples for redraw, inclusive */
       for (i = hmin; i <= hmax; i++)
              for (j = vmin; j <= vmax; j++) {
                     bp = odView[vn].bmap + j*odView[vn].hlow + i;
                     for (k = bp->nsamp; k--; )
                            if (odS.ip[bp->first+k][0] >= 0) {
                                   SET4(odS.redraw, bp->first+k);
                                   odView[vn].n2redraw++;
                            }
              }
}

Here is the caller graph for this function:

void odRedrawAll ( void  )

Definition at line 343 of file rhd_odraw.c.

{
       register int  i;

       if ((needmapping&(NEWMAP|NEWRGB)) == (NEWMAP|NEWRGB))
              return;                     /* will be called later, anyway */
       for (i = odS.nsamp; i--; )
              if (odS.ip[i][0] >= 0)
                     SET4(odS.redraw, i);
                                   /* not right, but not important */
       for (i = 0; i < odNViews; i++)
              odView[i].n2redraw = odView[i].snext - odView[i].sfirst;
}

Here is the caller graph for this function:

void odRemap ( int  newhist)

Definition at line 332 of file rhd_odraw.c.

{
       needmapping |= NEWMAP|NEWRGB;
       if (newhist)
              needmapping |= NEWHIST;
}

Here is the caller graph for this function:

void odSample ( COLR  c,
FVECT  d,
FVECT  p 
)

Definition at line 265 of file rhd_odraw.c.

{
       FVECT  disp;
       double d0, d1, h, v, prox;
       register VIEW *vw;
       int    hh, vh;
       int    res[2];
       register int  i, id;

       DCHECK(odS.nsamp<=0, CONSISTENCY, "no samples allocated in odSample");
                                          /* add value to each view */
       for (i = 0; (vw = dev_auxview(i, res)) != NULL; i++) {
              DCHECK(i>=odNViews, CONSISTENCY, "too many views in odSample");
              CHECK(vw->type!=VT_PER, INTERNAL,
                            "cannot handle non-perspective views");
              if (p != NULL) {            /* compute view position */
                     VSUB(disp, p, vw->vp);
                     d0 = DOT(disp, vw->vdir);
                     if (d0 <= vw->vfore+FTINY)
                            continue;            /* too close */
              } else {
                     VCOPY(disp, d);
                     d0 = DOT(disp, vw->vdir);
                     if (d0 <= FTINY)            /* behind view */
                            continue;
              }
              h = DOT(disp,vw->hvec)/(d0*vw->hn2) + 0.5 - vw->hoff;
              if (h < 0. || h >= 1.)
                     continue;                   /* left or right */
              v = DOT(disp,vw->vvec)/(d0*vw->vn2) + 0.5 - vw->voff;
              if (v < 0. || v >= 1.)
                     continue;                   /* above or below */
              hh = h * res[0];
              vh = v * res[1];
              if (odView[i].dmap != NULL) {             /* check depth */
                     d1 = odView[i].dmap[vh*res[0] + hh];
                     if (d1 < 0.99*FHUGE && (d0 > (1.+DEPTHEPS)*d1 ||
                                          (1.+DEPTHEPS)*d0 < d1))
                     continue;                   /* occlusion error */
              }
              if (p != NULL) {            /* compute closeness (sin^2) */
                     d1 = DOT(disp, d);
                     prox = 1. - d1*d1/DOT(disp,disp);
              } else
                     prox = 0.;
                                          /* allocate sample */
              id = odAllocBlockSamp(i, hh, vh, prox);
              if (id < 0)
                     continue;            /* not good enough */
                                                 /* convert color */
              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(tmGlobal, odS.rgb[id], &odS.brt[id],
                                   odS.chr[id], 1);
              SET4(odS.redraw, id);                     /* mark for redraw */
              odView[i].n2redraw++;
       }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void odUpdate ( int  vn)

Definition at line 474 of file rhd_odraw.c.

{
       static short  primes[] = {9431,6803,4177,2659,1609,887,587,251,47,1};
       int    myprime;
       register int  i, n;

       DCHECK(vn<0 | vn>=odNViews, CONSISTENCY,
                     "bad view number in odUpdate");
                                   /* need to do some tone mapping? */
       if (needmapping & NEWRGB) {
              if (needmapping & NEWMAP) {
                     if (needmapping & NEWHIST)
                            tmClearHisto(tmGlobal);
                     needmapping &= ~NEWHIST;
                     if (tmAddHisto(tmGlobal, odS.brt,odS.nsamp,1) != TM_E_OK)
                            return;
                     if (tmComputeMapping(tmGlobal, 0.,0.,0.) != TM_E_OK)
                            return;
                     needmapping &= ~NEWMAP;
                     odRedrawAll();                     /* redraw everything */
              }
              if (tmMapPixels(tmGlobal, (BYTE *)(odS.rgb), odS.brt,
                            (BYTE *)(odS.chr), odS.nsamp) != TM_E_OK)
                     return;
              needmapping &= ~NEWRGB;
       }
       if (odView[vn].n2redraw <= 0)
              return;
#if REDRAWTHRESH
       if (odView[vn].n2redraw < REDRAWTHRESH)
              goto quickdraw;
                                   /* pick a good prime step size */
       n = odView[vn].snext - odView[vn].sfirst;
       for (i = 0; primes[i]<<5 >= n; i++)
              ;
       while ((myprime = primes[i++]) > 1)
              if (n % myprime)
                     break;
                                   /* dissolve in new samples */
       for (i = odView[vn].sfirst; n-- > 0; i += myprime) {
              if (i >= odView[vn].snext)
                     i -= odView[vn].snext - odView[vn].sfirst;
              if (CHK4(odS.redraw, i)) {
                     odDrawSamp(vn, i);
                     CLR4(odS.redraw, i);
              }
       }
       odView[vn].n2redraw = 0;
       return;
quickdraw:                         /* quicker sparse flag checking */
#endif
                                   /* redraw samples at end */
       for (i = odView[vn].snext-31; i < odView[vn].snext; i++)
              if (CHK4(odS.redraw, i)) {
                     odDrawSamp(vn, i);
                     CLR4(odS.redraw, i);
              }
                                   /* faster flag checks in middle */
       for (n = odView[vn].snext>>5; n-- > (odView[vn].sfirst+0x1f)>>5; )
              for (i = 0; odS.redraw[n]; i++)           /* skips faster */
                     if (odS.redraw[n] & 1L<<i) {
                            odDrawSamp(vn, (n<<5)+i);
                            odS.redraw[n] &= ~(1L<<i);
                     }
                                   /* redraw samples at beginning */
       for (i = odView[vn].sfirst; i < odView[vn].sfirst+31; i++)
              if (CHK4(odS.redraw, i)) {
                     odDrawSamp(vn, i);
                     CLR4(odS.redraw, i);
              }
       odView[vn].n2redraw = 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

int odNViews

Definition at line 42 of file rhd_odraw.c.

struct ODsamp odS
struct ODview * odView

Definition at line 64 of file rhd_glx1.c.