Changeset 2498
- Timestamp:
- Sep 8, 2011 9:16:13 PM (13 years ago)
- Location:
- branches/vtkvis_threaded
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/vtkvis_threaded/ResponseQueue.cpp
r2495 r2498 42 42 } 43 43 /* Examine the list and remove any queued responses of the same type. */ 44 INFO("before # of elements is %d\n", _list.size());44 TRACE("before # of elements is %d\n", _list.size()); 45 45 for (std::list<Response *>::iterator itr = _list.begin(); 46 46 itr != _list.end(); ++itr) { -
branches/vtkvis_threaded/RpVtkRenderServer.cpp
r2495 r2498 243 243 Tcl_Interp *interp; 244 244 245 INFO("starting reader thread");245 TRACE("starting reader thread"); 246 246 interp = (Tcl_Interp *)queue->clientData(); 247 247 vtkSmartPointer<vtkUnsignedCharArray> imgData = … … 271 271 ResponseQueue *queue = (ResponseQueue *)clientData; 272 272 273 INFO("starting writer thread");273 TRACE("starting writer thread"); 274 274 for (;;) { 275 275 Response *response; -
branches/vtkvis_threaded/RpVtkRendererCmd.cpp
r2496 r2498 2695 2695 2696 2696 #ifdef DEBUG 2697 # ifdef RENDER_TARGA 2697 2698 writeTGAFile("/tmp/legend.tga", imgData->GetPointer(0), width, height, 2698 2699 TARGA_BYTES_PER_PIXEL); 2700 # else 2701 writeTGAFile("/tmp/legend.tga", imgData->GetPointer(0), width, height, 2702 TARGA_BYTES_PER_PIXEL, true); 2703 # endif 2699 2704 #else 2700 2705 char cmd[256]; 2701 2706 snprintf(cmd, sizeof(cmd), "nv>legend {%s} {%s} %g %g", 2702 2707 colorMapName, title.c_str(), range[0], range[1]); 2703 #ifdef RENDER_TARGA 2704 writeTGA(g_fdOut, cmd, imgData->GetPointer(0), width, height, 2705 TARGA_BYTES_PER_PIXEL); 2706 #else 2707 #ifdef USE_THREADS 2708 2709 # ifdef USE_THREADS 2710 # ifdef RENDER_TARGA 2711 ResponseQueue *queue = (ResponseQueue *)clientData; 2712 queueTGA(queue, cmd, imgData->GetPointer(0), width, height, 2713 TARGA_BYTES_PER_PIXEL); 2714 # else 2708 2715 ResponseQueue *queue = (ResponseQueue *)clientData; 2709 2716 queuePPM(queue, cmd, imgData->GetPointer(0), width, height); 2710 #else 2717 # endif 2718 # else 2719 # ifdef RENDER_TARGA 2720 writeTGA(g_fdOut, cmd, imgData->GetPointer(0), width, height, 2721 TARGA_BYTES_PER_PIXEL); 2722 # else 2711 2723 writePPM(g_fdOut, cmd, imgData->GetPointer(0), width, height); 2712 # endif /*USE_THREADS*/2713 # endif /*RENDER_TARGA*/2714 #endif / *DEBUG*/2724 # endif 2725 # endif // USE_THREADS 2726 #endif // DEBUG 2715 2727 return TCL_OK; 2716 2728 } … … 4872 4884 * \brief Execute commands from client in Tcl interpreter 4873 4885 * 4874 * 4875 * 4876 * Thelets us execute a stream of many commands but render once. This4877 * 4878 * 4879 * 4880 * 4881 * 4886 * In this threaded model, the select call is for event compression. We 4887 * want to execute render server commands as long as they keep coming. 4888 * This lets us execute a stream of many commands but render once. This 4889 * benefits camera movements, screen resizing, and opacity changes 4890 * (using a slider on the client). The down side is you don't render 4891 * until there's a lull in the command stream. If the client needs an 4892 * image, it can issue a "ppmflush" command. That breaks us out of the 4893 * read loop. 4882 4894 */ 4883 4895 int … … 4956 4968 { 4957 4969 Tcl_MakeSafe(interp); 4958 Tcl_CreateObjCommand(interp, "axis", AxisCmd, clientData, NULL); 4959 Tcl_CreateObjCommand(interp, "camera", CameraCmd, clientData, NULL); 4960 Tcl_CreateObjCommand(interp, "colormap", ColorMapCmd, clientData, NULL); 4961 Tcl_CreateObjCommand(interp, "contour2d", Contour2DCmd, clientData, NULL); 4962 Tcl_CreateObjCommand(interp, "contour3d", Contour3DCmd, clientData, NULL); 4963 Tcl_CreateObjCommand(interp, "dataset", DataSetCmd, clientData, NULL); 4964 Tcl_CreateObjCommand(interp, "glyphs", GlyphsCmd, clientData, NULL); 4965 Tcl_CreateObjCommand(interp, "heightmap", HeightMapCmd, clientData, NULL); 4966 Tcl_CreateObjCommand(interp, "legend", LegendCmd, clientData, NULL); 4967 Tcl_CreateObjCommand(interp, "lic", LICCmd, clientData, NULL); 4968 Tcl_CreateObjCommand(interp, "molecule", MoleculeCmd, clientData, NULL); 4969 Tcl_CreateObjCommand(interp, "polydata", PolyDataCmd, clientData, NULL); 4970 Tcl_CreateObjCommand(interp, "ppmflush", PpmFlushCmd, clientData, NULL); 4971 Tcl_CreateObjCommand(interp, "pseudocolor", PseudoColorCmd, clientData, 4972 NULL); 4973 Tcl_CreateObjCommand(interp, "renderer", RendererCmd, clientData, NULL); 4974 Tcl_CreateObjCommand(interp, "screen", ScreenCmd, clientData, NULL); 4975 Tcl_CreateObjCommand(interp, "streamlines", StreamlinesCmd, clientData, 4976 NULL); 4977 Tcl_CreateObjCommand(interp, "volume", VolumeCmd, clientData, NULL); 4970 Tcl_CreateObjCommand(interp, "axis", AxisCmd, clientData, NULL); 4971 Tcl_CreateObjCommand(interp, "camera", CameraCmd, clientData, NULL); 4972 Tcl_CreateObjCommand(interp, "colormap", ColorMapCmd, clientData, NULL); 4973 Tcl_CreateObjCommand(interp, "contour2d", Contour2DCmd, clientData, NULL); 4974 Tcl_CreateObjCommand(interp, "contour3d", Contour3DCmd, clientData, NULL); 4975 Tcl_CreateObjCommand(interp, "dataset", DataSetCmd, clientData, NULL); 4976 Tcl_CreateObjCommand(interp, "glyphs", GlyphsCmd, clientData, NULL); 4977 Tcl_CreateObjCommand(interp, "heightmap", HeightMapCmd, clientData, NULL); 4978 Tcl_CreateObjCommand(interp, "legend", LegendCmd, clientData, NULL); 4979 Tcl_CreateObjCommand(interp, "lic", LICCmd, clientData, NULL); 4980 Tcl_CreateObjCommand(interp, "molecule", MoleculeCmd, clientData, NULL); 4981 Tcl_CreateObjCommand(interp, "polydata", PolyDataCmd, clientData, NULL); 4982 Tcl_CreateObjCommand(interp, "imgflush", PpmFlushCmd, clientData, NULL); 4983 Tcl_CreateObjCommand(interp, "pseudocolor", PseudoColorCmd, clientData, NULL); 4984 Tcl_CreateObjCommand(interp, "renderer", RendererCmd, clientData, NULL); 4985 Tcl_CreateObjCommand(interp, "screen", ScreenCmd, clientData, NULL); 4986 Tcl_CreateObjCommand(interp, "streamlines", StreamlinesCmd, clientData, NULL); 4987 Tcl_CreateObjCommand(interp, "volume", VolumeCmd, clientData, NULL); 4978 4988 } 4979 4989
Note: See TracChangeset
for help on using the changeset viewer.