Need to also set glDisable(GL_CULL_FACE) when drawing wireframe to match what was
authorDiederick Niehorster <dcnieho@gmail.com>
Sat, 17 Mar 2012 02:11:49 +0000 (02:11 +0000)
committerDiederick Niehorster <dcnieho@gmail.com>
Sat, 17 Mar 2012 02:11:49 +0000 (02:11 +0000)
produced before

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1167 7f0cb862-5218-0410-a997-914c9d46530a

src/fg_geometry.c

index 5c3685e..d12b3f6 100644 (file)
@@ -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;