projects
/
dosdemo
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed the mesh loader
[dosdemo]
/
tools
/
ropesim
/
src
/
main.c
diff --git
a/tools/ropesim/src/main.c
b/tools/ropesim/src/main.c
index
bb5e5c5
..
bfd6424
100644
(file)
--- a/
tools/ropesim/src/main.c
+++ b/
tools/ropesim/src/main.c
@@
-108,7
+108,7
@@
void display(void)
{0.5, 0.3, 0.2, 1},
{0.2, 0.3, 0.2, 1}
};
{0.5, 0.3, 0.2, 1},
{0.2, 0.3, 0.2, 1}
};
- int i;
+ int i, count;
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
@@
-123,7
+123,13
@@
void display(void)
glLightfv(GL_LIGHT0 + i, GL_DIFFUSE, lcol[i]);
}
glLightfv(GL_LIGHT0 + i, GL_DIFFUSE, lcol[i]);
}
- cmesh_draw(scn);
+ count = cmesh_submesh_count(scn);
+ for(i=0; i<count; i++) {
+ cmesh_draw_submesh(scn, i);
+ }
+ cmesh_draw(mesh_gout);
+ cmesh_draw(mesh_gin);
+ cmesh_draw(mesh_suz);
glutSwapBuffers();
}
glutSwapBuffers();
}