Commit Graph

27 Commits

Author SHA1 Message Date
Alberto Luaces
bc4f181d41 Fix typos and spelling. 2018-04-20 18:18:22 +02: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
4b9aa1fd24 Replaced deprecated osg::Geometry::set*Binding() usage. 2013-06-27 09:54:12 +00:00
Robert Osfield
d18250da59 Replaced .osg with .osgt file usage 2011-06-14 16:54:20 +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
ce0f30cfcb From Martin Lavery and Robert Osfield, added fallbacks for when now command line args are provided. 2007-06-08 15:37:20 +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
dfb21cb81a Ported following examples to osgViewer:
osggeodemo
    osggeometry
    osghud
    osgimpostor
    osgkeyboard
    osglauncher
    osglight
    osglightpoint
    osglogicop
    osglogo
    osgmovie
    osgmultiplecameras
    osgmultitexture
    osgoccluder
    osgparametric
    osgparticle
2007-01-08 10:00:16 +00:00
Robert Osfield
41a4aa1548 Added viewer.cleanup_frame() to all examples. 2006-08-02 19:55:03 +00:00
Robert Osfield
91855e7c50 Replaced tabs with spaces in examples. 2005-11-17 20:22:55 +00:00
Robert Osfield
8d5aa5644d Added X_INC into the Make/makedefs and changed the *GNUmakefile* to use it. 2003-08-18 10:58:30 +00:00
Don BURNS
49a93076c1 Removed references to PRODUCER_INCLUDE_DIR and PRODUCER_LIB_DIR in the
local makefiles.

Small change in txp loader for sun build
2003-07-25 23:49:03 +00:00
Don BURNS
15f88f35b2 *** empty log message *** 2003-06-24 15:40:09 +00:00
Robert Osfield
0036018507 Added -I/usr/X11R6/include to osgProducer and all the examples GNUMakefiles.
From Bob, mods to GNUMakefile and Make/makedefs for the extra includes for
freetype.
2003-04-14 19:39:22 +00:00
Robert Osfield
2e87dcd804 Added desciptions to all the demos. 2003-04-09 11:44:32 +00:00
Robert Osfield
e928bca4c9 Changed the Viewer::realize() calls across to not using the threading paramter
leaving it up to the Viewer to specify the mode (which by default is MultiThreaded).
Added a check for the presence of osgParticle systems so that threading is
disabled in this case.
2003-04-08 15:18:45 +00:00
Robert Osfield
49a28660dc Added the usage report to the examples for when no arguments are passed
to the examples.
2003-04-06 21:32:44 +00:00
Robert Osfield
a3d676c10b Added -osgText to GNUMakefiles. 2003-03-27 13:51:40 +00:00
Robert Osfield
35e0ba12bc Added a viewer.sync to the end of all the demos.
Removed the Win32 remapping of keycodes from the osgProducer::EventAdapter.
2003-03-25 10:05:09 +00:00
Robert Osfield
8ed643ca24 Chaned the OsgCameraGroup so that its scene handler list used ref_ptr<> for
robustly managing memory.
2003-03-18 20:27:09 +00:00
Don BURNS
ced920030a Added -losgGA to all GNUmakefiles in examples.
Added one std:: in front of an endl in osgunittests.cpp
2003-03-15 08:01:41 +00:00
Robert Osfield
7083773b64 Ported osgGLUT based src/Demos across to being osgProducer based, and placed
them in the new examples/ directory.
2003-03-14 20:35:45 +00:00