rayzor
diff src/min3d.c @ 2:c273c6f799a4
added fixcase utility to fix the ftp-ed files' case on linux
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 05 Apr 2014 18:31:00 +0300 |
parents | a826bf0fb169 |
children | 9035507275d6 |
line diff
1.1 --- a/src/min3d.c Sat Apr 05 09:05:26 2014 +0300 1.2 +++ b/src/min3d.c Sat Apr 05 18:31:00 2014 +0300 1.3 @@ -165,6 +165,24 @@ 1.4 m3d_frustum(-aspect * x, aspect * x, -x, x, nr, fr); 1.5 } 1.6 1.7 +static void xform4(float *mat, float *vec) 1.8 +{ 1.9 + float x = mat[0] * vec[0] + mat[1] * vec[1] + mat[2] * vec[2] + mat[3]; 1.10 + float y = mat[4] * vec[0] + mat[5] * vec[1] + mat[6] * vec[2] + mat[7]; 1.11 + float z = mat[8] * vec[0] + mat[9] * vec[1] + mat[10] * vec[2] + mat[11]; 1.12 + float w = mat[12] * vec[0] + mat[13] * vec[1] + mat[14] * vec[2] + mat[15]; 1.13 + 1.14 + vec[0] = x; 1.15 + vec[1] = y; 1.16 + vec[2] = z; 1.17 + vec[3] = w; 1.18 +} 1.19 + 1.20 +static void proc_vertex(struct min3d_vertex *v) 1.21 +{ 1.22 + struct min3d_vertex *tv; 1.23 +} 1.24 + 1.25 /* drawing */ 1.26 void m3d_draw(int prim, const float *varr, int vcount) 1.27 {