X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffg_geometry.c;h=d12b3f65f83e269dd3753aa8c4c3b0c91900c646;hb=6b8566e1d152df1b58136f3d3b861d2e94bde9df;hp=5c3685e442c7ac56e541c1e977d68121e11a2b39;hpb=198a266a2d99444556fd2e8e3b0b4baaf26dfbaa;p=freeglut diff --git a/src/fg_geometry.c b/src/fg_geometry.c index 5c3685e..d12b3f6 100644 --- a/src/fg_geometry.c +++ b/src/fg_geometry.c @@ -76,6 +76,7 @@ static void fghDrawGeometry(GLenum vertexMode, GLdouble *vertices, GLdouble *nor { glPushAttrib(GL_POLYGON_BIT); glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); + glDisable(GL_CULL_FACE); } if (1) @@ -187,11 +188,6 @@ static void fghGenerateGeometry(int numFaces, int numEdgePerFace, GLdouble *vert /* -- INTERNAL SETUP OF GEOMETRY --------------------------------------- */ -static unsigned int ipow (int x, unsigned int y) -{ - return y==0? 1: y==1? x: (y%2? x: 1) * ipow(x*x, y/2); -} - /* -- stuff that can be cached -- */ /* Cache of input to glDrawArrays */ #define DECLARE_SHAPE_CACHE(name,nameICaps,nameCaps)\ @@ -571,6 +567,11 @@ static GLubyte tetrahedron_vi[TETRAHEDRON_VERT_PER_OBJ] = DECLARE_SHAPE_CACHE(tetrahedron,Tetrahedron,TETRAHEDRON); /* -- Sierpinski Sponge -- */ +static unsigned int ipow (int x, unsigned int y) +{ + return y==0? 1: y==1? x: (y%2? x: 1) * ipow(x*x, y/2); +} + static void fghSierpinskiSpongeGenerate ( int numLevels, GLdouble offset[3], GLdouble scale, GLdouble* vertices, GLdouble* normals ) { int i, j;