Changeset 2498


Ignore:
Timestamp:
Sep 8, 2011 9:16:13 PM (13 years ago)
Author:
ldelgass
Message:

Fix legend command for when RENDER_TARGA is enabled. Turn down syslog spam.

Location:
branches/vtkvis_threaded
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/vtkvis_threaded/ResponseQueue.cpp

    r2495 r2498  
    4242    }   
    4343    /* 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());
    4545    for (std::list<Response *>::iterator itr = _list.begin();
    4646         itr != _list.end(); ++itr) {
  • branches/vtkvis_threaded/RpVtkRenderServer.cpp

    r2495 r2498  
    243243    Tcl_Interp *interp;
    244244
    245     INFO("starting reader thread");
     245    TRACE("starting reader thread");
    246246    interp = (Tcl_Interp *)queue->clientData();
    247247    vtkSmartPointer<vtkUnsignedCharArray> imgData =
     
    271271    ResponseQueue *queue = (ResponseQueue *)clientData;
    272272
    273     INFO("starting writer thread");
     273    TRACE("starting writer thread");
    274274    for (;;) {
    275275        Response *response;
  • branches/vtkvis_threaded/RpVtkRendererCmd.cpp

    r2496 r2498  
    26952695
    26962696#ifdef DEBUG
     2697# ifdef RENDER_TARGA
    26972698    writeTGAFile("/tmp/legend.tga", imgData->GetPointer(0), width, height,
    26982699                 TARGA_BYTES_PER_PIXEL);
     2700# else
     2701    writeTGAFile("/tmp/legend.tga", imgData->GetPointer(0), width, height,
     2702                 TARGA_BYTES_PER_PIXEL, true);
     2703# endif
    26992704#else
    27002705    char cmd[256];
    27012706    snprintf(cmd, sizeof(cmd), "nv>legend {%s} {%s} %g %g",
    27022707             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
    27082715    ResponseQueue *queue = (ResponseQueue *)clientData;
    27092716    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
    27112723    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
    27152727    return TCL_OK;
    27162728}
     
    48724884 * \brief Execute commands from client in Tcl interpreter
    48734885 *
    4874  *      In this threaded model, the select call is for event compression.  We
    4875  *      want to execute render server commands as long as they keep coming. 
    4876  *      The lets us execute a stream of many commands but render once.  This
    4877  *      benefits camera movements, screen resizing, and opacity changes
    4878  *      (using a slider on the client).  The down side is you don't render
    4879  *      until there's a lull in the command stream.  If the client needs an
    4880  *      image, it can issue a "ppmflush" command.  That breaks us out of the
    4881  *      read loop.
     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.
    48824894 */
    48834895int
     
    49564968{
    49574969    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);
    49784988}
    49794989
Note: See TracChangeset for help on using the changeset viewer.