X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffg_geometry.c;h=66659a46f1b7725f46de1a6bb871a7043e735d34;hb=4bb957b58beb8c268b37549e8d6d4fa4b925f858;hp=583b5449fdf755a2f262ae7025698567a831d531;hpb=d85c1ff566830830dae09c5cb9b3b6f15a781369;p=freeglut diff --git a/src/fg_geometry.c b/src/fg_geometry.c index 583b544..66659a4 100644 --- a/src/fg_geometry.c +++ b/src/fg_geometry.c @@ -91,6 +91,35 @@ static void fghDrawGeometry(GLenum vertexMode, double* vertices, double* normals } } +static void fghGenerateGeometry(int numFaces, int numVertPerFace, GLdouble *vertices, GLubyte* vertIndices, GLdouble *normals, GLdouble *vertOut, GLdouble *normOut) +{ + int i,j; + /* + * Build array with vertices from vertex coordinates and vertex indices + * Do same for normals. + * Need to do this because of different normals at shared vertices + * (and because normals' coordinates need to be negated). + */ + for (i=0; i