Commit Graph

36 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
70b5297575 From Jannik Heller, typo fixes
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14826 16af8721-9629-0410-8352-f15c8da7e697
2015-04-07 18:01:12 +00:00
Robert Osfield
455ebbc5f1 Refactored the support for stereo and keystone RTT setup so that it can be applied to an existing Camera. 2013-05-20 19:24:34 +00:00
Robert Osfield
6cb26321a9 Reverted back to changes before experiements with ViewConfig 2013-05-16 14:07:35 +00:00
Robert Osfield
3b6c2b636a Renamed osgViewer::Config osgViewer::ViewConfig and moved it's declaration into include/osgViewer. 2013-05-16 10:11:06 +00:00
Robert Osfield
e3ed763c15 Added WoWVxDisplay view config 2013-05-16 09:08:27 +00:00
Robert Osfield
625821a91a Created a dedicated include/osgViewer/config and src/osgViewer/config directories to place all the Config classes. 2013-05-15 16:15:38 +00:00
Robert Osfield
4e34cadee2 Added to Viewer::realize() automatic setup using Keystone when available and enabled, and when no other window setup has been selected. 2013-05-13 09:18:37 +00:00
Robert Osfield
9402efe38e Added DisplaySettings::KeystoneHint flag that can be set via --keystone-on and --keystone-off command line parameters, and the OSG_KEYSTONE env var 2013-05-10 17:59:07 +00:00
Robert Osfield
5dd07e4d1c Added keystone file handling 2013-05-10 16:06:10 +00:00
Robert Osfield
9eb5465ff5 Added --keystone <filename> command line support into DisplaySettings, and added OSG_KEYSTONE_FILES env var support into osg::DisplaySettings. 2013-05-10 11:56:09 +00:00
Robert Osfield
9c1c34d765 Moved Keystone support from osgkeystone example into osgViewer::View 2013-05-10 10:00:38 +00:00
Robert Osfield
e545627571 Moved Keystone class into osgViewer library. 2013-05-09 15:18:14 +00:00
Robert Osfield
046c3fca7a Cleaned up event handler and namespaces in prep for integrating keystone functionality into osgViewer 2013-05-07 14:43:36 +00:00
Robert Osfield
8810d27f7c Added keystone support for left eye, right eye and quad buffer stereo 2013-05-07 13:34:47 +00:00
Robert Osfield
9bb4ed08e1 Added keystone setup to vertical split stereo suport and cleaned up the horizontal split stereo code 2013-05-07 11:13:50 +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
a2615388db Refactored Keystone setup as a step toward integrating Keystone correction with stereo 2013-04-18 17:02:57 +00:00
Robert Osfield
adea6c9329 Implemented stereo support into osgkeystone as a testbed for moving stereo support from SceneView into osgViewer 2013-04-18 09:47:28 +00:00
Robert Osfield
65f23ba9af Implemented initial cut of anaglyphic stereo 2013-04-17 11:04:12 +00:00
Robert Osfield
bc288d23dc Added support for enable/disabling the keystone editing using the Ctrl-g key to toggle the UI and grid on/off. 2013-04-12 13:01:51 +00:00
Robert Osfield
efbf05cd59 Moved keystone event handler onto the keystone distortion Camera. 2013-04-12 09:05:11 +00:00
Robert Osfield
835a80ae90 Refactoed the grid rendering so that it's now implemented as part of the distortion mesh pass, leaving the main scene graph alone. 2013-04-12 08:52:21 +00:00
Robert Osfield
f79d89e0ce Add support for a finer grained mesh on the distortion mesh for higher quality results. 2013-04-11 17:12:32 +00:00
Robert Osfield
7ff4be954b Moved the keystone geometry computation into a Keystone::compute3DPositions(..) method 2013-04-11 16:07:49 +00:00
Robert Osfield
830d21471b Removed old experimental keystone code to clean up the example 2013-04-10 16:36:49 +00:00
Robert Osfield
18d14065a5 Changed the way that the keystone geometry is calculated. 2013-03-28 10:46:24 +00:00
Robert Osfield
3cccecb79d Added keypad control of corner points 2013-03-27 16:29:01 +00:00
Robert Osfield
b1c342c027 Introduced shearing of the image 2013-03-26 16:47:52 +00:00
Robert Osfield
a5cea75d47 Improved the setup of the keystone distortion correction mesh. 2013-03-26 11:00:05 +00:00
Robert Osfield
6c723df2d6 Added keystone grid to aid editing 2013-03-21 11:35:21 +00:00
Robert Osfield
bc3cff2406 Added arrow key support. Added support for using ctrl and shift keys to modulate how senstive the mouse and key movement is when modifying the keystone parameters. 2013-03-20 14:03:28 +00:00
Robert Osfield
7aad7dfd78 Improve corner point tracking/keystone computation 2013-03-19 16:43:27 +00:00
Robert Osfield
1dba64ac6c Added event handle for interactive setting of keystone variables 2013-03-19 12:44:03 +00:00
Robert Osfield
890ecb6abb Experiments with modifying the projection matrix to provide keystoning. 2013-03-15 17:35:43 +00:00
Robert Osfield
ab55668ff3 Initial skeleton of new osgkeystone example 2013-03-14 16:24:22 +00:00