## Recommended Posts

cyanbeck    122
I use display lists and gluSphere to draw a human body which is loaded from a bvh file. Because bvh is a hierarchy format, the drawing code is written as a recursive function. Anyway, the code of drawing a bone looks like as follows:
glPushMatrix();
glRotated(t, localOffset[2], 0, -localOffset[0]);
mBoneMat.apply();
i = bodypart->GetID();
glCallList(mLists[i]);
glPopMatrix();


And the code of setup display lists is as follows:
glNewList(list, GL_COMPILE);
glScaled(width, length / 2, width);
glTranslatef(0, 1, 0);
glEndList();


Then here is the result: As you can see, the body is composed of many spheres. But the problem is, normals of some spheres are correct, while otheres are wrong. Ex. Each limb is dark. Any idea about what the problem is would be appreciate. ps. The white ball represents the light source.