[GRASS-SVN] r52393 - grass/branches/releasebranch_6_4/lib/ogsf

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jul 17 01:38:37 PDT 2012


Author: annakrat
Date: 2012-07-17 01:38:37 -0700 (Tue, 17 Jul 2012)
New Revision: 52393

Modified:
   grass/branches/releasebranch_6_4/lib/ogsf/gvld.c
Log:
ogsf: patch by Glynn (from #1423), merged from trunk, r52391

Modified: grass/branches/releasebranch_6_4/lib/ogsf/gvld.c
===================================================================
--- grass/branches/releasebranch_6_4/lib/ogsf/gvld.c	2012-07-17 08:37:49 UTC (rev 52392)
+++ grass/branches/releasebranch_6_4/lib/ogsf/gvld.c	2012-07-17 08:38:37 UTC (rev 52393)
@@ -95,6 +95,7 @@
     int x, y, z, i, iv;
     float xc, yc, zc;
     float xres, yres, zres;
+    unsigned r, g, b;
 
     int j, p, num, c_ndx, crnt_ev;
     float n[3], pt[4];
@@ -346,10 +347,14 @@
 				n[Z] *= -1;
 			    }
 
-			    if (check_color[i])
+			    if (check_color[i]) {
+				r = READ();
+				g = READ();
+				b = READ();
 				curcolor[i] =
-				    (READ() & 0xff) | ((READ() & 0xff) << 8) |
-				    ((READ() & 0xff) << 16);
+				    (r & 0xff) | ((g & 0xff) << 8) |
+				    ((b & 0xff) << 16);
+			    }
 
 			    if (check_transp[i])
 				ktrans[i] = READ() << 24;;
@@ -365,7 +370,7 @@
 				pksh = ksh[i];
 				pkem = kem[i];
 				gsd_set_material(1, 1, ksh[i], kem[i],
-						 (int)curcolor);
+						 curcolor[i]);
 			    }
 
 			    gsd_litvert_func(n, ktrans[i] | curcolor[i], pt);



More information about the grass-commit mailing list