OpenSceneGraph/src/osgTerrain
Robert Osfield 5cd4faf05b From Jason Beverage, "I posted a question on osg users about resources not being properly released when using osgTerrain databases and multiple viewers are used a few weeks ago and I've found that at least part of the problem comes down to the fact that the nodes that are traversed by the GeometryTechnique are never actually added to the scene graph, and thus don't have releaseGLObjects called on them. I'm submitting a few changes that takes care of this by allowing the TerrainTechnique to provide a releaseGLObjects implementation. I've applied these changes in osgEarth and this example program no longer crashes on the second run, although I get corrupt geometry (see attached shot) which could be down to a driver issue. If I increment the context ID for the second viewer, I no longer get the corrupt geometry.
The attached changes are against OpenSceneGraph 2.8.2.

//Sample program.  Run against an osgEarth or VPB database based on osgTerrain.
#include <osgDB/ReadFile>
#include <osgViewer/Viewer>

int main(int argc, char** argv)
{
   osg::ArgumentParser arguments(&argc,argv);

   osgViewer::Viewer* viewer = new osgViewer::Viewer();
   viewer->setUpViewInWindow(100,
100,500,500);
   osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFiles(arguments);
   viewer->setSceneData( loadedModel.get() );
   viewer->run();
   delete viewer;

   viewer = new osgViewer::Viewer();
   viewer->setUpViewInWindow(100,100,500,500);
   loadedModel = osgDB::readNodeFiles(arguments);
   viewer->setSceneData( loadedModel.get() );
   viewer->run();
   delete viewer;
}"
2009-11-20 11:08:40 +00:00
..
CMakeLists.txt From Philip Lowman, "Here's the promised cleanup of the OSG's CMakeLists.txt files for the src/ folder. I'll submit the others separately. 2009-03-23 16:01:02 +00:00
GeometryTechnique.cpp From Jason Beverage, "I posted a question on osg users about resources not being properly released when using osgTerrain databases and multiple viewers are used a few weeks ago and I've found that at least part of the problem comes down to the fact that the nodes that are traversed by the GeometryTechnique are never actually added to the scene graph, and thus don't have releaseGLObjects called on them. I'm submitting a few changes that takes care of this by allowing the TerrainTechnique to provide a releaseGLObjects implementation. I've applied these changes in osgEarth and this example program no longer crashes on the second run, although I get corrupt geometry (see attached shot) which could be down to a driver issue. If I increment the context ID for the second viewer, I no longer get the corrupt geometry. 2009-11-20 11:08:40 +00:00
Layer.cpp From Ross Anderson, "Symptom: The computation of TerrainTiles containing only image layers (no elevation layer) is incorrect. The resulting bounding sphere will always have a radius of zero. 2009-05-18 12:54:23 +00:00
Locator.cpp Fixed the compute of the extents/bounding sphere 2009-08-27 19:25:23 +00:00
Terrain.cpp Added support for a Terrain::s/getTerrainTechniquePrototype() 2008-12-15 22:18:40 +00:00
TerrainTechnique.cpp Reorginized the TerrainTile/TerrainTechnique dirty mechanism so that TerrainTile 2008-05-27 15:30:20 +00:00
TerrainTile.cpp From Jason Beverage, "I posted a question on osg users about resources not being properly released when using osgTerrain databases and multiple viewers are used a few weeks ago and I've found that at least part of the problem comes down to the fact that the nodes that are traversed by the GeometryTechnique are never actually added to the scene graph, and thus don't have releaseGLObjects called on them. I'm submitting a few changes that takes care of this by allowing the TerrainTechnique to provide a releaseGLObjects implementation. I've applied these changes in osgEarth and this example program no longer crashes on the second run, although I get corrupt geometry (see attached shot) which could be down to a driver issue. If I increment the context ID for the second viewer, I no longer get the corrupt geometry. 2009-11-20 11:08:40 +00:00
Version.cpp Unified the setup of version numbers so that they all are based on the version 2007-04-22 20:19:43 +00:00