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