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