--- ray/src/hd/rhd_odraw.h 2003/03/04 05:49:21 3.8 +++ ray/src/hd/rhd_odraw.h 2004/01/01 11:21:55 3.12 @@ -1,14 +1,18 @@ -/* RCSid $Id: rhd_odraw.h,v 3.8 2003/03/04 05:49:21 greg Exp $ */ +/* RCSid $Id: rhd_odraw.h,v 3.12 2004/01/01 11:21:55 schorsch Exp $ */ /* * Header for OpenGL cone drawing routines with depth buffer checks. + * + * Include after "standard.h" */ +#ifndef _RAD_RHD_ODRAW_H_ +#define _RAD_RHD_ODRAW_H_ #include "color.h" #include "tonemap.h" #include "rhdriver.h" -#ifndef int4 -#define int4 int +#ifdef __cplusplus +extern "C" { #endif extern struct ODview { @@ -23,8 +27,8 @@ extern struct ODview { int free; /* index for block free list */ float pthresh; /* proximity threshold */ } *bmap; /* low resolution image map */ - int4 *emap; /* low resolution edge presence map */ - int4 *pmap; /* high resolution presence map */ + int32 *emap; /* low resolution edge presence map */ + int32 *pmap; /* high resolution presence map */ GLfloat *dmap; /* high resolution depth map */ } *odView; /* our view list */ @@ -33,14 +37,14 @@ extern int odNViews; /* number of views in our list */ extern struct ODsamp { union ODfunion { float prox; /* viewpoint proximity */ - int4 next; /* next in free list */ + int32 next; /* next in free list */ } *f; /* free list next or proximity */ short (*ip)[2]; /* image position array */ TMbright *brt; /* encoded brightness array */ BYTE (*chr)[3]; /* encoded chrominance array */ BYTE (*rgb)[3]; /* tone-mapped color array */ - int4 *redraw; /* redraw flags */ + int32 *redraw; /* redraw flags */ int nsamp; /* total number of samples */ char *base; /* base of allocated memory */ } odS; /* sample values */ @@ -52,7 +56,7 @@ extern struct ODsamp { #define CLR4(f,i) FL4OP(f,i,&=~) #define TGL4(f,i) FL4OP(f,i,^=) #define FL4NELS(n) (((n)+0x1f)>>5) -#define CLR4ALL(f,n) bzero((char *)(f),FL4NELS(n)*sizeof(int4)) +#define CLR4ALL(f,n) memset((char *)(f),'\0',FL4NELS(n)*sizeof(int32)) #endif #define OMAXDEPTH 32000 /* maximum depth value */ @@ -132,3 +136,27 @@ and redraw them on the next call(s) to odUpdate(). If is non-zero, then clear the previous sample history. **********************************************************************/ + + /* rhd_geom.c */ +void gmNewGeom( char *file); +extern void gmEndGeom(void); +extern int gmDrawGeom(void); +extern void gmDrawPortals(int r, int g, int b, int a); +extern void gmDepthLimit( double dl[2], FVECT vorg, FVECT vdir); +extern void gmNewPortal(char *pflist); +extern int gmEndPortal(void); + /* rhd_odraw.c */ +extern int odInit(int n); +extern void odSample(COLR c, FVECT d, FVECT p); +extern void odRemap(int newhist); +extern void odRedrawAll(void); +extern void odRedraw(int vn, int hmin, int vmin, int hmax, int vmax); +extern void odDepthMap(int vn, GLfloat *dm); +extern void odUpdate(int vn); + + +#ifdef __cplusplus +} +#endif +#endif /* _RAD_RHD_ODRAW_H_ */ +