X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffg_geometry.c;h=66659a46f1b7725f46de1a6bb871a7043e735d34;hb=4bb957b58beb8c268b37549e8d6d4fa4b925f858;hp=5f4b0e1bb6679c6e81c4bdc5f1cd12ec15b727e9;hpb=fa40b6be28fa060c4ddbe72850d49c1e9d06a469;p=freeglut diff --git a/src/fg_geometry.c b/src/fg_geometry.c index 5f4b0e1..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