Commit Graph

41 Commits

Author SHA1 Message Date
Robert Osfield
304c048d84 Fixed shadows warnings 2016-05-26 10:24:44 +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
0dd625f17e Added explicit initialization of osg::Referenced(true) to osg::Operation subclasses as it uses virtual inhertiance from osg::Referenced.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15025 16af8721-9629-0410-8352-f15c8da7e697
2015-07-23 15:46:47 +00:00
Robert Osfield
d18250da59 Replaced .osg with .osgt file usage 2011-06-14 16:54:20 +00:00
Robert Osfield
a0eba771e8 Updated wrappers 2009-10-16 17:22:20 +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
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
cc3d3c6d4c Added setDataVariance(DYNAMIC) to the scores text entires to prevent the
DrawThreadPerContext for crashing due to double buffering of dynamic data.
2007-02-13 11:32:28 +00:00
Robert Osfield
69da91620f Convert GraphicsThread/GraphicsOperation to more generic OperationsThread/Operation.
This paves the way to running cull traversals in seperate threads.

Updated wrappers
2007-02-02 22:30:36 +00:00
Robert Osfield
44dceef503 Added use of Viewe Realize graphics operation. 2007-01-28 17:12:57 +00:00
Robert Osfield
b121c9686f Ported following examples to osgViewer:
osgteapot
osgtessellate
osgtext
osgtexture1D
osgtexture2D
osgtexture3D
osgtexturerectangle
osgvertexprogram
osgvolume
osgwindows
osgsimple
osgkeyboardmouse
2007-01-11 15:19:59 +00:00
Robert Osfield
a42633a9ee Tweaked comments 2007-01-05 13:06:11 +00:00
Robert Osfield
abdb1741a4 Removed the setting of thread safe ref/unref and max number of graphics contexts
as this is now done automatically by osgViewer::Viewer
2007-01-04 21:18:44 +00:00
Robert Osfield
73fffe1800 Made Refernced::setThreadSafeReferenceCounting(bool) a virtual then overrode
this in various scene graph classes to ensure that the scene graph gets
updated as well as the objects that the initialial call is made from.
2007-01-04 16:49:58 +00:00
Robert Osfield
eb3ef906e7 Removed setting of master camera colour 2007-01-03 17:25:09 +00:00
Robert Osfield
b315ed4d58 Shifted the setting of thread safe ref/unref to earlier in the main to
ensure that the Viewer's view is set up thread safe.
2007-01-02 13:02:30 +00:00
Robert Osfield
d068f7025a Added support for getting all windows and hiding the cursor 2007-01-02 12:50:57 +00:00
Robert Osfield
db7df9d6d4 Switched off lighting in osgcatch. 2007-01-02 12:19:26 +00:00
Robert Osfield
92291f29b7 Ported osgcatch to use osgViewer 2006-12-26 17:35:45 +00:00
Robert Osfield
d40e12a27b Removed deprecated GUIEventHandler method 2006-10-05 14:32:39 +00:00
Robert Osfield
41a4aa1548 Added viewer.cleanup_frame() to all examples. 2006-08-02 19:55:03 +00:00
Robert Osfield
9b0b98200f Force SingelThreaded usage due to use of osgParticle. 2006-07-25 20:43:57 +00:00
Robert Osfield
b03a772846 Added mutexes to RealizeCallbaks 2006-07-19 13:02:35 +00:00
Robert Osfield
f1c2694c17 Updated copyright years. 2006-07-18 15:21:48 +00:00
Robert Osfield
1c2deb253a Build fixes to cope with changes to Producer/osgProducer. 2006-03-30 10:20:11 +00:00
Robert Osfield
dbbabf87c6 Converted osgGA::GUIEventAdapter into a concrete class capable of respresenting
keyboard and mouse events.

Added osgGA::EventQueue class to support a thread safe event queue and adaption
of keyboard and mouse events.

Removed osgProducer::EventAdapter as GUIEventAdapter replaces it.

Adapted osgProducer and examples to work with the new changes to osgGA.
2006-03-08 14:09:47 +00:00
Robert Osfield
24849f3c70 Renamed ExplosionDebriEffect to ExplosionDebrisEffect 2005-05-25 16:42:36 +00:00
Robert Osfield
3ac091bb25 Changed .png files to .jpg to help save space in OpenSceneGraph-Data. 2005-05-22 20:30:30 +00:00
Robert Osfield
f1ef59b757 Added scoring, welcome page, you've lost and you've won pages. 2005-05-22 20:19:26 +00:00
Robert Osfield
a76e9c83c4 Added support for multiple levels, and exit on lose of all lives or on finishng
the highest level.
2005-05-21 21:19:11 +00:00
Robert Osfield
3d4e2fa4f3 Updates to osgcatch game to allow different types of falling objects 2005-05-21 12:57:28 +00:00
Robert Osfield
8d1c407a9a Small tweaks 2005-04-20 19:53:07 +00:00
Robert Osfield
67ba3c94c9 Added #if block for swith between imagery 2005-04-12 19:28:37 +00:00
Robert Osfield
493bcdd694 Fixed bug 2005-04-12 19:17:01 +00:00
Robert Osfield
3bdfbbe70f Further work on kiddies game. 2005-04-10 21:25:37 +00:00
Robert Osfield
b82f0376b7 Beginnings of litte kiddies game example, written in collaboration with my
5 year old daughter who is the game designer and artist on this little task :)
2005-04-06 20:54:36 +00:00