46
46
void fillrect(int *rect, int x, int y, int val);
49
* Converts a world coordinate into a homogenous coordinate in view
49
* Converts a world coordinate into a homogeneous coordinate in view
52
void projectvert(const float v1[3], float winmat[][4], float adr[4]);
53
void projectverto(const float v1[3], float winmat[][4], float adr[4]);
52
void projectvert(const float v1[3], float winmat[4][4], float adr[4]);
53
void projectverto(const float v1[3], float winmat[4][4], float adr[4]);
54
54
int testclip(const float v[3]);
56
void zbuffer_shadow(struct Render *re, float winmat[][4], struct LampRen *lar, int *rectz, int size, float jitx, float jity);
57
void zbuffer_abuf_shadow(struct Render *re, struct LampRen *lar, float winmat[][4], struct APixstr *APixbuf, struct APixstrand *apixbuf, struct ListBase *apsmbase, int size, int samples, float (*jit)[2]);
58
void zbuffer_solid(struct RenderPart *pa, struct RenderLayer *rl, void (*fillfunc)(struct RenderPart*, struct ZSpan*, int, void*), void *data);
56
void zbuffer_shadow(struct Render *re, float winmat[4][4], struct LampRen *lar, int *rectz, int size, float jitx, float jity);
57
void zbuffer_abuf_shadow(struct Render *re, struct LampRen *lar, float winmat[4][4], struct APixstr *APixbuf, struct APixstrand *apixbuf, struct ListBase *apsmbase, int size, int samples, float (*jit)[2]);
58
void zbuffer_solid(struct RenderPart *pa, struct RenderLayer *rl, void (*fillfunc)(struct RenderPart *, struct ZSpan *, int, void*), void *data);
60
60
unsigned short *zbuffer_transp_shade(struct RenderPart *pa, struct RenderLayer *rl, float *pass, struct ListBase *psmlist);
61
61
void zbuffer_sss(RenderPart *pa, unsigned int lay, void *handle, void (*func)(void*, int, int, int, int, int));
62
int zbuffer_strands_abuf(struct Render *re, struct RenderPart *pa, struct APixstrand *apixbuf, struct ListBase *apsmbase, unsigned int lay, int negzmask, float winmat[][4], int winx, int winy, int sample, float (*jit)[2], float clipcrop, int shadow, struct StrandShadeCache *cache);
62
int zbuffer_strands_abuf(struct Render *re, struct RenderPart *pa, struct APixstrand *apixbuf, struct ListBase *apsmbase, unsigned int lay, int negzmask, float winmat[4][4], int winx, int winy, int sample, float (*jit)[2], float clipcrop, int shadow, struct StrandShadeCache *cache);
64
64
typedef struct APixstr {
65
65
unsigned short mask[4]; /* jitter mask */
91
90
int rectx, recty; /* range for clipping */
93
92
int miny1, maxy1, miny2, maxy2; /* actual filled in range */
94
float *minp1, *maxp1, *minp2, *maxp2; /* vertex pointers detect min/max range in */
93
const float *minp1, *maxp1, *minp2, *maxp2; /* vertex pointers detect min/max range in */
95
94
float *span1, *span2;
97
96
float zmulx, zmuly, zofsx, zofsy; /* transform from hoco to zbuf co */
99
int *rectz, *arectz; /* zbuffers, arectz is for transparant */
98
int *rectz, *arectz; /* zbuffers, arectz is for transparent */
100
99
int *rectz1; /* seconday z buffer for shadowbuffer (2nd closest z) */
101
100
int *rectp; /* polygon index buffer */
102
101
int *recto; /* object buffer */
115
114
void *sss_handle; /* used by sss */
116
115
void (*sss_func)(void *, int, int, int, int, int);
118
void (*zbuffunc)(struct ZSpan *, int, int, float *, float *, float *, float *);
119
void (*zbuflinefunc)(struct ZSpan *, int, int, float *, float *);
117
void (*zbuffunc)(struct ZSpan *, int, int, const float *, const float *, const float *, const float *);
118
void (*zbuflinefunc)(struct ZSpan *, int, int, const float *, const float *);
123
122
/* exported to shadbuf.c */
124
void zbufclip4(struct ZSpan *zspan, int obi, int zvlnr, float *f1, float *f2, float *f3, float *f4, int c1, int c2, int c3, int c4);
123
void zbufclip4(struct ZSpan *zspan, int obi, int zvlnr, float *f1, float *f2, float *f3, float *f4,
124
int c1, int c2, int c3, int c4);
125
125
void zbuf_free_span(struct ZSpan *zspan);
126
126
void freepsA(struct ListBase *lb);
128
128
/* to rendercore.c */
129
void zspan_scanconvert(struct ZSpan *zpan, void *handle, float *v1, float *v2, float *v3, void (*func)(void *, int, int, float, float) );
129
void zspan_scanconvert(struct ZSpan *zpan, void *handle, float *v1, float *v2, float *v3,
130
void (*func)(void *, int, int, float, float) );
131
132
/* exported to edge render... */
132
133
void zbufclip(struct ZSpan *zspan, int obi, int zvlnr, float *f1, float *f2, float *f3, int c1, int c2, int c3);
133
134
void zbuf_alloc_span(struct ZSpan *zspan, int rectx, int recty, float clipcrop);
134
void zbufclipwire(struct ZSpan *zspan, int obi, int zvlnr, int ec, float *ho1, float *ho2, float *ho3, float *ho4, int c1, int c2, int c3, int c4);
135
void zbufclipwire(struct ZSpan *zspan, int obi, int zvlnr, int ec,
136
float *ho1, float *ho2, float *ho3, float *ho4, int c1, int c2, int c3, int c4);
136
138
/* exported to shadeinput.c */
137
void zbuf_make_winmat(Render *re, float winmat[][4]);
138
void zbuf_render_project(float winmat[][4], const float co[3], float ho[4]);
139
void zbuf_make_winmat(Render *re, float winmat[4][4]);
140
void zbuf_render_project(float winmat[4][4], const float co[3], float ho[4]);
142
/* sould not really be exposed, bad! */
143
void hoco_to_zco(ZSpan *zspan, float zco[3], const float hoco[4]);
144
void zspan_scanconvert_strand(ZSpan *zspan, void *handle, float *v1, float *v2, float *v3, void (*func)(void *, int, int, float, float, float) );
145
void zbufsinglewire(ZSpan *zspan, int obi, int zvlnr, const float ho1[4], const float ho2[4]);