diff options
author | rodri <rgl@antares-labs.eu> | 2023-11-18 18:12:22 +0000 |
---|---|---|
committer | rodri <rgl@antares-labs.eu> | 2023-11-18 18:12:22 +0000 |
commit | 873c10820c62e5f2d206131a8d6f52195a596aa8 (patch) | |
tree | 29591742b13c42e8bef76597bfa4caf8f2ce1568 /main.c | |
parent | 1b76dd0177af7e6949f8c20c434844f8d559b6cd (diff) | |
download | tinyrend-873c10820c62e5f2d206131a8d6f52195a596aa8.tar.gz tinyrend-873c10820c62e5f2d206131a8d6f52195a596aa8.tar.bz2 tinyrend-873c10820c62e5f2d206131a8d6f52195a596aa8.zip |
put all the transformations in a single matrix.
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -477,10 +477,6 @@ shaderunit2(void *arg) t.p1 = Pt3(verts[idxtab->indices[1]].x,verts[idxtab->indices[1]].y,verts[idxtab->indices[1]].z,verts[idxtab->indices[1]].w); t.p2 = Pt3(verts[idxtab->indices[2]].x,verts[idxtab->indices[2]].y,verts[idxtab->indices[2]].z,verts[idxtab->indices[2]].w); - t.p0 = xform3(t.p0, rota); - t.p1 = xform3(t.p1, rota); - t.p2 = xform3(t.p2, rota); - st.p0 = xform3(t.p0, view); st.p1 = xform3(t.p1, view); st.p2 = xform3(t.p2, view); @@ -935,6 +931,7 @@ threadmain(int argc, char *argv[]) }; identity3(rota); mulm3(rota, yrot); + mulm3(proj, rota); mulm3(view, proj); rendering = 1; proccreate(renderer, nil, mainstacksize); |