Commit Graph

29 Commits

Author SHA1 Message Date
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
2208303496 Warning fixes for Clang-3.6
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15016 16af8721-9629-0410-8352-f15c8da7e697
2015-07-23 11:11:58 +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
333a16a88d Reverted change of Node::ParentList from being a vector<Node*> back to a vector<Group*> 2014-06-03 09:52:55 +00:00
Robert Osfield
4174d72a52 2014-05-14 10:19:43 +00:00
Robert Osfield
668d351765 Introduced new scheme for handling mouse events with osgViewer. The new scheme enables robust event handling even when using distortion correction render to texture Cameras. 2013-05-03 19:26:27 +00:00
Robert Osfield
b59ab789a3 From Alberto Luacas, typo fixes 2011-07-17 16:24:47 +00:00
Robert Osfield
d18250da59 Replaced .osg with .osgt file usage 2011-06-14 16:54:20 +00:00
Robert Osfield
907a51b198 Replaced usage of depreacted IntersectVisitor with IntersectionVisitor 2008-10-07 14:01:14 +00:00
Robert Osfield
80d5d01698 Fixed moving model bug where the moving model code was looking for a transform with DataVariance set to DYNAMIC, but the scene graph set up code was leaving the setting to default to STATIC. Fix involved setting DataVariance on moving transoforms to DYNAMIC. 2008-03-17 12:23:06 +00:00
Robert Osfield
cc0f1cb0fe From Martin Lavery and Robert Osfield, Updated examples to use a variation of the MIT License 2007-06-12 14:20:16 +00:00
Robert Osfield
5be86601bb Removed old GNUmakefile.inst files 2007-04-10 13:58:18 +00:00
Robert Osfield
2e6ee4bb39 Removed old gmake and VisualStudio build files 2007-04-10 13:10:25 +00:00
Robert Osfield
d9a94f7890 Moved the TARGET_NAME setting into the SETUP_APPLICATION/EXAMPLE macro 2007-03-19 17:18:59 +00:00
Robert Osfield
da64127539 Ran dos2unix on CMakeLists.txt files. 2007-03-19 13:26:34 +00:00
Robert Osfield
be3f61c49f From Luigi Calori, move to using local CMakeLists.txt files and explicit file lists.
From Robert Osfield, small ammendments of the above to seperate example and application installs, and fix the osgPlugins install directory.
2007-03-19 12:30:26 +00:00
Robert Osfield
c4279bd5f1 Ported following examples to osgViewer:
osgparticleeffects
osgphotoalbum
osgpick
osgpoints
osgpointsprite
osgprecipitation
osgprerender
osgprerendercubemap
osgreflect
osgscalarbar
osgscribe
osgsequence
osgplanets
2007-01-10 13:52:22 +00:00
Robert Osfield
96b2b93edc Build fixes 2007-01-08 22:54:02 +00:00
Robert Osfield
d7e3ed3fb2 Updated wrappers 2006-12-27 23:19:37 +00:00
Robert Osfield
41a4aa1548 Added viewer.cleanup_frame() to all examples. 2006-08-02 19:55:03 +00:00
Robert Osfield
a028f59ea0 Added debugging code to help pick out instablilities in osgParticle. Debugging
code now commented out.
2006-02-24 13:57:47 +00:00
Robert Osfield
91855e7c50 Replaced tabs with spaces in examples. 2005-11-17 20:22:55 +00:00
Robert Osfield
1e508d432b Added SmokeTrailEffect which renders created particles as single quad or line
strip, in the case of the quad strip the strip is aligned to the be orthogonal with
the eye point.
2005-10-12 18:42:36 +00:00
Robert Osfield
be285c62c0 Added support for rapid movement of the emitter, with particle now seeding between
the position of the emitter in the previous frame and the new position in the new
frame, the number of particles added also scales up to compensate for this movement.
2005-08-25 14:12:08 +00:00
Robert Osfield
24849f3c70 Renamed ExplosionDebriEffect to ExplosionDebrisEffect 2005-05-25 16:42:36 +00:00
Robert Osfield
538ced579e Removed deprecated API in preparation for 0.9.9 release. 2005-05-09 13:09:07 +00:00
Robert Osfield
6b5238c294 Moved osgParticle across to standard OSG coding style. 2005-04-29 09:47:57 +00:00
Robert Osfield
63e665a131 Added missing makefiles 2005-04-04 11:42:43 +00:00
Robert Osfield
9c5567d3e5 Added osgparticleeffects example 2005-04-04 08:47:21 +00:00