X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fpolytest.c;h=0d5187d868cdb58b5a9a762062341a1410118cca;hb=9e546fcbdc870e396abeb6eaacaa7bc4054a61f0;hp=800dd465ba2aeb732df84bf4623caca36116684e;hpb=07ce18b114e1e01b2a85a04079128f3eb754de1d;p=dosdemo diff --git a/src/polytest.c b/src/polytest.c index 800dd46..0d5187d 100644 --- a/src/polytest.c +++ b/src/polytest.c @@ -104,8 +104,8 @@ static void update(void) int dy = mouse_y - prev_my; if(dx || dy) { - theta += dx * 2.0; - phi += dy * 2.0; + theta += dx * 1.0; + phi += dy * 1.0; if(phi < -90) phi = -90; if(phi > 90) phi = 90; @@ -283,6 +283,8 @@ static int gen_torus(struct mesh *mesh, float rad, float ringrad, int usub, int nfaces = usub * vsub; mesh->icount = nfaces * 4; + printf("generating torus with %d faces (%d vertices)\n", nfaces, mesh->vcount); + if(!(mesh->varr = malloc(mesh->vcount * sizeof *mesh->varr))) { return -1; }