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.11 by schorsch, Mon Jul 14 22:24:00 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 + #ifndef _RAD_RHD_ODRAW_H_
8 + #define _RAD_RHD_ODRAW_H_
9  
9 #undef NOPROTO
10 #define NOPROTO 1
10   #include "color.h"
11   #include "tonemap.h"
12   #include "rhdriver.h"
13  
14 < #ifndef int4
15 < #define int4    int
14 > #ifdef __cplusplus
15 > extern "C" {
16   #endif
17  
18   extern struct ODview {
19 +        int     sfirst, snext;  /* first sample and first in next view */
20          short   hhi, vhi;       /* screen image resolution */
21          short   hlow, vlow;     /* block resolution */
22 +        int     n2redraw;       /* approx. number of samples needing redraw */
23          struct ODblock {
24                  short   nsamp;          /* number of samples in block */
25                  short   nused;          /* number actually allocated */
26                  int     first;          /* first sample in this block */
27                  int     free;           /* index for block free list */
28 +                float   pthresh;        /* proximity threshold */
29          }       *bmap;          /* low resolution image map */
30 <        int4    *emap;          /* low resolution edge presence map */
30 >        int32   *emap;          /* low resolution edge presence map */
31 >        int32   *pmap;          /* high resolution presence map */
32          GLfloat *dmap;          /* high resolution depth map */
33   } *odView;              /* our view list */
34  
# Line 34 | Line 37 | extern int     odNViews;       /* number of views in our list */
37   extern struct ODsamp {
38          union ODfunion {
39                  float   prox;                   /* viewpoint proximity */
40 <                int4    next;                   /* next in free list */
40 >                int32   next;                   /* next in free list */
41                  
42          } *f;                           /* free list next or proximity */
43          short           (*ip)[2];       /* image position array */
44          TMbright        *brt;           /* encoded brightness array */
45          BYTE            (*chr)[3];      /* encoded chrominance array */
46          BYTE            (*rgb)[3];      /* tone-mapped color array */
47 <        int4            *redraw;        /* redraw flags */
47 >        int32           *redraw;        /* redraw flags */
48          int             nsamp;          /* total number of samples */
49          char            *base;          /* base of allocated memory */
50   } odS;                  /* sample values */
# Line 53 | Line 56 | extern struct ODsamp {
56   #define CLR4(f,i)       FL4OP(f,i,&=~)
57   #define TGL4(f,i)       FL4OP(f,i,^=)
58   #define FL4NELS(n)      (((n)+0x1f)>>5)
59 < #define CLR4ALL(f,n)    bzero((char *)(f),FL4NELS(n)*sizeof(int4))
59 > #define CLR4ALL(f,n)    memset((char *)(f),'\0',FL4NELS(n)*sizeof(int32))
60   #endif
61  
62   #define OMAXDEPTH       32000                   /* maximum depth value */
# Line 111 | Line 114 | needs to be redrawn in the next call to odUpdate().
114  
115  
116   void
117 + odRedrawAll()                   : everything needs to be redrawn
118 +
119 + Redraw everything in all views on the next call to odUpdate().
120 + Unless odRemap() is called, no new tone mapping will be done.
121 +
122 +
123 + void
124   odUpdate(vn)                    : update the current view
125   int     vn;                     : view number
126  
# Line 118 | Line 128 | Draw all new and undrawn sample values since last call
128  
129  
130   void
131 < odRemap()                       : recompute tone mapping
131 > odRemap(newhist)                : recompute tone mapping
132 > int     newhist;                : flag whether to clear history
133  
134   Recompute the tone mapping for all the samples in all the views
135 < and redraw them on the next call(s) to odUpdate().
135 > and redraw them on the next call(s) to odUpdate().  If newhist
136 > is non-zero, then clear the previous sample history.
137  
138   **********************************************************************/
139 +
140 + #ifdef __cplusplus
141 + }
142 + #endif
143 + #endif /* _RAD_RHD_ODRAW_H_ */
144 +

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines