Commit Graph

2581 Commits

Author SHA1 Message Date
Robert Osfield
ee9b23f670 Fixed set method 2008-07-08 18:02:09 +00:00
Robert Osfield
2851429333 Added optional control of whether to use KdTrees for intersections 2008-07-08 17:35:10 +00:00
Robert Osfield
134c86c2d5 Implement hierachy culling in KdTree::intersect(..) 2008-07-07 20:27:56 +00:00
Robert Osfield
d05236bfb4 Implemented intial KdTree triangle intersection code, but without culling implemented 2008-07-07 13:21:37 +00:00
Robert Osfield
682be50e2a Changed types to avoid warnings under Windows 2008-07-07 09:40:30 +00:00
Robert Osfield
c4e8d6ee42 Changed the DatabasePager so that it bypasses the Registry::readNode() method and calls
readNodeImplementation() directly to avoid calling the KdTreeBuilder.   

Updated wrappers.
2008-07-06 18:27:10 +00:00
Robert Osfield
3965fe357b Moved KdTree build code into osg::KdTree 2008-07-06 12:14:19 +00:00
Robert Osfield
9a9c543ffa Ported intersection code to use new osgUtil::LineSegmentIntersector/IntersectionVisitor. 2008-07-05 16:39:28 +00:00
Robert Osfield
e70e3a6d5d Converted TerrainManipulator to use osgUtil::InterectionVisitor rather than the
old IntersectVisitor
2008-07-04 19:16:19 +00:00
Robert Osfield
44d144997e Added prelimnary KdTree data structure and automatic kdtree build support
into osgDB::Registry/osgTerrain so that newly created subgraphs can have 
KdTree built on all osg::Geometry automatically on load/creation.
2008-07-04 15:57:48 +00:00
Robert Osfield
bc1032653c Moved vertex indicies method into a single block with deprecated doc lines 2008-07-04 11:51:55 +00:00
Robert Osfield
201522feb3 Introduced support for UNSCPECIFIED and STATIC DataVariance of StateSet/Textures 2008-07-02 09:25:08 +00:00
Robert Osfield
5e0169f664 Changed the Optimizer::StateVisitor so that it can individually decide whether
to optimize away duplicate state with dynamic, static and unspecified DataVarience.  By default
the code now optimizes away duplicate state with either static and unspecied state, previously 
it was just handling static state.
2008-06-29 12:22:50 +00:00
Robert Osfield
fec2a8fabe Changed back to use an std::vector<> rather than a std::list for RequestQueue to
avoid member template problems under Solaris.
2008-06-27 19:40:52 +00:00
Robert Osfield
a9b05e0815 Refactored the sort of the requestQueue so that there is single code path for doing the sort. 2008-06-27 18:59:27 +00:00
Robert Osfield
1057d74a11 Simplified the MixinVector class so that it no longer supports custom allocators,
instead just uses std::vector<>'s default allocators.
2008-06-27 12:44:41 +00:00
Robert Osfield
34f58482e6 Moved the apply(&) default implementations from the header into the NodeVisitor.cpp,
and changed the casts to use static_cast<>.
2008-06-27 12:35:56 +00:00
Robert Osfield
9a80c331a2 From Andre Normann, "with version 8504, I am not able to compile osgwrappers under Windows, because there are some DLL export macros missing. I fixed it and put the files in the attached zip file.
"
2008-06-27 10:17:38 +00:00
Robert Osfield
260d0d384f From Mathias Froehlich, build fixes for various unices 2008-06-26 12:08:37 +00:00
Robert Osfield
5a4ce5a387 From Mathias Froechlich, "Attached is a change to that atomic stuff to move the win32, msvc
implementation of the atomic increment and decrement into a implementation
file.
This way inlining and compiler optimization can no longer happen for these
implementations, but it fixes compilation on win32 msvc targets. I expect
that this is still faster than with with mutexes.

Also the i386 gcc target gets atomic operations with this patch. By using an
implementation file we can guarantee that we have the right compiler flags
available."
2008-06-26 10:27:16 +00:00
Robert Osfield
37765805ff Fixed pedantic warning 2008-06-23 15:11:37 +00:00
Robert Osfield
0b6e605795 From Mathias Froehlich, "fixed win32/win64 configure check and win32/win64
atomic related compile failures with msvs2005. Attached changes to make win32
really use the atomic stuff. There are pointer typecast problems and some
historic alignment restrictions that I just took from a previous similar
implementation of mine without looking deep enough. "
2008-06-23 14:51:34 +00:00
Robert Osfield
af271f99ec Added support for X11's overrideRedirect functionality 2008-06-21 17:50:58 +00:00
Robert Osfield
a71939c5bb From Mathias Froehlich, moved optional config variables into include/osg/Config file that
is automatically created by cmake according to its own settings.
2008-06-20 15:50:53 +00:00
Robert Osfield
be185cb3af From Terry Welsh, new flatten static transforms visitor that duplicates subgraphs that are shared beneath differnt static transforms
From Robert Osfield, made a range of changes to Terry's visitor integrating it into osgUtil::Optimizer and 
changing the code to use a style more like the rest of the OSG.
2008-06-20 13:16:35 +00:00
Robert Osfield
bc6e5b5da2 Updated version numbers for dev releases 2008-06-20 11:11:47 +00:00
Robert Osfield
3672ba51e7 From Melchior Franz, fixed typo on variable name 2008-06-20 09:46:45 +00:00
Robert Osfield
2011028ee7 From Neil Groves,
"I have taken the liberty of updating a few files so that there is no longer any derivation from std::vector. I have done this by adding a new file osg/MixinVector and by updating only two others: osg/PrimitiveSet and osg/Array. You will notice that this actually removes what is acknowledged as a \u2018hack\u2019 in osg/PrimitiveSet.

