[GRASS-dev] NVIZ now broken?
Bob Covill
bcovill at tekmap.ns.ca
Thu Nov 16 11:29:59 EST 2006
Hello,
I have been looking into why nviz fails when loading a volume from the
command line (i.e. nviz vol=precip3d.500z50). This is the bug reported
in
http://intevation.de/rt/webrt?serial_num=4725
It appears that the volume drawmode is not initialized which causes the
GUI to hang when loading the volume panel. The attached patch for
map_obj.c in nviz/src should fix this.
--
Bob
-------------- next part --------------
--- map_obj.c 2006-11-16 12:22:16.000000000 -0400
+++ map_obj.c_bak 2006-11-16 12:21:56.000000000 -0400
@@ -437,6 +437,7 @@
char const_string[] = "constant";
char zero_string[] = "0";
int new_id;
+ int mode;
int *surf_list, num_surfs, i;
Nv_clientData *new_data;
int file_used = 0;
@@ -560,6 +561,7 @@
return (TCL_ERROR);
}
new_id = GVL_new_vol();
+ mode = 0;
/* See if there is a default file name specified */
if ((argc >= 3) && (strncmp(argv[2], "name=", 5))) {
@@ -570,6 +572,9 @@
return (TCL_ERROR);
}
file_used = 1;
+ mode |= DM_GOURAUD;
+ GVL_isosurf_set_drawmode(new_id, mode);
+ GVL_slice_set_drawmode(new_id, mode);
}
sprintf(id, "Nvol%d", new_id);
More information about the grass-dev
mailing list