[GRASS-SVN] r52391 - grass/trunk/lib/ogsf
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Jul 17 01:30:31 PDT 2012
Author: annakrat
Date: 2012-07-17 01:30:31 -0700 (Tue, 17 Jul 2012)
New Revision: 52391
Modified:
grass/trunk/lib/ogsf/gvld.c
Log:
ogsf: patch by Glynn (from #1423)
Modified: grass/trunk/lib/ogsf/gvld.c
===================================================================
--- grass/trunk/lib/ogsf/gvld.c 2012-07-17 07:50:10 UTC (rev 52390)
+++ grass/trunk/lib/ogsf/gvld.c 2012-07-17 08:30:31 UTC (rev 52391)
@@ -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