With the original code I did manage to find memory leaks with some compiler options on VC 8 and 9, as well as Intel compiler. I determined the leak existence by instrumenting the destructor code, and by use of a garbage collector as a leak detector (in a similar manner to the Firefox project). Hence in contrast to what I said originally, it is exhibiting symptoms on at least some platforms.

Since I am trying to be a good OSG citizen I got out my editor and started hacking! I have built and tested on Linux (Ubuntu) with GCC 4.x and Windows VC 8 SP1. It appears that nothing is broken, and that I\u2019m using less memory J"
2008-06-19 20:38:38 +00:00
Robert Osfield
936edacc92 From Mathias Froehlich, added support for using OpenThreads::Atomic for thread safe ref/unref. 2008-06-19 17:30:38 +00:00
Robert Osfield
0faaf93dc2 From Adrian Egli, "Improvements to the PSSM implementation" 2008-06-19 14:45:54 +00:00
Robert Osfield
dd13893861 From Farshid Lashkari, "I noticed some problems when setting up CameraNodes that inherit
viewport settings in stereo mode. It seems that the SceneView::cull()
method will pass the full size viewport to the left/right
cullvisitors, instead of the modified stereo viewport. I made quite a
few changes to SceneView to fix the issue. The SceneView::cullStage()
method will now receive the viewport as an argument, instead of using
the global viewport. The SceneView::cull() method will pass the
modifed viewport to cullStage when rendering in stereo.

There are 2 new private methods computeLeftEyeViewport() and
computeRightEyeViewport() that will compute the stereo viewports. I
also modified the draw() function so it applies the correct viewport
to the prerender stages. These changes are only necessary for
horizontal/vertical split stereo."
2008-06-19 14:29:38 +00:00
Robert Osfield
4c9b3de4a1 Updated wrappers to fix OpenThreads::Atomic build issues. 2008-06-19 13:28:33 +00:00
Robert Osfield
a94cfccdce From Michael Platings, fixed typo error in renderbin assignment 2008-06-19 12:02:20 +00:00
Robert Osfield
061be3d084 In Program::PerContextProgram changed const Uniform* to osg::ref_ptr<const Uniform*> to avoid the possibility of a uniform being deleted
and another being created and assigned at the same address which previously confused the uniform tracking code and introduced a bug.
2008-06-19 11:58:34 +00:00
Robert Osfield
174f9bbfe0 From Michael Platings and Robert Osfield, added support for controlling,
via StateSet::setNestedRenderBin(bool) whether the new RenderBin should be nested
with the existing RenderBin, or be nested with the enclosing RenderStage.
2008-06-19 11:09:20 +00:00
Robert Osfield
f06d50a7eb From Michael Platings, implemented check against max number of supported samples to ensure that the number of samples is safely capped to what the hardware is capable of, avoiding GL errors and graceful fallback 2008-06-18 20:24:12 +00:00
Robert Osfield
1e5783ece7 Added a wrapString(const char*) which automatically handles null strings. 2008-06-18 16:45:21 +00:00
Robert Osfield
90ea0bd95f From Michael Platings and Paul Palumbo, multi-sample FBO support 2008-06-18 14:09:11 +00:00
Robert Osfield
dd137c2442 From Bob Kuehne, "this submission extends the osgViewer::RecordCameraPathHandler to have an optionally-enabled auto-incrementing filename. default behavior is still the same, but there's one new method to enable autoincrementing filenames."
From Robert Osfield, modified the above so that the number increments come after the filename rather than before.
2008-06-18 11:13:51 +00:00
Robert Osfield
7dc3ad4b5e From David Callu, "fixed bounding box bug" 2008-06-18 10:46:05 +00:00
Robert Osfield
d7e9e5e495 From Mathias Froehlich, OpenThreads::Atomic support 2008-06-17 17:43:59 +00:00
Robert Osfield
7cfe00d3d9 Added overriding of CullSettings::inheritCullSettings() into osg::Camera to
properly inherit the clear colour.
2008-06-16 20:22:16 +00:00
Robert Osfield
4e7dd7f0db Changed class to struct 2008-06-16 16:06:01 +00:00
Robert Osfield
68e750626a Checking in missing header changes 2008-06-16 09:32:22 +00:00
Robert Osfield
3585375d59 Updated versions for 2.5.2 dev release 2008-06-06 17:45:33 +00:00
Robert Osfield
01c284429b From Paul Melis, "Here's an updated include/osgText/Text3D that forces recomputation of the glyph repr when the character depth is updated, also when the rendering mode is set.
This caused a Text3D object read from a .osg file to not have the correct depth."
2008-06-06 16:25:14 +00:00
Robert Osfield
6fb62b9604 Renamed _rendergraph to _stateGraph to better reflect its function 2008-06-06 13:21:57 +00:00
Robert Osfield
cf97035a45 Added OSGDB_EXPORT 2008-06-06 08:42:37 +00:00
Robert Osfield
abfb5bbb8d Added accep(Shape&) 2008-06-05 13:46:19 +00:00
Robert Osfield
282fa84789 Added support for optionally calling releaseContext at the end of each
renderinTraversals() to help with cases where uses are driving multiple
contexts from mulitple viewers in a single threaded frame loop.
2008-06-04 16:46:14 +00:00