X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=dosdemo;a=blobdiff_plain;f=src%2Fpolytest.c;h=0d5187d868cdb58b5a9a762062341a1410118cca;hp=800dd465ba2aeb732df84bf4623caca36116684e;hb=9e546fcbdc870e396abeb6eaacaa7bc4054a61f0;hpb=0b870b76705b3e597da3f6a11e0499deedbeee30 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; }