OpenSceneGraph/include/osgUtil
Robert Osfield 6a67be2e32 Introduced CMake option OSG_PROVIDE_READFILE option that defaults to ON, but when switched to OFF disables the building of the osgDB::read*File() methods,
forcing users to use osgDB::readRef*File() methods.  The later is preferable as it closes a potential threading bug when using paging databases in conjunction
with the osgDB::Registry Object Cache.  This threading bug occurs when one thread gets an object from the Cache via an osgDB::read*File() call where only
a pointer to the object is passed back, so taking a reference to the object is delayed till it gets reassigned to a ref_ptr<>, but at the same time another
thread calls a flush of the Object Cache deleting this object as it's referenceCount is now zero.  Using osgDB::readREf*File() makes sure the a ref_ptr<> is
passed back and the referenceCount never goes to zero.

To ensure the OSG builds when OSG_PROVIDE_READFILE is to OFF the many cases of osgDB::read*File() usage had to be replaced with a ref_ptr<> osgDB::readRef*File()
usage.  The avoid this change causing lots of other client code to be rewritten to handle the use of ref_ptr<> in place of C pointer I introduced a serious of
templte methods in various class to adapt ref_ptr<> to the underly C pointer to be passed to old OSG API's, example of this is found in include/osg/Group:

    bool addChild(Node* child); // old method which can only be used with a Node*

    tempalte<class T> bool addChild(const osg::ref_ptr<T>& child) { return addChild(child.get()); } // adapter template method

These changes together cover 149 modified files, so it's a large submission. This extent of changes are warrent to make use of the Object Cache
and multi-threaded loaded more robust.



