Changeset 4068 for trunk/packages


Ignore:
Timestamp:
Nov 25, 2013, 7:55:07 PM (11 years ago)
Author:
ldelgass
Message:

Make DX reader support a build time option in nanovis

Location:
trunk/packages/vizservers/nanovis
Files:
5 edited

Legend:

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

    r4067 r4068  
    5353#include "CmdProc.h"
    5454#include "FlowCmd.h"
     55#ifdef USE_DX_READER
    5556#include "dxReader.h"
     57#endif
    5658#ifdef USE_VTK
    5759#include "VtkDataSetReader.h"
     
    13231325        }
    13241326    } else {
     1327#ifdef USE_DX_READER
    13251328        // **Deprecated** OpenDX format
    13261329        if ((nBytes > 5) && (strncmp(bytes, "<ODX>", 5) == 0)) {
     
    13401343            return TCL_ERROR;
    13411344        }
     1345#else
     1346        Tcl_AppendResult(interp, "Loading DX files is not supported by this server", (char*)NULL);
     1347        return TCL_ERROR;
     1348#endif
    13421349    }
    13431350
  • trunk/packages/vizservers/nanovis/FlowCmd.cpp

    r4063 r4068  
    182182    Flow *flow = (Flow *)clientData;
    183183    if ((length > 4) && (strncmp(bytes, "<DX>", 4) == 0)) {
     184#ifdef USE_DX_READER
    184185        unirect = new Unirect3d(nComponents);
    185186        if (!unirect->importDx(nComponents, length - 4, bytes + 4)) {
     
    188189            return TCL_ERROR;
    189190        }
     191#else
     192        Tcl_AppendResult(interp, "Loading DX files is not supported by this server", (char*)NULL);
     193        return TCL_ERROR;
     194#endif
    190195    } else if ((length > 10) && (strncmp(bytes, "unirect3d ", 10) == 0)) {
    191196        unirect = new Unirect3d(nComponents);
     
    223228        }
    224229    } else {
     230#ifdef USE_DX_READER
    225231        TRACE("header is %.14s", buf.bytes());
    226232        unirect = new Unirect3d(nComponents);
     
    230236            return TCL_ERROR;
    231237        }
     238#else
     239        Tcl_AppendResult(interp, "Loading DX files is not supported by this server", (char*)NULL);
     240        return TCL_ERROR;
     241#endif
    232242    }
    233243    if (unirect != NULL && unirect->nValues() == 0) {
  • trunk/packages/vizservers/nanovis/Makefile.in

    r4063 r4068  
    33USE_POINTSET_RENDERER   = #yes
    44USE_PARTICLE_SYSTEM     = #yes
     5USE_DX_READER           = yes
    56USE_VTK                 = yes
    67
     
    7778endif
    7879
     80NEED_RAPPTURE2  =
     81ifdef USE_DX_READER
     82NEED_RAPPTURE2  = yes
     83endif
     84ifndef USE_VTK
     85NEED_RAPPTURE2  = yes
     86endif
     87
    7988EXTRA_LIBS      = -lm -lpthread
    8089RP_DIR          =  @RP_DIR@
    81 RP_INC_SPEC     = -I$(RP_DIR)/include -I$(RP_DIR)/include/rappture2
     90RP_INC_SPEC     = -I$(RP_DIR)/include
     91ifdef NEED_RAPPTURE2
     92RP_INC_SPEC     += -I$(RP_DIR)/include/rappture2
     93endif
     94ifdef NEED_RAPPTURE2
    8295RP_LIB_SPEC     = -L$(RP_DIR)/lib -lrappture2 -lrappture -lexpat -lz
     96else
     97RP_LIB_SPEC     = -L$(RP_DIR)/lib -lrappture -lexpat -lz
     98endif
    8399
    84100TCL_LIB_SPEC    = @TCL_LIB_SPEC@
     
    123139ifdef TRACE
    124140DEFINES         += -DWANT_TRACE
     141endif
     142ifdef USE_DX_READER
     143DEFINES         += -DUSE_DX_READER
    125144endif
    126145ifdef USE_THREADS
     
    182201                ZincBlendeVolume.o \
    183202                ZincBlendeVolumeShader.o \
    184                 dxReader.o \
    185203                md5.o \
    186204                nanovis.o \
     
    208226                $(srcdir)/shaders/vertex_std.cg \
    209227                $(srcdir)/shaders/zincblende_volume.cg
     228
     229ifdef USE_DX_READER
     230OBJS +=         dxReader.o
     231endif
    210232
    211233ifdef USE_PARTICLE_SYSTEM
  • trunk/packages/vizservers/nanovis/Unirect.cpp

    r4063 r4068  
    486486}
    487487
     488#ifdef USE_DX_READER
    488489bool
    489490nv::Unirect3d::importDx(size_t nComponents,
     
    630631    return true;
    631632}
     633#endif
    632634
    633635void
  • trunk/packages/vizservers/nanovis/Unirect.h

    r4065 r4068  
    222222    int parseBuffer(Tcl_Interp *interp, const char *bytes, size_t len);
    223223
     224#ifdef USE_DX_READER
    224225    bool importDx(size_t nComponents, size_t length, char *string);
     226#endif
    225227
    226228    bool convert(Unirect2d *dataPtr);
Note: See TracChangeset for help on using the changeset viewer.