Commit Graph

133 Commits

Author SHA1 Message Date
Robert Osfield
d3c6dc6f34 Fixed doxygen warnings 2016-06-01 14:20:14 +01:00
Robert Osfield
dd996a3289 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/trunk@15164 16af8721-9629-0410-8352-f15c8da7e697
2015-10-22 13:42:19 +00:00
Robert Osfield
d14a602a59 From Jannik Heller, typo fixes
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14882 16af8721-9629-0410-8352-f15c8da7e697
2015-06-01 13:11:49 +00:00
Robert Osfield
70b5297575 From Jannik Heller, typo fixes
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14826 16af8721-9629-0410-8352-f15c8da7e697
2015-04-07 18:01:12 +00:00
Robert Osfield
4174d72a52 2014-05-14 10:19:43 +00:00
Robert Osfield
097aedf23c From David Callu, warning fixes and removal of spaces at end of lines. 2013-06-28 12:00:43 +00:00
Robert Osfield
5aa1234fa4 Fixed usage of META_NodeVisitor so it doesn't include "" 2013-01-24 18:48:34 +00:00
Robert Osfield
c0bd5cda99 From Magnus Kessler, typo and documentation fixes 2012-03-29 15:08:15 +00:00
Robert Osfield
14a563dc9f Ran script to remove trailing spaces and tabs 2012-03-21 17:36:20 +00:00
Robert Osfield
695fcda726 Added doxygen comments explaining read file callback functionality. 2011-07-18 12:41:22 +00:00
Robert Osfield
0a48e99a25 From Ulrich Hertlein, "While we're on osgSim/ShapeAttribute, here's a fix that fixes the 'UNKNOW' typo and some
doxygen"
2011-06-24 08:32:25 +00:00
Robert Osfield
e79d51713f Added operator ==, != and < to fix VS build 2011-06-24 08:05:54 +00:00
Robert Osfield
ee7668fe6c From Ulrich Hertlein, build fix for OSX. 2011-06-23 15:42:45 +00:00
Robert Osfield
7455f6265c Fixed warnings.
OpenSceneGraph/src/osgGA/NodeTrackerManipulator.cpp:32:1: warning: base class ?class osg::Object? should be explicitly initialized in the copy constructor
OpenSceneGraph/src/osgGA/TerrainManipulator.cpp:31:1: warning: base class ?class osg::Object? should be explicitly initialized in the copy constructor
OpenSceneGraph/include/osgSim/ShapeAttribute:99:9: warning: base class ?class std::vector<osgSim::ShapeAttribute>? should be explicitly initialized in the copy constructor
OpenSceneGraph/src/osgPlugins/zip/unzip.cpp:3102:14: warning: missing initializer for member ?unz_s::gi?
OpenSceneGraph/src/osgPlugins/zip/unzip.cpp:3102:14: warning: missing initializer for member ?unz_s::byte_before_the_zipfile?
OpenSceneGraph/src/osgPlugins/zip/unzip.cpp:3102:14: warning: missing initializer for member ?unz_s::num_file?
OpenSceneGraph/src/osgPlugins/zip/unzip.cpp:3102:14: warning: missing initializer for member ?unz_s::pos_in_central_dir?
OpenSceneGraph/src/osgPlugins/zip/unzip.cpp:3102:14: warning: missing initializer for member ?unz_s::current_file_ok?
OpenSceneGraph/src/osgPlugins/zip/unzip.cpp:3102:14: warning: missing initializer for member ?unz_s::central_pos?
OpenSceneGraph/src/osgPlugins/zip/unzip.cpp:3102:14: warning: missing initializer for member ?unz_s::size_central_dir?
OpenSceneGraph/src/osgPlugins/zip/unzip.cpp:3102:14: warning: missing initializer for member ?unz_s::offset_central_dir?
OpenSceneGraph/src/osgPlugins/zip/unzip.cpp:3102:14: warning: missing initializer for member ?unz_s::cur_file_info?
OpenSceneGraph/src/osgPlugins/zip/unzip.cpp:3102:14: warning: missing initializer for member ?unz_s::cur_file_info_internal?
OpenSceneGraph/src/osgPlugins/zip/unzip.cpp:3102:14: warning: missing initializer for member ?unz_s::pfile_in_zip_read?
OpenSceneGraph/src/osgViewer/CompositeViewer.cpp:30:1: warning: base class ?class osg::Object? should be explicitly initialized in the copy constructor
OpenSceneGraph/src/osgViewer/View.cpp:159:1: warning: base class ?class osg::Object? should be explicitly initialized in the copy constructor
OpenSceneGraph/src/osgViewer/Viewer.cpp:196:1: warning: base class ?class osg::Object? should be explicitly initialized in the copy constructor
OpenSceneGraph/src/osgViewer/Viewer.cpp:196:1: warning: base class ?class osgViewer::ViewerBase? should be explicitly initialized in the copy constructor
OpenSceneGraph/include/osgManipulator/Dragger:47:9: warning: base class ?class osg::Object? should be explicitly initialized in the copy constructor
2011-06-23 11:09:49 +00:00
Robert Osfield
e36f617d09 Fixed Coverity reported issue.
CID 11815: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _cosMaxElevation is not initialized in this constructor nor in any functions that it calls.
Non-static class member _cosMaxFadeElevation is not initialized in this constructor nor in any functions that it calls.
Non-static class member _cosMinElevation is not initialized in this constructor nor in any functions that it calls.
Non-static class member _cosMinFadeElevation is not initialized in this constructor nor in any functions that it calls.
2011-05-09 10:53:12 +00:00
Robert Osfield
d3d0859b4c From Piotr Gwiazdowski, "So there's config setting OSG_DISABLE_MSVC_WARNINGS which should
disable pragmas that turn off specific warnings for MSVC.
Unfortunately it's presence is only checked in osg/Export header,
making other Export headers disable warnings no matter what, which is
kind of incoherent.

