From Jean-Sebastien, "In my auto-build today there are 3 errors caused by using a ref_ptr<T> in a function taking a T* when building without the implicit conversion."
This commit is contained in:
parent
410b4fd109
commit
8202ccc679
@ -198,14 +198,14 @@ int main(int argc, char** argv)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
osg::ref_ptr<osgTerrain::Terrain> terrain = findTopMostNodeOfType<osgTerrain::Terrain>(rootnode);
|
osg::ref_ptr<osgTerrain::Terrain> terrain = findTopMostNodeOfType<osgTerrain::Terrain>(rootnode.get());
|
||||||
if (!terrain)
|
if (!terrain)
|
||||||
{
|
{
|
||||||
// no Terrain node present insert one above the loaded model.
|
// no Terrain node present insert one above the loaded model.
|
||||||
terrain = new osgTerrain::Terrain;
|
terrain = new osgTerrain::Terrain;
|
||||||
|
|
||||||
// if CoordinateSystemNode is present copy it's contents into the Terrain, and discard it.
|
// if CoordinateSystemNode is present copy it's contents into the Terrain, and discard it.
|
||||||
osg::CoordinateSystemNode* csn = findTopMostNodeOfType<osg::CoordinateSystemNode>(rootnode);;
|
osg::CoordinateSystemNode* csn = findTopMostNodeOfType<osg::CoordinateSystemNode>(rootnode.get());
|
||||||
if (csn)
|
if (csn)
|
||||||
{
|
{
|
||||||
terrain->set(*csn);
|
terrain->set(*csn);
|
||||||
@ -227,7 +227,7 @@ int main(int argc, char** argv)
|
|||||||
terrain->setBlendingPolicy(blendingPolicy);
|
terrain->setBlendingPolicy(blendingPolicy);
|
||||||
|
|
||||||
// register our custom handler for adjust Terrain settings
|
// register our custom handler for adjust Terrain settings
|
||||||
viewer.addEventHandler(new TerrainHandler(terrain));
|
viewer.addEventHandler(new TerrainHandler(terrain.get()));
|
||||||
|
|
||||||
// add a viewport to the viewer and attach the scene graph.
|
// add a viewport to the viewer and attach the scene graph.
|
||||||
viewer.setSceneData( rootnode.get() );
|
viewer.setSceneData( rootnode.get() );
|
||||||
|
Loading…
Reference in New Issue
Block a user