Ignore:
Timestamp:
Mar 29, 2008 10:40:15 PM (16 years ago)
Author:
gah
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/vizservers/nanovis/nanovis.cpp

    r955 r973  
    319319// Creates of updates a colormap 1D texture by name.
    320320TransferFunction*
    321 NanoVis::set_transfunc(const char *name, int nSlots, float *data)
     321NanoVis::DefineTransferFunction(const char *name, size_t n, float *data)
    322322{
    323323    int isNew;
     
    327327    hPtr = Tcl_CreateHashEntry(&tftable, name, &isNew);
    328328    if (isNew) {
    329         tf = new TransferFunction(nSlots, data);
    330         Tcl_SetHashValue(hPtr, (ClientData)tf);
     329        tf = new TransferFunction(n, data);
     330        Tcl_SetHashValue(hPtr, (ClientData)tf);
    331331    } else {
    332         tf = (TransferFunction*)Tcl_GetHashValue(hPtr);
    333         tf->update(data);
     332        /*
     333         * You can't delete the transfer function because many
     334         * objects may be holding its pointer.  We must update it.
     335         */
     336        tf = (TransferFunction *)Tcl_GetHashValue(hPtr);
     337        tf->update(n, data);
    334338    }
    335339    return tf;
Note: See TracChangeset for help on using the changeset viewer.