1 |
|
/* RCSid $Id$ */ |
2 |
|
/* |
3 |
|
* Header for OpenGL cone drawing routines with depth buffer checks. |
4 |
+ |
* |
5 |
+ |
* Include after "standard.h" |
6 |
|
*/ |
7 |
|
|
8 |
|
#include "color.h" |
9 |
|
#include "tonemap.h" |
10 |
|
#include "rhdriver.h" |
11 |
|
|
10 |
– |
#ifndef int4 |
11 |
– |
#define int4 int |
12 |
– |
#endif |
13 |
– |
|
12 |
|
extern struct ODview { |
13 |
|
int sfirst, snext; /* first sample and first in next view */ |
14 |
|
short hhi, vhi; /* screen image resolution */ |
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 */ |
25 |
< |
int4 *pmap; /* high resolution 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 |
|
|
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 */ |
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) bzero((char *)(f),FL4NELS(n)*sizeof(int32)) |
54 |
|
#endif |
55 |
|
|
56 |
|
#define OMAXDEPTH 32000 /* maximum depth value */ |