X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Frasterize;a=blobdiff_plain;f=vert.h;h=8a3567c6e7fd344054f426f559d78a1e198b0804;hp=48b3e2db1c59bbcafb9538b92c89d9232e29502c;hb=3955aa40277c4b86a43b21e78d55d2fea7b643ce;hpb=c875478cdd823c7df8fdc859941bd9e5948c9315 diff --git a/vert.h b/vert.h index 48b3e2d..8a3567c 100644 --- a/vert.h +++ b/vert.h @@ -19,19 +19,22 @@ struct vert { vec_t v; vec_t n; + vec_t t; color_t c; }; typedef struct vert vert_t; /* - * Initialize a vertex with a point vector, normal, and a color. + * Initialize a vertex with a point vector, normal, texture coordinates, + * 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 +46,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; }