renderSolidIcosahedron

I was working on some code for making an object using pre-existing freeglut code, namely the renderSolidIcosahedron() procedure in geometry.h. The code does make the solid Icosahedron, but the when I increased the scale of it, I saw the object was inside out. Or shall I say, the faces were showing from the inside.

To get them on the outside, do I reverse the normals by just multiplying by -1?

Link to the code:
http://www.cs.clemson.edu/~malloy/courses/3dgames/examples/ogl_sprite_overlay_linux/geometry.h
I fixed it just versing the order of the vertexes were drawn in. It looks like they tried to use the data from MicroSoft DirectX and did not reverse the data, as openGL draws in the opposite direction.

glVertex3dv ( icos_r[icos_v[i][2]] ) ;
glVertex3dv ( icos_r[icos_v[i][1]] ) ;
glVertex3dv ( icos_r[icos_v[i][0]] ) ;
Topic archived. No new replies allowed.