Commit Graph

21 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
014f13f774 Refactored ImageSequence to better handle random access usage. 2012-11-08 11:19:31 +00:00
Robert Osfield
77bd6cbfe9 From Stephan Huber and Robert Osfield, addded interactive setting of the ImageSequence::seek() based on the mouse x position. 2012-10-05 10:35:06 +00:00
Robert Osfield
67abc66d8a Added handling of directory names in osgimagesequence commandline.
From Stephan Huber, added support for controlling the ImageSequence seek position via mouse x position, toggled on/off via 'i' key.
2012-09-12 16:35:12 +00:00
Robert Osfield
4d86f8dc79 Added --fps support 2012-06-07 10:08:42 +00:00
Robert Osfield
734463fcc7 Warning fixes 2009-02-03 15:28:53 +00:00
Robert Osfield
418dc34776 Fixed warnings 2009-01-07 11:24:47 +00:00
Robert Osfield
9b1445d5b9 Fixed warnings 2008-12-18 13:56:30 +00:00
Robert Osfield
1f4e712fd8 Improved the ImageSequence::setLength() settting. 2008-10-06 17:03:32 +00:00
Robert Osfield
65cb2e625f Added --page-and-discard, --page-and-retain, --preload and --length command line options 2008-09-22 16:18:02 +00:00
Robert Osfield
260334e4fe Added stats handler 2008-09-22 15:56:22 +00:00
Robert Osfield
4f6b405edf Added support for reading source image file names from the command line. 2008-09-11 09:05:16 +00:00
Robert Osfield
b0cf7823a7 Added playing of the imagesequence on creation of the imagesequence 2008-09-10 11:27:00 +00:00
Robert Osfield
38f6cddc2c Changed osg::ImageSequence::set/getDuration to set/getLength() to be in keeping with the
osg::ImageStream's getLength().
2008-08-15 16:21:44 +00:00
Robert Osfield
927942a0f8 Further work on osg::ImageSequence, improving pause functionality, and introducing new seek(double time) method 2008-08-15 12:45:20 +00:00
Robert Osfield
56001f3d82 Added event handler to toggling looping and play/pause 2008-08-14 16:28:45 +00:00
Robert Osfield
c9dc578186 Added support for pruning old images, recording the Duration in the .osg file, and -o filename output support in osgimagesequence. 2008-07-22 16:44:49 +00:00
Robert Osfield
669d6be0b2 Fixed handling of TextureCubeMap's with mipmapped/ImageSequence/PBO's. 2008-07-22 14:47:59 +00:00
Robert Osfield
041a06b89d Further work on osg::ImageSequence/osgDB::ImagePager 2008-07-21 21:00:57 +00:00
Robert Osfield
acd7e65687 Added basic image sequencing 2008-07-21 17:28:22 +00:00
Robert Osfield
ac61676368 Initial cut of osgimagesequence example 2008-07-21 10:57:06 +00:00