[GRASS-dev] nviz volume fails: unknown shade style returned in
get_drawmode
Glynn Clements
glynn at gclements.plus.com
Fri Feb 23 13:43:44 EST 2007
Markus Neteler wrote:
> > in the recent restructuring of NVIZ the volume
> > was apparently not tested:
> >
> > Dataset (9.3MB):
> > http://mpa.itc.it/grasstutor/data7/slovakia3d.tar.gz
> >
> > grass63 ~/grassdata/slovakia3d/PERMANENT/
> > nviz el=dem500 vol=precip3d.500z50
> > Loading Data
> > Update elev null mask
> > Loading Data
> > translating colors from fp
> > recalculating normals...
> > Error in startup script: Internal Error: unknown shade style returned in get_drawmode
> > while executing
> > "Nvol$curr slice get_drawmode"
> >
>
> The problem is in
> visualization/nviz/src/map_obj.c
>
> line 833 etc read like this (G_debug() I have added for me only):
> /* Parse mode returned for shade style and surface style */
> G_debug(0,"mode: %d",mode);
> if (mode & DM_GOURAUD)
> strcpy(shade, "gouraud");
> else if (mode & DM_FLAT)
> strcpy(shade, "flat");
> else {
> Tcl_SetResult(interp,
> "Internal Error: unknown shade style returned in get_drawmode",
> TCL_VOLATILE);
> return (TCL_ERROR);
> }
>
> Result is:
>
> D0/0: mode: 2308
> Error in startup script: Internal Error: unknown shade style returned in
> get_drawmode
> while executing
> "Nvol$curr slice get_drawmode"
>
> In
> include/gsurf.h
> are definitions for:
>
> /* surface display modes */
> #define DM_GOURAUD 0x00000100
> #define DM_FLAT 0x00000200 /* defined for symmetry */
> #define DM_FRINGE 0x00000010
> #define DM_WIRE 0x00000001
> #define DM_COL_WIRE 0x00000002
> #define DM_POLY 0x00000004
> #define DM_WIRE_POLY 0x00000008
> #define DM_GRID_WIRE 0x00000400
> #define DM_GRID_SURF 0x00000800
>
> Not sure what mode = 2308 means...
2308 decimal == 0x904 == DM_GRID_SURF|DM_GOURAUD|DM_POLY
IOW, I have no clue what's going on here.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list