Commit Graph

36 Commits

Author SHA1 Message Date
Alberto Luaces
260cbab518 Typo fixes 2016-05-30 12:30:05 +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
02beb8c74a Added support for user defined clipping of the precipitation effect, to test use:
osgpreciptation lz.osg --clip 20
2008-12-19 16:13:19 +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
7232a831da Added osg::FrameStamp::set/getSimulationTime().
Added setting of osg_SimulationTime and osg_DeltaSimulationTime to the uniforms set by SceneView

Added frame(double simulationTime) and advance(double simulationTime) parameters to
osgViewer::SimpleViewer, Vewer and CompositeViewer.

Updated various examples and Nodes to use SimulationTime where appropriate.
2007-01-25 12:02:51 +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
41a4aa1548 Added viewer.cleanup_frame() to all examples. 2006-08-02 19:55:03 +00:00
Robert Osfield
f1c2694c17 Updated copyright years. 2006-07-18 15:21:48 +00:00
Robert Osfield
475f526b3d Added UseFarLineSegments option 2006-04-25 12:56:33 +00:00
Robert Osfield
039457700d Implemented seemless update of precipitation properties. 2006-04-25 12:39:00 +00:00
Robert Osfield
10f2feeac5 Moved PrecipitationParameters directly into PrecipitationEffect. 2006-04-24 16:21:10 +00:00
Robert Osfield
49a5ef9ee1 Added support for wind. 2006-04-24 06:36:26 +00:00
Robert Osfield
e8fa0433b3 Moved PrecipitationEffect node into osgParticle. 2006-04-22 15:08:07 +00:00
Robert Osfield
1cf1710f92 Moved PrecipitationDrawable into PrecipitationEffect. 2006-04-22 06:33:01 +00:00
Robert Osfield
c144977b6e Added new precipitation nodes. 2006-04-21 19:39:05 +00:00
Robert Osfield
a00455b4ff Convertered shaders across to using modelview matrix instead of uniforms. 2006-04-19 13:04:21 +00:00
Robert Osfield
832c22fe9e Standardised the bin number of the particle effects 2006-04-17 19:10:06 +00:00
Robert Osfield
453243ed8c Added inline shaders so that the tha example can be run from any directory. 2006-04-14 16:44:12 +00:00
Robert Osfield
6f20b47c23 Further tweaks to settings to improve performance at mid intensity ranges 2006-04-14 15:03:36 +00:00
Robert Osfield
839fb12098 Refined the default settings for rain and snow to achieve better framerates. 2006-04-14 14:24:12 +00:00
Robert Osfield
fd838f5787 Added fog parameters settings. 2006-04-14 11:04:11 +00:00
Robert Osfield
f1b52fbd0a Added --numberOfParticles, --numberOfCellsX, --numberOfCellsY, --numberOfCellsZ, --boundingBox, --fogEnd and --fogDensity controls 2006-04-13 20:21:55 +00:00
Robert Osfield
264ae12770 Added command line options and various speed improvements. 2006-04-13 19:05:26 +00:00
Robert Osfield
7747971b6a Implement positioning of cells via vertex attribute. 2006-04-12 11:59:07 +00:00
Robert Osfield
19a1d83f33 Moved common uniforms to top of precipitation subgraph.
Added a run of the SpatializeGroupVisitor to create a balanced subgraph.

Changed the quad to particle transistion distance from 100 to 50m.
2006-04-12 09:42:25 +00:00
Robert Osfield
3be10b5a2a Added support for LOD's with transistion between quads and point rendering. 2006-04-11 19:56:53 +00:00
Robert Osfield
9faf5f9496 Added support for point sprite particle effects. 2006-04-11 13:22:59 +00:00
Robert Osfield
e15c67b9cd Added point and line paths. 2006-04-11 10:53:46 +00:00
Robert Osfield
abfda5e38a Added mipmap generation. 2006-04-07 19:54:44 +00:00
Robert Osfield
5335b45146 Added quad based rain effect 2006-04-07 18:24:52 +00:00
Robert Osfield
051f2a5eb9 Added beginings osgprecipitation example. 2006-04-05 15:13:17 +00:00