git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15165 16af8721-9629-0410-8352-f15c8da7e697
2015-10-22 14:14:53 +00:00
..
ConvertVec Ran script to remove trailing spaces and tabs 2012-03-21 17:36:20 +00:00
CubeMapGenerator Ran script to remove trailing spaces and tabs 2012-03-21 17:36:20 +00:00
CullVisitor Added StateSet::RenderBinMode::PROTECTED_RENDERBIN_DETAILS and OVERRIDE_PROTECTED_RENDERBIN_DETAILS options. 2014-07-30 12:47:16 +00:00
DelaunayTriangulator From Gill Peacegood, "fix for a memory leak in the DelaunayConstraint class" 2013-06-28 14:21:43 +00:00
DisplayRequirementsVisitor Fixed usage of META_NodeVisitor so it doesn't include "" 2013-01-24 18:48:34 +00:00
DrawElementTypeSimplifier Fixed usage of META_NodeVisitor so it doesn't include "" 2013-01-24 18:48:34 +00:00
EdgeCollector Ran script to remove trailing spaces and tabs 2012-03-21 17:36:20 +00:00
Export Ran script to remove trailing spaces and tabs 2012-03-21 17:36:20 +00:00
GLObjectsVisitor Fixed usage of META_NodeVisitor so it doesn't include "" 2013-01-24 18:48:34 +00:00
HalfWayMapGenerator Ran script to remove trailing spaces and tabs 2012-03-21 17:36:20 +00:00
HighlightMapGenerator Ran script to remove trailing spaces and tabs 2012-03-21 17:36:20 +00:00
IncrementalCompileOperation Introduced use of MarkerObject to IncrmentalCompileOperation/DatabasePager as a way of marking objects that have already been processed and compiled, 2014-11-06 10:40:54 +00:00
IntersectionVisitor From Jannik Heller, typo fixes 2015-04-07 18:01:12 +00:00
IntersectVisitor From Jannik Heller, typo fixes 2015-04-07 18:01:12 +00:00
LineSegmentIntersector From Jannik Heller, typo fixes 2015-04-07 18:01:12 +00:00
MeshOptimizers From Tim Moore, "The order_by_primitive_mode comparer was not providing a strict weak 2015-04-20 09:08:56 +00:00
OperationArrayFunctor Ran script to remove trailing spaces and tabs 2012-03-21 17:36:20 +00:00
Optimizer Introduced CMake option OSG_PROVIDE_READFILE option that defaults to ON, but when switched to OFF disables the building of the osgDB::read*File() methods, 2015-10-22 14:14:53 +00:00
PerlinNoise Ran script to remove trailing spaces and tabs 2012-03-21 17:36:20 +00:00
PlaneIntersector From Farshid Lashkari, "Another update. I added a LIMIT_NEAREST enum which implements your previous suggestion of rejecting bounding volumes further from the nearest existing intersection. I only implemented this for LineSegmentIntersector. I'd appreciate it if you could double check the math I added to LineSegmentIntersector::intersects() for checking if the bounding sphere is further away. The results of this are promising. I'm getting noticeable performance increase for line intersections with scenes containing many drawables. 2011-03-14 10:07:15 +00:00
PolytopeIntersector From Leandro Motto Barros, 2012-02-08 10:06:58 +00:00
PositionalStateContainer From Jannik Heller, typo fixes 2015-04-07 18:01:12 +00:00
PrintVisitor Ran script to remove trailing spaces and tabs 2012-03-21 17:36:20 +00:00
RayIntersector From Jannik Heller, typo fixes 2015-04-07 18:01:12 +00:00
ReflectionMapGenerator Ran script to remove trailing spaces and tabs 2012-03-21 17:36:20 +00:00
RenderBin Ran script to remove trailing spaces and tabs 2012-03-21 17:36:20 +00:00
RenderLeaf Ran script to remove trailing spaces and tabs 2012-03-21 17:36:20 +00:00
RenderStage Added Camera::dirtyAttachmentMap(), Camera::s/getAttachmentMapModified() value and usage of this in RenderStage as a new mechanism 2015-03-31 10:36:38 +00:00
ReversePrimitiveFunctor Ran script to remove trailing spaces and tabs 2012-03-21 17:36:20 +00:00
SceneGraphBuilder From Albert Luaces, typo fixes. 2015-06-01 13:40:20 +00:00
SceneView From Giuseppe Donvito, Fixed typo of "CLEAR_GLOBAL_STATESET = 0x16," to indended "CLEAR_GLOBAL_STATESET = "0x10". 2013-09-10 13:29:28 +00:00
ShaderGen Ran script to remove trailing spaces and tabs 2012-03-21 17:36:20 +00:00
Simplifier Fixed usage of META_NodeVisitor so it doesn't include "" 2013-01-24 18:48:34 +00:00
SmoothingVisitor Ran script to remove trailing spaces and tabs 2012-03-21 17:36:20 +00:00
StateGraph From Mikhail Izmestev, "Attached fix to avoid vector reallocs on push_back in StateGraph::moveStateGraph." 2014-06-30 10:13:19 +00:00
Statistics Fixed usage of META_NodeVisitor so it doesn't include "" 2013-01-24 18:48:34 +00:00
TangentSpaceGenerator Ran script to remove trailing spaces and tabs 2012-03-21 17:36:20 +00:00
Tessellator Ran script to remove trailing spaces and tabs 2012-03-21 17:36:20 +00:00
TransformAttributeFunctor Ran script to remove trailing spaces and tabs 2012-03-21 17:36:20 +00:00
TransformCallback Refactored Callback system in osg::Node, osg::Drawable, osg::StateSet and osg::StateAttribute to use a new osg::Callback base class. 2014-06-05 16:26:13 +00:00
TriStripVisitor From Jannik Heller, typo fixes 2015-04-07 18:01:12 +00:00
UpdateVisitor Refactored Callback system in osg::Node, osg::Drawable, osg::StateSet and osg::StateAttribute to use a new osg::Callback base class. 2014-06-05 16:26:13 +00:00
Version Ran script to remove trailing spaces and tabs 2012-03-21 17:36:20 +00:00