- Timestamp:
- Mar 8, 2013 8:07:21 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/flowvisviewer.tcl
r3477 r3478 2622 2622 itcl::body Rappture::FlowvisViewer::Resize {} { 2623 2623 $_arcball resize $_width $_height 2624 SendCmd "screen $_width $_height"2624 SendCmd "screen size $_width $_height" 2625 2625 set _resizePending 0 2626 2626 } -
trunk/gui/scripts/nanovisviewer.tcl
r3454 r3478 2039 2039 itcl::body Rappture::NanovisViewer::DoResize {} { 2040 2040 $_arcball resize $_width $_height 2041 SendCmd "screen $_width $_height"2041 SendCmd "screen size $_width $_height" 2042 2042 set _resizePending 0 2043 2043 } -
trunk/packages/vizservers/nanovis/Command.cpp
r3463 r3478 885 885 } 886 886 887 static int 888 ScreenBgColorOp(ClientData clientData, Tcl_Interp *interp, int objc, 889 Tcl_Obj *const *objv) 890 { 891 float rgb[3]; 892 if ((GetFloatFromObj(interp, objv[2], &rgb[0]) != TCL_OK) || 893 (GetFloatFromObj(interp, objv[3], &rgb[1]) != TCL_OK) || 894 (GetFloatFromObj(interp, objv[4], &rgb[2]) != TCL_OK)) { 895 return TCL_ERROR; 896 } 897 NanoVis::setBgColor(rgb); 898 return TCL_OK; 899 } 900 887 901 /* 888 902 * ---------------------------------------------------------------------- 889 903 * CLIENT COMMAND: 890 * screen <width> <height>904 * screen size <width> <height> 891 905 * 892 906 * Clients send this command to set the size of the rendering area. … … 895 909 */ 896 910 static int 911 ScreenSizeOp(ClientData clientData, Tcl_Interp *interp, int objc, 912 Tcl_Obj *const *objv) 913 { 914 int w, h; 915 if ((Tcl_GetIntFromObj(interp, objv[2], &w) != TCL_OK) || 916 (Tcl_GetIntFromObj(interp, objv[3], &h) != TCL_OK)) { 917 return TCL_ERROR; 918 } 919 NanoVis::resizeOffscreenBuffer(w, h); 920 return TCL_OK; 921 } 922 923 static Rappture::CmdSpec screenOps[] = { 924 {"bgcolor", 1, ScreenBgColorOp, 5, 5, "r g b",}, 925 {"size", 1, ScreenSizeOp, 4, 4, "width height",}, 926 }; 927 static int nScreenOps = NumCmdSpecs(screenOps); 928 929 static int 897 930 ScreenCmd(ClientData clientData, Tcl_Interp *interp, int objc, 898 Tcl_Obj *const *objv) 899 { 900 if (objc != 3) { 901 Tcl_AppendResult(interp, "wrong # args: should be \"", 902 Tcl_GetString(objv[0]), " width height\"", (char*)NULL); 903 return TCL_ERROR; 904 } 905 906 int w, h; 907 if ((Tcl_GetIntFromObj(interp, objv[1], &w) != TCL_OK) || 908 (Tcl_GetIntFromObj(interp, objv[2], &h) != TCL_OK)) { 909 return TCL_ERROR; 910 } 911 NanoVis::resizeOffscreenBuffer(w, h); 912 return TCL_OK; 931 Tcl_Obj *const *objv) 932 { 933 Tcl_ObjCmdProc *proc; 934 935 proc = Rappture::GetOpFromObj(interp, nScreenOps, screenOps, 936 Rappture::CMDSPEC_ARG1, objc, objv, 0); 937 if (proc == NULL) { 938 return TCL_ERROR; 939 } 940 return (*proc) (clientData, interp, objc, objv); 913 941 } 914 942 … … 2106 2134 2107 2135 proc = Rappture::GetOpFromObj(interp, nGridOps, gridOps, 2108 Rappture::CMDSPEC_ARG1, objc, objv, 0);2136 Rappture::CMDSPEC_ARG1, objc, objv, 0); 2109 2137 if (proc == NULL) { 2110 2138 return TCL_ERROR; -
trunk/packages/vizservers/nanovis/nanovis.cpp
r3470 r3478 1573 1573 1574 1574 void 1575 NanoVis::setBgColor(float color[3]) 1576 { 1577 TRACE("Setting bgcolor to %g %g %g", color[0], color[1], color[2]); 1578 glClearColor(color[0], color[1], color[2], 1); 1579 } 1580 1581 void 1575 1582 NanoVis::display() 1576 1583 { -
trunk/packages/vizservers/nanovis/nanovis.h
r3463 r3478 81 81 static void initOffscreenBuffer(); 82 82 static void resizeOffscreenBuffer(int w, int h); 83 static void setBgColor(float color[3]); 83 84 static void display(); 84 85 static void draw3dAxis(); -
trunk/packages/vizservers/nanovis/protocol-nanovis.txt
r3362 r3478 43 43 44 44 camera angle <xAngle> <yAngle> <zAngle> 45 ** Deprecated, use camera orient ** 45 46 camera orient <quatW> <quatX> <quatY> <quatZ> 46 47 camera pan <x> <y> 47 48 camera pos <x> <y> <z> 49 camera reset <?all?> 48 50 camera zoom <factor> 49 51 50 screen <width> <height> 51 Set size of rendered images 52 screen bgcolor <r> <g> <b> 53 Set screen background color 54 screen size <width> <height> 55 Set size of rendered images 56 52 57 snapshot 53 Render a 2k x 2k image (offscreen buffer)58 Render a 2k x 2k image (offscreen buffer) 54 59 55 60 transfunc define <name> {colors} {alpha} … … 197 202 Error Replies: 198 203 ================================================================================ 199 Prefixed with "NanoVis Server Error: " 200 Currently not guaranteed to be on a single line 201 ================================================================================ 204 nv>viserror -bytes <nbytes> 205 <multi-line error string of nbytes> 206 ================================================================================
Note: See TracChangeset
for help on using the changeset viewer.