Changeset 467


Ignore:
Timestamp:
Jun 8, 2006 4:50:10 PM (16 years ago)
Author:
mmc
Message:

Last minute fixes so we can deploy the nanoVIS server:

  • Added monitor.tcl script which monitors nanoscale and restarts as needed.
  • Fixed relative paths for shaders and fonts. All shaders and fonts are

taken from /opt/nanovis/lib

  • Fixed the ordering of data for the nanowire simulator
Location:
trunk/gui/vizservers
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/vizservers/nanoscale/Makefile

    r409 r467  
    22LDFLAGS =
    33TARGETS = server client mycat
     4INSTALL_DIR     = /opt/nanovis
    45
    56all: $(TARGETS)
     7
     8install: server
     9        cp server $(INSTALL_DIR)/bin/nanoscale
    610
    711client: client.o clientlib.o
  • trunk/gui/vizservers/nanovis/Lic.cpp

    r404 r467  
    8989  assert(glGetError()==0);
    9090
    91   m_render_vel_fprog = loadProgram(m_g_context, CG_PROFILE_FP30, CG_SOURCE, "./shaders/render_vel.cg");
     91  m_render_vel_fprog = loadProgram(m_g_context, CG_PROFILE_FP30, CG_SOURCE, "/opt/nanovis/lib/shaders/render_vel.cg");
    9292  m_vel_tex_param_render_vel = cgGetNamedParameter(m_render_vel_fprog, "vel_tex");
    9393  m_plane_normal_param_render_vel = cgGetNamedParameter(m_render_vel_fprog, "plane_normal");
  • trunk/gui/vizservers/nanovis/Makefile

    r455 r467  
    1414TFSRC = ./transfer-function
    1515NANOSCALESRC = ./nanoscale
     16INSTALL_DIR = /opt/nanovis
    1617
    1718LIB_NANOVIS = -ltcl8.3 -L/opt/render/lib -lGL -lglut -lglui -lGLEW -lCg -lCgGL -pthread -lstdc++
     
    2122
    2223all: nanovis
     24
     25install: nanovis
     26        cp nanovis $(INSTALL_DIR)/bin
    2327
    2428clean:
  • trunk/gui/vizservers/nanovis/ParticleSystem.cpp

    r401 r467  
    6666  m_g_context = context;
    6767
    68   m_pos_fprog = loadProgram(m_g_context, CG_PROFILE_FP30, CG_SOURCE, "./shaders/update_pos.cg");
     68  m_pos_fprog = loadProgram(m_g_context, CG_PROFILE_FP30, CG_SOURCE, "/opt/nanovis/lib/shaders/update_pos.cg");
    6969  m_pos_timestep_param  = cgGetNamedParameter(m_pos_fprog, "timestep");
    7070  m_vel_tex_param = cgGetNamedParameter(m_pos_fprog, "vel_tex");
  • trunk/gui/vizservers/nanovis/PlaneRenderer.cpp

    r455 r467  
    3535 
    3636  //plane rendering shader
    37   m_fprog = loadProgram(g_context, CG_PROFILE_FP30, CG_SOURCE, "./shaders/one_plane.cg");
     37  m_fprog = loadProgram(g_context, CG_PROFILE_FP30, CG_SOURCE, "/opt/nanovis/lib/shaders/one_plane.cg");
    3838  m_data_param = cgGetNamedParameter(m_fprog, "data");
    3939  m_tf_param = cgGetNamedParameter(m_fprog, "tf");
  • trunk/gui/vizservers/nanovis/VolumeRenderer.cpp

    r455 r467  
    2727
    2828  init_shaders();
    29   init_font("./font/Font.bmp");
     29  init_font("/opt/nanovis/lib/font/Font.bmp");
    3030}
    3131
     
    3737 
    3838  //standard vertex program
    39   m_vert_std_vprog = loadProgram(g_context, CG_PROFILE_VP30, CG_SOURCE, "./shaders/vertex_std.cg");
     39  m_vert_std_vprog = loadProgram(g_context, CG_PROFILE_VP30, CG_SOURCE, "/opt/nanovis/lib/shaders/vertex_std.cg");
    4040  m_mvp_vert_std_param = cgGetNamedParameter(m_vert_std_vprog, "modelViewProjMatrix");
    4141  m_mvi_vert_std_param = cgGetNamedParameter(m_vert_std_vprog, "modelViewInv");
    4242
    4343  //volume rendering shader
    44   m_one_volume_fprog = loadProgram(g_context, CG_PROFILE_FP30, CG_SOURCE, "./shaders/one_volume.cg");
     44  m_one_volume_fprog = loadProgram(g_context, CG_PROFILE_FP30, CG_SOURCE, "/opt/nanovis/lib/shaders/one_volume.cg");
    4545  m_vol_one_volume_param = cgGetNamedParameter(m_one_volume_fprog, "volume");
    4646  //cgGLSetTextureParameter(m_vol_one_volume_param, _vol->id);
  • trunk/gui/vizservers/nanovis/nanovis.cpp

    r461 r467  
    16391639            double dval;
    16401640            int nread = 0;
     1641            int ixy = 0;
     1642            int iz = 0;
    16411643            while (!fin.eof() && nread < npts) {
    16421644                if (!(fin >> dval).fail()) {
    1643                     field.define(nread++, dval);
     1645                    int nid = nxy*iz + ixy;
     1646                    field.define(nid, dval);
     1647
     1648                    nread++;
     1649                    if (++iz >= nz) {
     1650                        iz = 0;
     1651                        ixy++;
     1652                    }
    16441653                }
    16451654            }
     
    16791688            // generate the uniformly sampled data that we need for a volume
    16801689            int ngen = 0;
    1681             for (int iz=0; iz < nz; iz++) {
     1690            for (iz=0; iz < nz; iz++) {
    16821691                double zval = z0 + iz*dmin;
    16831692                for (int iy=0; iy < ny; iy++) {
     
    18471856                            GL_TEXTURE_2D, final_color_tex, 0);
    18481857
    1849        
    18501858  // initialize final depth renderbuffer
    18511859  glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, final_depth_rb);
     
    19341942
    19351943#ifdef NEW_CG
    1936     m_posvel_fprog = loadProgram(g_context, CG_PROFILE_FP40, CG_SOURCE, "./shaders/update_pos_vel.cg");
     1944    m_posvel_fprog = loadProgram(g_context, CG_PROFILE_FP40, CG_SOURCE, "/opt/nanovis/lib/shaders/update_pos_vel.cg");
    19371945    m_posvel_timestep_param  = cgGetNamedParameter(m_posvel_fprog, "timestep");
    19381946    m_posvel_damping_param   = cgGetNamedParameter(m_posvel_fprog, "damping");
Note: See TracChangeset for help on using the changeset viewer.