I have these nice variables indicating whether the geometry cache for a
authorDiederick Niehorster <dcnieho@gmail.com>
Fri, 16 Mar 2012 03:17:37 +0000 (03:17 +0000)
committerDiederick Niehorster <dcnieho@gmail.com>
Fri, 16 Mar 2012 03:17:37 +0000 (03:17 +0000)
certain object was already filled, but i never set them to true...

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

src/fg_geometry.c

index 583b544..5f4b0e1 100644 (file)
@@ -328,7 +328,10 @@ static void fghCircleTable(double **sint,double **cost,const int n)
 static void fghCube( GLdouble dSize, GLboolean useWireMode )
 {
     if (!cubeCached)
+    {
         fghCubeGenerate();
+        cubeCached = TRUE;
+    }
 
     if (dSize!=1.)
     {
@@ -342,7 +345,10 @@ static void fghCube( GLdouble dSize, GLboolean useWireMode )
 static void fghTetrahedron( GLboolean useWireMode )
 {
     if (!tetrCached)
+    {
         fghTetrahedronGenerate();
+        tetrCached = TRUE;
+    }
 
     fghDrawGeometry(GL_TRIANGLES,tetr_verts,tetr_norms,TETR_VERT_PER_TETR,useWireMode);
 }