Changeset 5941


Ignore:
Timestamp:
Dec 6, 2015 11:05:57 PM (8 years ago)
Author:
ldelgass
Message:

Fix for feature highlight

Location:
geovis/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • geovis/trunk/Picker.cpp

    r5939 r5941  
    6161
    6262    // A uniform that will tell the shader which object to highlight:
    63     s_highlightUniform = new osg::Uniform("objectid_to_highlight", 0u);
     63    if (s_highlightUniform == NULL) {
     64        s_highlightUniform = new osg::Uniform("objectid_to_highlight", 0u);
     65    }
    6466    stateSet->addUniform(s_highlightUniform);
    6567}
     
    145147#endif
    146148    }
    147     s_highlightUniform->set(id);
     149    setHighlightByObjectID(id);
    148150}
    149151
     
    163165        _renderer->eventuallyRender();
    164166    }
    165     s_highlightUniform->set(0U);
     167    clearHighlight();
    166168}
    167169
     
    254256        }
    255257    }
    256     s_highlightUniform->set(id);
     258    setHighlightByObjectID(id);
    257259    _renderer->eventuallyRender();
    258260}
     
    262264    INFO("Select miss");
    263265    clearSelection();
    264     s_highlightUniform->set(0U);
     266    clearHighlight();
    265267
    266268    static const char *mesg = "nv>select clear\n";
  • geovis/trunk/Util.h

    r5938 r5941  
    2020public:
    2121    FindFeatureSourceIndexNodeVisitor() :
    22         osg::NodeVisitor(TRAVERSE_ALL_CHILDREN),
     22        osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN),
    2323        source(NULL)
    2424    {
  • geovis/trunk/geovis_protocol.txt

    r5940 r5941  
    150150General form:
    151151map layer add <layerName> <type> <driver> <?url?> <?cache?> ...
    152     <type> = image|elevation|icon|line|point|polygon|text
     152    <type> = image|elevation|feature|icon|line|point|polygon|text
    153153    <driver> = arcgis|colorramp|debug|gdal|ogr|tfs|tms|wcs|wfs|wms|xyz
    154154    <cache> = bool indicating if tiles should be cached on disk
Note: See TracChangeset for help on using the changeset viewer.