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

Comparing ray/src/hd/rhd_odraw.h (file contents):
Revision 3.1 by gwlarson, Fri Dec 18 11:55:19 1998 UTC vs.
Revision 3.10 by schorsch, Mon Jun 30 14:59:11 2003 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1998 Silicon Graphics, Inc. */
2 <
3 < /* SCCSid "$SunId$ SGI" */
4 <
1 > /* RCSid $Id$ */
2   /*
3   * Header for OpenGL cone drawing routines with depth buffer checks.
4 + *
5 + * Include after "standard.h"
6   */
7  
9 #undef NOPROTO
10 #define NOPROTO 1
8   #include "color.h"
9   #include "tonemap.h"
10   #include "rhdriver.h"
11  
15 #ifndef int4
16 #define int4    int
17 #endif
18
12   extern struct ODview {
13 +        int     sfirst, snext;  /* first sample and first in next view */
14          short   hhi, vhi;       /* screen image resolution */
15          short   hlow, vlow;     /* block resolution */
16 +        int     n2redraw;       /* approx. number of samples needing redraw */
17          struct ODblock {
18                  short   nsamp;          /* number of samples in block */
19                  short   nused;          /* number actually allocated */
20                  int     first;          /* first sample in this block */
21                  int     free;           /* index for block free list */
22 +                float   pthresh;        /* proximity threshold */
23          }       *bmap;          /* low resolution image map */
24 <        int4    *emap;          /* low resolution edge presence map */
24 >        int32   *emap;          /* low resolution edge presence map */
25 >        int32   *pmap;          /* high resolution presence map */
26          GLfloat *dmap;          /* high resolution depth map */
27   } *odView;              /* our view list */
28  
# Line 34 | Line 31 | extern int     odNViews;       /* number of views in our list */
31   extern struct ODsamp {
32          union ODfunion {
33                  float   prox;                   /* viewpoint proximity */
34 <                int4    next;                   /* next in free list */
34 >                int32   next;                   /* next in free list */
35                  
36          } *f;                           /* free list next or proximity */
37          short           (*ip)[2];       /* image position array */
38          TMbright        *brt;           /* encoded brightness array */
39          BYTE            (*chr)[3];      /* encoded chrominance array */
40          BYTE            (*rgb)[3];      /* tone-mapped color array */
41 <        int4            *redraw;        /* redraw flags */
41 >        int32           *redraw;        /* redraw flags */
42          int             nsamp;          /* total number of samples */
43          char            *base;          /* base of allocated memory */
44   } odS;                  /* sample values */
# Line 53 | Line 50 | extern struct ODsamp {
50   #define CLR4(f,i)       FL4OP(f,i,&=~)
51   #define TGL4(f,i)       FL4OP(f,i,^=)
52   #define FL4NELS(n)      (((n)+0x1f)>>5)
53 < #define CLR4ALL(f,n)    bzero((char *)(f),FL4NELS(n)*sizeof(int4))
53 > #define CLR4ALL(f,n)    memset((char *)(f),'\0',FL4NELS(n)*sizeof(int32))
54   #endif
55  
56   #define OMAXDEPTH       32000                   /* maximum depth value */
# Line 111 | Line 108 | needs to be redrawn in the next call to odUpdate().
108  
109  
110   void
111 + odRedrawAll()                   : everything needs to be redrawn
112 +
113 + Redraw everything in all views on the next call to odUpdate().
114 + Unless odRemap() is called, no new tone mapping will be done.
115 +
116 +
117 + void
118   odUpdate(vn)                    : update the current view
119   int     vn;                     : view number
120  
# Line 118 | Line 122 | Draw all new and undrawn sample values since last call
122  
123  
124   void
125 < odRemap()                       : recompute tone mapping
125 > odRemap(newhist)                : recompute tone mapping
126 > int     newhist;                : flag whether to clear history
127  
128   Recompute the tone mapping for all the samples in all the views
129 < and redraw them on the next call(s) to odUpdate().
129 > and redraw them on the next call(s) to odUpdate().  If newhist
130 > is non-zero, then clear the previous sample history.
131  
132   **********************************************************************/

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines