ftp://ftp.krokus.ru/pub/OpenBSD/distfiles/xscreensaver-4.22.tar.gz
[xscreensaver] / hacks / glx / polyhedra-gl.c
index b919ca1830d4f822c985e2dfb96ba2af03b8fe5d..12b1c246c51667fc1e8a794b3306841a8f34376b 100644 (file)
@@ -128,7 +128,7 @@ static void
 kludge_normal (int n, const int *indices, const point *points)
 {
   XYZ normal = { 0, 0, 0 };
-  XYZ p;
+  XYZ p = { 0, 0, 0 };
   int i;
 
   for (i = 0; i < n; ++i) {
@@ -369,6 +369,9 @@ new_polyhedron (ModeInfo *mi)
 
   new_label (mi);
 
+  if (wire)
+    glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
+
   glNewList (bp->object_list, GL_COMPILE);
   for (i = 0; i < p->nfaces; i++)
     {