~ubuntu-branches/ubuntu/trusty/blender/trusty

« back to all changes in this revision

Viewing changes to source/blender/render/intern/include/zbuf.h

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2013-03-06 12:08:47 UTC
  • mfrom: (1.5.1) (14.1.8 experimental)
  • Revision ID: package-import@ubuntu.com-20130306120847-frjfaryb2zrotwcg
Tags: 2.66a-1ubuntu1
* Resynchronize with Debian (LP: #1076930, #1089256, #1052743, #999024,
  #1122888, #1147084)
* debian/control:
  - Lower build-depends on libavcodec-dev since we're not
    doing the libav9 transition in Ubuntu yet

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
void fillrect(int *rect, int x, int y, int val);
47
47
 
48
48
/**
49
 
 * Converts a world coordinate into a homogenous coordinate in view
 
49
 * Converts a world coordinate into a homogeneous coordinate in view
50
50
 * coordinates. 
51
51
 */
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]);
55
55
 
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);
59
59
 
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);
63
63
 
64
64
typedef struct APixstr {
65
65
        unsigned short mask[4];         /* jitter mask */
80
80
        struct APixstrand *next;
81
81
} APixstrand;
82
82
 
83
 
typedef struct APixstrMain
84
 
{
 
83
typedef struct APixstrMain {
85
84
        struct APixstrMain *next, *prev;
86
85
        void *ps;
87
86
} APixstrMain;
91
90
        int rectx, recty;                                               /* range for clipping */
92
91
        
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;
96
95
        
97
96
        float zmulx, zmuly, zofsx, zofsy;               /* transform from hoco to zbuf co */
98
97
        
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);
117
116
        
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 *);
120
119
        
121
120
} ZSpan;
122
121
 
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);
127
127
 
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) );
130
131
 
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);
135
137
 
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]);
 
141
 
 
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]);
139
146
 
140
147
#endif
141
148