Commit Graph

30 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
fd806293be From KOS, build fix for osg::Uniform::Callback to osg::UniformCallback change
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14889 16af8721-9629-0410-8352-f15c8da7e697
2015-06-03 09:07:41 +00:00
Robert Osfield
9d5d68d0f0 Fixed compile warnings 2009-12-15 14:45:33 +00:00
Robert Osfield
f75013d534 Introduced new BufferObject design + implementation in preperation of implementing a pool system for buffer objects 2009-10-01 20:19:42 +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
00df23b781 Fixed includes 2007-06-06 16:23:20 +00:00
Robert Osfield
40db1a8934 Moved VBO switching code into inline methods into osg::State to speed performance 2007-05-01 06:28:20 +00:00
Robert Osfield
2929667dc4 Added using of VertexBufferObject and ElementsBufferObject classes 2007-04-26 16:50:35 +00:00
Robert Osfield
2ca0075426 Added --static and --vbo options to allow the user to toggle on/off dynamic updating
of geometry and use of vertex buffer objects.
2007-04-25 15:32:33 +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
c2e79a2d89 Set the DataVariance to DYNAIMC for the StateSet of with the dynamically updating Uniform 2007-02-07 16:27:48 +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
45822caed4 Reverted the experimental shader code 2007-01-15 09:14:36 +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
7155f7d1b0 Various work on osgViewer library, including warp point and graphics window resize support 2007-01-01 18:20:10 +00:00
Robert Osfield
41a4aa1548 Added viewer.cleanup_frame() to all examples. 2006-08-02 19:55:03 +00:00
Robert Osfield
caaecc9f2a Switched off the VBO usage in osgparametric as it was tripping up ATI and 3DLabs drivers. 2005-11-29 08:59:30 +00:00
Robert Osfield
91855e7c50 Replaced tabs with spaces in examples. 2005-11-17 20:22:55 +00:00
Robert Osfield
435e4b828c Fixes for dumb VS6.0 compiler 2005-11-10 19:32:37 +00:00
Robert Osfield
7e858b15f1 From Marco Jez, added Image/ path to image files to help find them from the OpenSceneGraph-Data directory. 2005-11-02 14:24:29 +00:00
Robert Osfield
0a021cf04f From Mike Weiblen, fixes to shaders to correct modification of varying types 2005-06-22 11:26:56 +00:00
Robert Osfield
708b6f5530 Added option for terrain texturing. 2005-06-21 16:10:04 +00:00
Robert Osfield
91106262e8 Added matrix and simple vertex shader paths. 2005-06-21 15:24:23 +00:00
Robert Osfield
88f65c2c24 Combined uniforms. 2005-06-21 15:13:42 +00:00
Robert Osfield
1103911277 Tweaked the vertex program. 2005-06-21 12:12:50 +00:00
Robert Osfield
900739bd7e Added very simply osgparametric example which uses an OpenGL shader program
to create an animated parametric surface.
2005-06-20 21:10:32 +00:00