Changeset 840
- Timestamp:
- Jan 3, 2008, 1:18:59 PM (17 years ago)
- Location:
- trunk/vizservers/nanovis
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/vizservers/nanovis/Command.cpp
r838 r840 1040 1040 const char *argv[]) 1041 1041 { 1042 fprintf(stderr, "in heightmap command\n");1043 fflush(stderr);1044 1042 if (argc < 2) { 1045 1043 srand((unsigned)time(NULL)); … … 1091 1089 return TCL_OK; 1092 1090 } else if ((c == 'd') && (strcmp(argv[1],"data") == 0)) { 1093 fprintf(stderr, "heightmap data\n");1094 fflush(stderr);1095 1091 //bytes 1096 1092 char c; … … 1118 1114 int nBytes; 1119 1115 1120 fprintf(stderr, "in data follows\n");1121 fflush(stderr);1122 1116 if (Tcl_GetInt(interp, argv[3], &nBytes) != TCL_OK) { 1123 1117 return TCL_ERROR; 1124 1118 } 1125 fprintf(stderr, "expecting %d bytes\n", nBytes);1126 fflush(stderr);1127 1119 if (FillBufferFromStdin(interp, buf, nBytes) != TCL_OK) { 1128 1120 return TCL_ERROR; … … 1131 1123 fprintf(stderr, "error in command: %s\n", 1132 1124 Tcl_GetStringResult(interp)); 1133 1125 fflush(stderr); 1134 1126 return TCL_ERROR; 1135 1127 } … … 1307 1299 } 1308 1300 } else if ((c == 'a') && (strcmp(argv[1],"axiscolor") == 0)) { 1309 float r, g, b ;1301 float r, g, b, a; 1310 1302 if ((GetFloat(interp, argv[2], &r) != TCL_OK) || 1311 1303 (GetFloat(interp, argv[3], &g) != TCL_OK) || … … 1313 1305 return TCL_ERROR; 1314 1306 } 1307 a = 1.0f; 1308 if ((argc == 6) && (GetFloat(interp, argv[5], &a) != TCL_OK)) { 1309 return TCL_ERROR; 1310 } 1315 1311 if (g_grid) { 1316 g_grid->setAxisColor(r, g, b, 1.0f);1312 g_grid->setAxisColor(r, g, b, a); 1317 1313 } 1318 1314 } else if ((c == 'l') && (strcmp(argv[1],"linecolor") == 0)) { 1319 float r, g, b ;1315 float r, g, b, a; 1320 1316 if ((GetFloat(interp, argv[2], &r) != TCL_OK) || 1321 1317 (GetFloat(interp, argv[3], &g) != TCL_OK) || … … 1323 1319 return TCL_ERROR; 1324 1320 } 1321 a = 1.0f; 1322 if ((argc == 6) && (GetFloat(interp, argv[5], &a) != TCL_OK)) { 1323 return TCL_ERROR; 1324 } 1325 1325 if (g_grid) { 1326 g_grid->setGridLineColor(r, g, b, 1.0f);1326 g_grid->setGridLineColor(r, g, b, a); 1327 1327 } 1328 1328 } else if ((c == 'm') && (strcmp(argv[1],"minmax") == 0)) { … … 1993 1993 float *zValues; 1994 1994 1995 fprintf(stderr, "in unirect2d command\n");1996 fflush(stderr);1997 1995 if ((argc & 0x01) == 0) { 1998 1996 Tcl_AppendResult(interp, … … 2066 2064 return TCL_ERROR; 2067 2065 } 2068 fprintf(stderr, "xnum=%d, ynum=%d, znum=%d\n", xNum, yNum, zNum);2069 fflush(stderr);2070 2066 if (zNum != (xNum * yNum)) { 2071 2067 Tcl_AppendResult(interp, "wrong number of z values must be xnum*ynum", -
trunk/vizservers/nanovis/HeightMap.cpp
r838 r840 87 87 cgGLEnableProfile(CG_PROFILE_FP30); 88 88 89 fprintf(stderr, "set texture param id=%d\n", _colorMap->id);90 fflush(stderr);91 89 cgGLSetTextureParameter(_tf, _colorMap->id); 92 90 cgGLEnableTextureParameter(_tf);
Note: See TracChangeset
for help on using the changeset viewer.