Commit Graph

581 Commits

Author SHA1 Message Date
Robert Osfield
d313184cd0 Added fine grained checking for GL errors in the GLObjectVisitor so that the OSG's default pre compile stage provides better feesback on any GL errors. 2017-12-06 09:51:57 +00:00
OpenSceneGraph git repository
1126812f8f Merge pull request #372 from openscenegraph/text_improvements
Text improvements, introducing implementation of Signed Distance Function texture generation and new shaders for outlines and shadows replacing old multi-pass approach
2017-10-26 14:26:01 +01:00
Robert Osfield
248805fedd Fixed pre compilation osg::Program state leaking into the main scene graph rendering 2017-10-25 16:13:26 +01:00
Hartwig
41e9cd3157 Replacement of commas with semicolons 2017-10-22 15:04:33 +02:00
Julien Valentin
f97b1626b3 fix nodevisitor construction 2017-08-21 18:33:56 +02:00
luzpaz
2cd31f65e4 misc. typo fixes
mostly non-user-facing but some doxy.
2017-08-15 12:23:49 -04:00
Robert Osfield
badb914d46 Tidied up spacing 2017-05-25 08:56:53 +01:00
Robert Osfield
5f446e0022 Fixed naming of OSG_USE_DEPRECATED_API 2017-05-25 08:48:45 +01:00
Robert Osfield
a60aed70b5 Replaced DimensionMask naming with more appropriate PrimitiveMask nameing. 2017-05-24 18:36:52 +01:00
Robert Osfield
265efb85a1 Initial work on adding KdTree support for PolytopeIntersector. 2017-05-11 15:25:10 +01:00
Robert Osfield
a95d66a587 Replaced dynamoc_cast<osg::CullStack*> with asCullStack() to improve performance of AutoTransform, screen size based LOD and PagedLOD. 2017-04-26 17:10:58 +01:00
scrawl
e0f7d3241a Fix MergeGeometryVisitor to work with a Group instead of Geode 2017-02-24 01:05:57 +01:00
scrawl
6deefe0646 Remove seemingly redundant handling of Geode in GLObjectsVisitor 2017-02-03 18:10:37 +01:00
scrawl
e38c3d0303 Fix handling of in-scenegraph Drawables in SmoothingVisitor, TriStripVisitor and GraphicsCostEstimator 2017-02-03 17:55:55 +01:00
scrawl
4e1a2d3246 Fix handling of in-scenegraph Drawables in ShaderGenVisitor 2017-02-03 17:51:03 +01:00
scrawl
e48aa118b6 Fix handling of in-scenegraph Drawables in MeshOptimizers 2017-02-03 17:48:18 +01:00
scrawl
c901694290 Fix handling of in-scenegraph Drawables in DrawElementTypeSimplifier 2017-02-03 17:43:42 +01:00
scrawl
853418db94 Remove redundant handling of Geode in DisplayRequirementsVisitor 2017-02-03 17:42:21 +01:00
scrawl
a858b2a2cd Add a comment explaining some confusing code in UpdateVisitor and EventVisitor 2017-02-03 17:39:56 +01:00
scrawl
a13b66135f Fix handling of in-scenegraph drawables in osgUtil::Simplifier 2017-02-03 17:35:40 +01:00
scrawl
f13fbff251 Remove CheckGeometryVisitor which was a no-op 2017-01-20 23:02:15 +01:00
scrawl
4a05caf4f7 MakeFastGeometryVisitor: fix handling of Geometries that are directly in the scene graph not attached to a Geode 2017-01-20 23:01:04 +01:00
scrawl
833f37ea57 StateVisitor: remove redundant code for Geode handling 2017-01-20 22:49:17 +01:00
scrawl
f229b19496 TessellateVisitor: fix handling of Geometries that are directly in the scene graph not attached to a Geode 2017-01-20 22:47:51 +01:00
scrawl
41cbf9a45e FlattenStaticTransformsVisitor: fix handling of Drawables that are directly in the scene graph not attached to a Geode 2017-01-20 22:43:58 +01:00
scrawl
ff1a9a195a StaticObjectDetectionVisitor: make use of apply(Drawable) visitor function 2017-01-20 21:48:45 +01:00
scrawl
764b2f60c6 TextureAtlasVisitor: fix handling of Drawables that are directly in the scene graph not attached to a Geode 2017-01-20 21:47:21 +01:00
scrawl
dc2689f779 TextureVisitor: remove redundant code for Geode handling 2017-01-20 21:47:13 +01:00
scrawl
7611f95078 RemoveEmptyNodesVisitor: remove redundant code for Geode handling 2017-01-20 21:46:03 +01:00
Robert Osfield
b04271f93e Fixed crash in handling of an osg::Callback attached to a Drawable as update callback.
Added handling of osg::Callback when attavhed to a Drawable as a cull callback.
2016-11-23 18:19:59 +00:00
Robert Osfield
961bffcca4 Added automatic assignment of _markerObject to CompileSet. 2016-10-11 11:29:29 +01:00
Robert Osfield
9d9025a6b4 Changed the default paramter for the osgUtil::StateToCompile to retain the OSG-3.4 ABI and fixed indentation. 2016-08-15 12:13:07 +01:00
Robert Osfield
06cb31a3d2 Added automatic assignment of _markerObject to CompileSet. 2016-08-15 11:46:48 +01:00
Robert Osfield
fd0af1d9df Added Optimizer::BufferObjectVisitor and associated BUFFER_OBJECT_SETTINGS value to enable it via the OSG_OPTIMZIER env var.
The BufferObjectVisitor enbales vertex buffer objects usage on Drawable in the scene graph.
2016-07-11 09:52:07 +01:00
Marc Helbling
da47f8a156 Adds an indexMesh option to disable mesh reindexation
This mainly breaks gles/osgjs when stripifying a MorphGeometry. It also
usually doesn't make sense to reindex an already indexed mesh.
2016-07-01 18:12:36 +02:00
Alberto Luaces
260cbab518 Typo fixes 2016-05-30 12:30:05 +01:00
Robert Osfield
7b34ca0a39 Added using to quieten warning 2016-04-29 10:39:57 +01:00
Robert Osfield
1219a6d3bf Added more osg::Object::as*() methods and usage of these through the code base to avoid use of dynamic_cast<> when using UpdateVisitor/CullVisitor/EventVIisitor etc. 2016-01-20 15:13:19 +00:00
Robert Osfield
340615de55 Replaced dynamic_cast<*Callback> with as*Callback() implementation/usage. 2016-01-18 19:04:28 +00:00
Robert Osfield
7409820a8f Added Simplifier::requiresDownSampling()/requiresDownSamplingImplementation() to make it possible for the
Simplfifer::ContinueSimplificationCallback to be able to decide whether up or downsampling is required,
removing the previous hardwards reliance on getSampleRatio<1.0.
2016-01-18 11:50:07 +00: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
7aae720636 Refactored the way that FrameStamp is managed in osgViewer::Renderer to avoid thread conflicts
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15138 16af8721-9629-0410-8352-f15c8da7e697
2015-09-25 10:09:27 +00:00
Robert Osfield
ba9dfb2ff6 From Albert Luaces, typo fixes.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14883 16af8721-9629-0410-8352-f15c8da7e697
2015-06-01 13:40:20 +00:00
Robert Osfield
14ef282297 From Tim Moore, "The order_by_primitive_mode comparer was not providing a strict weak
ordering, which was causing a crash in the sort() call in
VertexAccessOrderVisitor::optimizeOrder (gcc 4.9, Fedora 21)."



