summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrodri <rgl@antares-labs.eu>2023-11-18 18:12:22 +0000
committerrodri <rgl@antares-labs.eu>2023-11-18 18:12:22 +0000
commit873c10820c62e5f2d206131a8d6f52195a596aa8 (patch)
tree29591742b13c42e8bef76597bfa4caf8f2ce1568
parent1b76dd0177af7e6949f8c20c434844f8d559b6cd (diff)
downloadtinyrend-873c10820c62e5f2d206131a8d6f52195a596aa8.tar.gz
tinyrend-873c10820c62e5f2d206131a8d6f52195a596aa8.tar.bz2
tinyrend-873c10820c62e5f2d206131a8d6f52195a596aa8.zip
put all the transformations in a single matrix.
-rw-r--r--main.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/main.c b/main.c
index 4db0caf..dce0cad 100644
--- a/main.c
+++ b/main.c
@@ -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);