projects
/
dosdemo
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
optional high-quality but slower calculation of attribute slopes across
[dosdemo]
/
src
/
polytest.c
diff --git
a/src/polytest.c
b/src/polytest.c
index
800dd46
..
0d5187d
100644
(file)
--- 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) {
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;
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;
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;
}
if(!(mesh->varr = malloc(mesh->vcount * sizeof *mesh->varr))) {
return -1;
}