git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14846 16af8721-9629-0410-8352-f15c8da7e697
2015-04-20 09:08:56 +00:00
Robert Osfield
0a1db3d6fc From Jannik Heller, typo fixes
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14832 16af8721-9629-0410-8352-f15c8da7e697
2015-04-13 10:43:56 +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
6cff8650f2 Cleaned up handling of Drawables so it utilizes the Node inheritance properly.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14822 16af8721-9629-0410-8352-f15c8da7e697
2015-04-07 15:49:06 +00:00
Robert Osfield
307e70f13b Added Camera::dirtyAttachmentMap(), Camera::s/getAttachmentMapModified() value and usage of this in RenderStage as a new mechanism
for telling the rendering backend to update itself to reflect new values in the attachments such as new texture or image sizes.


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14808 16af8721-9629-0410-8352-f15c8da7e697
2015-03-31 10:36:38 +00:00
Robert Osfield
a331680cec From Aurélien Chatelain, "the smoothing visitor did not handle shared arrays. It may leads to bad geometry arrays when a shared array is involved in the scene.
This submission adds shared array duplication (and moves the SharedArrayOptimizer declaration in MeshOptimizer to make it callable from the SmoothingVisitor)."

Submitted by Marc Helbling.
Edited by Robet Osfield to retain the usual OSG coding style.




git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14639 16af8721-9629-0410-8352-f15c8da7e697
2014-12-24 10:55:49 +00:00
Robert Osfield
58c47e9842 From Marc Helbling, "please find enclosed a submission that should improve the VertexAccessOrderVisitor (pre-transform) optimizer:
* it sorts primitives to keep "more complex" primitives first; maybe you'll prefer to have this as an option (but usually it should make more sense to pre-transform triangles before e.g. lines)
* currently, the visitor rely on TriangleIndexFunctor and does not take care of points and lines (see https://github.com/openscenegraph/osg/blob/master/include/osg/TriangleIndexFunctor#L124-130). This can lead to issues e.g. if you store the wireframe lines along with some triangles: the triangles will be reindexed but not the line. I've therefore added osg/include/TriangleLinePointIndexFunctor to index triangles, lines and points and derived VertexReorder from this class.
* to avoid issues, shared arrays are duplicated. However, in some cases (e.g. an UV channel shared in the geometry only) this is not required. I'm adding a SharedArrayOptimizer to optimize this: it looks for duplicated UVs before the array duplication and deduplicate arrays after.
"


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14603 16af8721-9629-0410-8352-f15c8da7e697
2014-12-16 09:34:15 +00:00