My fix adds #include <osg/Config> to every Export header. I've also
unified checking whether to disable warnings to current osg/Export
way:
#if defined(_MSC_VER) && defined(OSG_DISABLE_MSVC_WARNINGS).

Attachment contains all changed Export files in their original locations."
2011-03-09 14:15:04 +00:00
Robert Osfield
410b4fd109 Converted FrameStamp::g/setFrameNumber from int to uint 2010-12-22 20:11:05 +00:00
Robert Osfield
b9ae28d344 From Eduardo Poyart, OSG patch: made it read ancillary IndexedStrings into MultiSwitch 2010-11-26 17:35:06 +00:00
Robert Osfield
4a0c21a5fc From Wang Rui, serializers for osgSim and osgVolume 2010-05-18 11:00:06 +00:00
Robert Osfield
86f491e649 Replaced use of unsigned int/enum mask combinations with int/enum mask combinations to avoid the need for casting enums to unsigned ints,
and to avoid associated warnings.

Update wrappers to reflect these changes.
2010-03-05 12:55:08 +00:00
Robert Osfield
98bd058317 Fixed warnings 2009-01-07 10:32:59 +00:00
Robert Osfield
8951acabb7 Fixed warning & error 2008-12-19 12:58:50 +00:00
Robert Osfield
8a6e04b84d Introduce NodeVisitor::className and libraryName() 2008-12-17 12:13:15 +00:00
Robert Osfield
315aeeb557 Where possible moved redundent C header includes from headers to source files 2008-12-12 18:47:30 +00:00
Robert Osfield
82318cfd04 Added missing dirtyBound() calls 2008-10-03 08:33:17 +00:00
Robert Osfield
6d9206224d Added call to free in setValue methods to prevent potential memory leak 2008-09-01 10:48:28 +00:00
Robert Osfield
2582e0342a From Mathias Froehilch,"Current include/osgSim/ShapeAttribute also misses string.h include because of
strdup.
Attached is the changed file."
2008-09-01 10:46:50 +00:00
Robert Osfield
2ce8fbdcf9 From Wojciech Lewandowski, "Most recent changes to CameraPathEventHandler change path writing method. Now control points are written on the fly. But default stream precision is not adjusted as it used to and remains set to 6 digits (at least with VS 2008) so larger coordinates like positions on Earth Ellipsoid loose lots of fidelity. This patch fixes this issue.
"
2008-09-01 10:06:19 +00:00
Robert Osfield
6f6f56c795 Improved the doxygen docs over the various namespaces 2008-08-05 19:17:09 +00:00
Robert Osfield
ec9218ad1f Refactored OverlayData so that its possible to subclass OverlayNode/OverlayData. 2008-07-23 22:19:29 +00:00
Robert Osfield
8be3123cbf Converted static const unsigned int definitio to enum. 2008-03-14 12:03:11 +00:00
Robert Osfield
a9740118db From Paul Martz, files for adding ObjectRecordData support into OpenFlight 2008-03-13 15:21:34 +00:00
Robert Osfield
b6f32a3ed0 Added copy operator to ShapeAttribute to prevent problems when assigned them or use within a vector 2007-12-13 12:30:31 +00:00
Robert Osfield
88f3a864ac Updated copyright notices 2007-12-12 16:56:28 +00:00
Robert Osfield
6bb7935dea From Andy Skinner, build fixes for Solaris. 2007-12-12 16:55:13 +00:00
Robert Osfield
f4afa427a7 From Roland Smeenk, "Attached you will find a large set of small typo fixes (mainly in the comments)." 2007-12-10 17:30:18 +00:00
Robert Osfield
9946cb3b24 Added export macro for windows build 2007-12-10 11:20:22 +00:00
Robert Osfield
457d3fd7e4 Removed redundent OpenFlightOptimizer 2007-12-09 16:23:19 +00:00
Robert Osfield
78c1fd4844 From David Callu, added DBase attribute support for shapefiles 2007-12-09 15:43:49 +00:00
Robert Osfield
8e7e6529be From David Callu, warning fixes 2007-09-07 15:03:56 +00:00
Robert Osfield
b20d542317 From David Callu, improved consistency of Version strings and add version support
for osgIntrospection and osgManipulator.
2007-09-05 17:12:24 +00:00
Robert Osfield
4c443bf843 From Brad Christiansen, "I added the ability to set the render target implementaion on the
osgSim::OverlayNode. The attached changes were made against the 2.0
release."
2007-08-13 10:17:18 +00:00
Robert Osfield
cff9188caf Fixed namespace 2007-06-15 16:08:33 +00:00
Robert Osfield
4fce6dee0f Updated wrappers 2007-06-14 21:03:38 +00:00
Robert Osfield
8c727acddc Added new shader support 2007-06-13 19:53:48 +00:00
Robert Osfield
01c1bd28ef Updates to OverlayData 2007-06-01 19:44:09 +00:00
Robert Osfield
a8cae09c30 Added s/getOverlayBaseHeight methods 2007-05-25 16:00:38 +00:00
Robert Osfield
08aabf9312 Fixed const method type 2007-05-21 11:49:37 +00:00
Robert Osfield
78800829ed Refactored the internals of OverlayNode 2007-05-16 14:22:10 +00:00
Robert Osfield
dd1f6982dd Futher work on new view dependent overlay node 2007-05-15 11:22:25 +00:00