From 40e7dfa35cc5f6ec873e70dd07c95a054218194b Mon Sep 17 00:00:00 2001 From: dcnieho Date: Fri, 16 Mar 2012 03:17:37 +0000 Subject: [PATCH] I have these nice variables indicating whether the geometry cache for a certain object was already filled, but i never set them to true... git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1146 7f0cb862-5218-0410-a997-914c9d46530a --- freeglut/freeglut/src/fg_geometry.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/freeglut/freeglut/src/fg_geometry.c b/freeglut/freeglut/src/fg_geometry.c index 583b544..5f4b0e1 100644 --- a/freeglut/freeglut/src/fg_geometry.c +++ b/freeglut/freeglut/src/fg_geometry.c @@ -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); }