X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Frasterize;a=blobdiff_plain;f=vert.h;fp=vert.h;h=7575b48258ffaebe15d6165b2d460b9ddc12015c;hp=48b3e2db1c59bbcafb9538b92c89d9232e29502c;hb=95850b98f73ad7033af60a30e324e9c3cda55389;hpb=a0e6abd72f045a741fb1ecdd1c2d11281f2840b9 diff --git a/vert.h b/vert.h index 48b3e2d..7575b48 100644 --- a/vert.h +++ b/vert.h @@ -19,6 +19,7 @@ struct vert { vec_t v; vec_t n; + vec_t t; color_t c; }; typedef struct vert vert_t; @@ -28,10 +29,11 @@ typedef struct vert vert_t; * Initialize a vertex with a point vector, normal, and a color. */ INLINE_MAYBE -void vert_init(vert_t* r, vec_t v, vec_t n, color_t c) +void vert_init(vert_t* r, vec_t v, vec_t n, vec_t t, color_t c) { r->v = v; r->n = n; + r->t = t; r->c = c; } @@ -43,7 +45,7 @@ INLINE_MAYBE vert_t vert_new(vec_t v) { vert_t r; - vert_init(&r, v, VEC_ZERO, COLOR_WHITE); + vert_init(&r, v, VEC_ZERO, VEC_ZERO, COLOR_WHITE); return r; }