Commit Graph

765 Commits

Author SHA1 Message Date
Robert Osfield
07411f3246 Introduced new osg::Object::DataVariance type of UNSPECIFIED, and changed the deafult
values of DataVariance to UNSPECIFIED to all types.
2007-02-14 13:18:58 +00:00
Robert Osfield
89c99a88fa Added computeDataVariance method into osg::Object and implementations in Drawable and StateSet,
and calling of osgUtil::StaticObjectDetectionVisitor in osgViewer::Viewer
2007-02-14 11:24:42 +00:00
Robert Osfield
7b8483e1be From Paul Martz, "Make DelaunayTriangulator less verbose - It was outputting a non-warning with notify level set to WARN; changed it to INFO to make it less verbose." 2007-02-09 14:21:03 +00:00
Robert Osfield
a3832d9b78 Removed debug message 2007-02-09 12:08:46 +00:00
Robert Osfield
47622e6134 Fixed the FlattenStaticTransform visitor so that it excludes subgraphs that
contain PagedLOD nodes
2007-02-08 15:47:05 +00:00
Robert Osfield
c52207b637 Added new Transform::ReferenceType enum ABSOLUTE_RF_INHERIT_VIEWPOINT to support
internal RTT cameras that wish to use the main cameras view/eye point for LOD and other
distance based tests.
2007-02-07 16:32:14 +00:00
Robert Osfield
69da91620f Convert GraphicsThread/GraphicsOperation to more generic OperationsThread/Operation.
This paves the way to running cull traversals in seperate threads.

Updated wrappers
2007-02-02 22:30:36 +00:00
Robert Osfield
6d9641a78b Added a concrete osg::DeleteHandler implementation which provides support for
retain objects for several frames before deleting them.  Also added RenderStageCache
into CullVistor.cpp that is used for handling RTT osg::Camera's that are being
used in double buffered SceneView usage.
2007-02-02 12:41:13 +00:00
Robert Osfield
a7c448a585 Moved the init traversal from cull() to the draw() to prevent graphics context
calls being made during the cull traversal - something that breaks the
ThreadPerCamera model in osgViewer
2007-02-01 11:07:26 +00:00
Robert Osfield
8dfc5155f4 Further work on new threading model. 2007-01-31 22:24:20 +00:00
Robert Osfield
6acd0e89a1 Disabled the alternating directions of drawing of state sorted render leaves as it
was interferring with anaglyphic stereo used in the osgstereimage example.
2007-01-30 12:09:30 +00:00
Robert Osfield
7b9b13b6c0 Added support for per frame alternating the direction that SORT_BY_STATE bins are
rendered.  The alternation makes it more likely that OpenGL objects will still
be in video ram.
2007-01-30 09:55:34 +00:00
Robert Osfield
fd0ea388c2 Began work on providing support for threading camera cull traversals in parallel with
the previous frames draw traversal.  Changes range from osg::State, through osgUtil::RenderBin, through to osgViewer
2007-01-29 22:44:29 +00:00
Robert Osfield
5bf2dfe3b1 Added _sorted flag into RenderBin to prevent a bin being sorted twice in one frame 2007-01-27 12:54:33 +00:00
Robert Osfield
36330f7e40 Changed osgUtil::RenderBin and osg::State to allow nesting of StateSet's associated with RenderBin's. 2007-01-27 11:13:01 +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
b47ef11d74 Initial on screen stats support 2007-01-21 18:24:54 +00:00
Robert Osfield
c53b597795 From Paul Martz and Geoff Michel, Paul updated Geoff's bug fixes to DelaunaryTraingulator.cpp to reflect recent tessellator spelling changes 2007-01-15 09:56:36 +00:00
Robert Osfield
5c78d06dad Added a default StateSet to osg::View's master Camera. Wired up osgViewer::Viewer so
that the master Camera's StateSet is passed to osgUtil::SceneView to use as its global StateSet.
2007-01-12 12:10:06 +00:00
Robert Osfield
c5082cb85c Added support for vertex ratios into LineSegmentIntersector. 2007-01-10 10:40:12 +00:00
Robert Osfield
4954262eb0 Added View::computeIntersection implementation for a node withing a scene graph. 2007-01-10 10:09:05 +00:00
Robert Osfield
77e300100c From Geoff Michel, "New delaunay triangulator attached. I hadn't realised that the erase() method was not erase (first, last) but erase (first, one after the last one you want deleted). This made a big difference; however some of the edges of the terrain were not included as edges in the terrain so I increased the size of the supertriangle, which works but reduces accuracy due to the larger range of coordinates in the supertriangle. (A larger supertriangle forces the triangles using supertriangle vertices to be long and thin, making the triangulation fit the convex hull of the terrain.)
The loss of accuracy should not affect 'normal' users with terrains that are roughly square (say up to 100:1 aspect ratio) and where the Z range is comparable to the X-Y range. Retested with Pauls data, amalric's strange polygon constraint and the standard test constraints.

I also added 2 tests for routines with a NULL argument passed to them (no-one would usually pass a NULL pointer to these routines unless - as I did in testing- you remove some of the constraints but still pass their pointer to the routine). And I removed 3 tests for triangles which are already removed when generating the geometry.

NB Paul - the previous delaunay triangulator fails under VS8 IF it has any constraints as it attempts to use some vertices that have already been deleted when applying the constraints to edges. Under VS6 and less rigorous compilers it works as the deleted vertices are still in the points stl::Vector; however any added vertices would replace one of the supertriangle vertices with non-disastrous but wrong results."

Note, merged with latest name changes in CVS.
2007-01-09 11:42:49 +00:00
Robert Osfield
462803fd57 From Paul Martz, speeling fixes for Tessellator/Tessellation. 2007-01-08 21:29:49 +00:00
Robert Osfield
02bda82b55 From Paul Martz and Robert Osfield, renamed include/osgUtil/Tesselator and associated classes/references to Tessellator etc. 2007-01-08 11:23:52 +00:00
Robert Osfield
cce656a19b Fixed warnings 2007-01-04 16:48:23 +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
39c0c2df76 Unified the osg::GraphicsThread::Operation and osg::GraphicsContext::Operation classes
as osg::GraphicsOperation.  Unpdated parts of OSG depending upon these.

Added a virtaul bool valid() method to osg::GraphicsContext to allow apps to
test whether a valid graphis context has been created or not.
2006-12-24 16:40:19 +00:00
Robert Osfield
76461b3ab2 Added support for sample and sampleBuffers to osg::GraphicsContext::Traits and
cleaned up the Traits naming
2006-12-22 21:53:44 +00:00
Robert Osfield
dcebe4daa0 Added initial GraphicsWindowX11 implementation, and fleshed out more of the
osgViewer and osg::GraphicsContext/osg::View infrastructure.
2006-12-19 16:00:51 +00:00
Robert Osfield
982a4db9e2 Added ViewPoint support into NodeVistor/CullStack/CullVisitor/LOD/PagedLOD etc to facilate
management of LOD settings for RTT cameras.
2006-12-15 17:27:18 +00:00
Robert Osfield
1a7a1704fd From Geoff Michel, "I was getting triangulations with the previous delaunay triangulator, but it seems I may have been picking up the wrong coordinates or an old version of my test file (that version is OK when no coordinates lie outside the 'terrain' zone). This version is much stricter about memory handling and insertion of extra points." 2006-12-07 10:09:48 +00:00
Robert Osfield
afa96fff0e Added more accurate computation of local height above sea level in the plane intersections routines 2006-12-05 12:58:29 +00:00
Robert Osfield
0f5aeb5fa3 Added preliminary support for generating distance, height lists for ElevationSlice. 2006-12-04 12:36:13 +00:00
Robert Osfield
fd8d6b7f3b Cleaned up debugging info. 2006-12-03 12:52:38 +00:00
Robert Osfield
56b7268c72 Added copying of plane to surface intersections in the osgUtil::PlaneIntersector class, and update wrappers. 2006-12-03 11:44:12 +00:00
Robert Osfield
1cd4089d8e Added handling of loops 2006-11-29 22:00:39 +00:00
Robert Osfield
49d283d592 Added plane to triangle intersections and segment combining, work still not complete though. 2006-11-29 21:43:05 +00:00
Robert Osfield
ab7d1ecc42 Further work on PlaneIntersector 2006-11-29 14:21:59 +00:00
Robert Osfield
a2e79f6a38 Moved osgUtil::PolytopeIntersector, osgUtil::PlaneIntersector and osgUtil::LineSegmentIntersector out from include/osgUtil/IntersecionVisitor into their own seperate files. 2006-11-28 16:30:38 +00:00
Robert Osfield
345810ef22 Added support for float or double osg::Plane, and the default osg::Plane to double.
Performance tests on big models did not indicate any performance penalty in using doubles over floats,
so the move to doubles should mainly impact precision improvements for whole earth databases.

Also made improvements to osgUtil::PlaneIntersector and osgSim::ElevationSlice classes
2006-11-28 16:00:52 +00:00
Robert Osfield
5e1c5cd556 Fixed fade text memory consumption bug which was due to new RenderInfo being
created local to RenderStage and passed on to rendering code which populated
the RenderInfo UserData, but without the restoring the new UserData to the
main RenderInfo.  The local RenderInfo UserData is now passed back to the main
RenderInfo.
2006-11-28 11:10:15 +00:00
Robert Osfield
05bffbe9c4 Added beginnings of osgUtil::PlaneIntersector and osgSim::ElevationSlice 2006-11-27 20:25:36 +00:00
Robert Osfield
fd2ffeb310 Renamed osg::CameraNode to osg::Camera, cleaned up osg::View.
Added beginnings of new osgViewer::Scene,View,Viewer,CompositeViewer and GraphicsWindowProxy files.
2006-11-27 14:52:07 +00:00
Robert Osfield
b82e521444 From Mauricio Hofmam, added support for reading images from all osg::CameraNode attachments in RenderStage. 2006-11-27 11:25:40 +00:00
Robert Osfield
3613e66e82 Added extra checks to RemoveRedendentVisitor to catch Groups that may
only have one child, but also have StateSet's etc and thefore not suitable
for removal.
2006-11-24 21:19:11 +00:00
Robert Osfield
d0cc014f1b Further migration to using RenderInfo 2006-11-14 12:51:31 +00:00
Robert Osfield
b5bb541cca From Stephan Huber, Follows is required to prevent unidented cloning of shared arrays :
"I added some calls to isOperationPermissibleForObject() so I can permit the flattten-pass with my specialized objects in my own code."
2006-11-14 12:49:53 +00:00
Robert Osfield
6a81dc157d From Tery Welsh, added support for inheriting all CameraNode CullSettings and then restoring the original values. 2006-11-07 13:00:14 +00:00
Robert Osfield
06cca16a2a Added convinience constructors to help support picking with the new osgUtil::Intersector classes. 2006-11-02 17:05:46 +00:00
Robert Osfield
7d12b85632 Added basic PolytopeIntersector functionality based on checking vertices against
polytopes.
2006-11-02 15:50:04 +00:00
Robert Osfield
f9fb99dc43 Added prelimnary work on PolytopeIntersector. 2006-11-02 12:17:06 +00:00
Robert Osfield
15f7abe100 Improved handling of projected coords in new intersection classes 2006-11-01 17:18:45 +00:00
Robert Osfield
75169ad16f Added support for osgUtil::Intersectors being in WINDOW, PROJECTION, VIEW or MODEL coordinates 2006-11-01 14:41:32 +00:00
Robert Osfield
16c238fc60 Added osgSim::LineOfSight and osgSim::HeightAboveTerrain classes 2006-10-30 20:29:06 +00:00
Robert Osfield
b4135398da Added handling of geometry indices offset when merging geometries with indices 2006-10-30 11:00:25 +00:00
Robert Osfield
358b96e953 Added osgUtil::IntersectorGroup to handle groups of osgUtil::Intersectors 2006-10-27 15:11:17 +00:00
Robert Osfield
ce3929fd5f Added beginings of new osgUtil::IntersectionVisitor and osgintersection class 2006-10-26 16:03:17 +00:00
Robert Osfield
2f5b7c2e6a Added workaround for NVidia driver bug into SceneView::init() to prevent the extensions
string being initialized within a display list.
2006-10-06 06:58:04 +00:00
Robert Osfield
490fc96ea6 From John Aughey, "Attached is the Optimizer.cpp file that has the fix to duplicate vertex and normal arrays if there is more than one reference to the data. This fixes the problem where the transforms are applied to the same vertex array multiple times if that vertex array is re-used within the model. " 2006-10-03 20:20:23 +00:00
Robert Osfield
f97759405a From Farshid Lashkari, "Here is the patch we discussed previously about adding a flag to
CullSettings which allows CameraNode to inherit the clear color."
2006-10-02 14:11:40 +00:00
Robert Osfield
4b7fb8f17d From Farshid Lashkari, "I made a small modification to the CullVisitor class so that it uses
the inheritance mask of CameraNodes with respect to the compute
near/far mode."
2006-09-21 10:38:06 +00:00
Robert Osfield
def74d3471 Introduced new osg::View, and osg::RenderInfo classes into the core OSG to help
handle scenes with multiple views with elements that need coordinating on a per view basis.

Added beginings of new osgText::FadeText class (not functionality yet).
2006-09-18 20:54:48 +00:00
Robert Osfield
63907dbbaf From Bryan Thrall, fix to Optimizer::MergeGeometryVisitor so that it checks
the permissable operation status on Drawables.
2006-09-08 20:08:01 +00:00
Robert Osfield
daa54a3b09 From Farshid Lashkari,
"I've made some changes to osg which I think make it easier to control
the render order of CameraNode's. Instead of using the built-in orders
(PRE_RENDER, POST_RENDER, NESTED_RENDER), you can specify an integer
order. Values less than zero are pre rendered in order. Values greater
than zero are post rendered in order. And a value of 0 is equivalent
to NESTED_RENDER.

The changes should be fully backward compatible. Also, I changed the
RenderStageList type from a vector to a list because I needed to be
able to insert values anywhere in the list.

The reason I made these changes was because I wanted to be able to set
the render order of a CameraNode at runtime without having to reorder
it in the scenegraph."

and later in the final submission message (relating to what has been finally been merged)    :

"I've rethought my implementation and came up with something a little
better. The setRenderOrder will continue to take an enum, but will
have an optional orderNum parameter which can be both positive and
negative. I think this method is more intuitive and flexible."
2006-09-04 13:15:08 +00:00
Robert Osfield
87a221445e Updated version numbers of the up comming 1.2 release 2006-08-31 20:54:28 +00:00
Robert Osfield
d92fdafd53 Fixed TextureAtlasVisitor bug where repeating textures were incorrectly assigned as non repeating. 2006-08-31 15:39:23 +00:00
Robert Osfield
dcf19c92fd Added support for CameraNode's PostDrawCallback. 2006-08-31 10:08:05 +00:00
Robert Osfield
102215afb5 To TextureAtlasBuilder add copying of border pixels into margins to help improve quality of lower mipmap levels. 2006-08-30 16:33:30 +00:00
Robert Osfield
e789ae6f54 In TextureAtlasVisitor code added catch for textures that have some geometry with texcoords within 0 to 1.0, but
others others out of the 0 to 1 range, these textures are automatically rejected from consideration for adding to a texture atlas.
2006-08-30 09:32:05 +00:00
Robert Osfield
25bf4a6626 To the TextureAtlasBuilder added detection of instance where a single drawable
has multiple textures on the same texture unit inherited down to it from above.
2006-08-29 15:05:05 +00:00
Don BURNS
f74d3af391 Fixed a crash in removeInternalTriangles() for models without normals. 2006-08-29 00:10:43 +00:00
Robert Osfield
66f40a1670 Added env var docs 2006-08-28 19:05:40 +00:00
Robert Osfield
70470bc84a From Roger James, "I have been going through my modified osg files and came across this fix to the Tesselator. From memory it handles a problem with per primitive normal binding. I must have forgotten to submit it." 2006-08-28 19:01:03 +00:00
Robert Osfield
19f3d975dd Futher work on TextureAtlasBuilder/Visitor, now functioning enough to deploy on real models. 2006-08-28 15:46:02 +00:00
Robert Osfield
ee7f3fa375 Further work on TextureAlasBuilder and TextureAtlasVisitor. 2006-08-28 10:46:39 +00:00
Robert Osfield
9f6be131a4 Further work of TextureAtlasBuilder 2006-08-26 21:38:22 +00:00
Robert Osfield
f86c824275 Further work on new TextureAtlasBuilder. 2006-08-25 16:30:23 +00:00
Robert Osfield
1f8c4874f6 Checking in first cut of new osgUtil::Optimizer::TextureAtlasBuilder class
for building texture atlas for sets of images or textures.
2006-08-25 15:53:16 +00:00
Robert Osfield
a16568254c Moved reset to 0 of _createReuseMatrixIndex from CullVistor.cpp to CullStack.cpp so that
CullStack::reset works correctly for all subclasses - fixing a memory consumption issue with occluders
2006-08-12 18:19:43 +00:00
Robert Osfield
132f9ead45 Updated version number for 1.1.1 release 2006-08-12 08:29:16 +00:00
Robert Osfield
d1fe85caf6 Fixed pbuffer usage cross multiple graphics contexts 2006-08-11 11:05:09 +00:00
Robert Osfield
174e3b3dc3 Fixed RenderToTexture bug which occured when the viewport dimensions where
different than the texture being written to.
2006-08-03 15:57:39 +00:00
Robert Osfield
0af758716a For cases where the RenderBin has its own StateSet do a popAllStateSets()
to ensure that the state is completely ready for the RenderBin's StateSet to be at the bottom.
2006-07-19 20:56:24 +00:00
Robert Osfield
4591c68d95 Fixed error in enum, completely perplexed how the error got in... 2006-07-19 19:45:32 +00:00
Robert Osfield
dfbc9d0441 Moved the moveToRootStateGraph(,) from RenderStage::drawImplemenation() to RenderBin::drawImplementation(); 2006-07-18 20:17:31 +00:00
Robert Osfield
f1c2694c17 Updated copyright years. 2006-07-18 15:21:48 +00:00
Robert Osfield
9790d15f30 Reduced the verbosity of debug info. 2006-07-18 13:04:57 +00:00
Robert Osfield
f2d50d943b Updated wrappers 2006-07-18 11:42:27 +00:00
Robert Osfield
a74801a0ee Added Optimizer::FlattenBillboardsVisitor. 2006-07-18 11:03:46 +00:00
Robert Osfield
524417f981 Removed debug info 2006-07-14 11:29:41 +00:00
Robert Osfield
e835ea5328 Speeded up merge geometry 2006-07-14 11:04:24 +00:00
Robert Osfield
47c7c43c64 Optimized the MERGE_GEODES pass 2006-07-13 20:42:10 +00:00
Robert Osfield
dd32e6425e Added StatsVisitor to include/osg/Statistics, and usage of it in osgUtil::Optimizer.
Added --optimize <string> option to osgconv
2006-07-13 15:25:22 +00:00
Robert Osfield
dd6a33da49 Removed StateSet::ENCLOSE_RENDERBIN_DETAILS since it is rendendent, and
implemented the OVERRIDE_RENDERBIN_DETAILS.
2006-07-11 21:53:57 +00:00
Robert Osfield
88609a5eee Updated version numbers for 1.1 release 2006-07-06 10:28:12 +00:00
Robert Osfield
30265ac0b3 Added support for RenderBin's have a local top level StateSet. This is now
used by default in the depth sorted bin.
2006-06-29 15:57:24 +00:00
Robert Osfield
240fc9ebee Replaced ref_ptr<>:take with ref_ptr<>:release, and added handling of removeal
of ref_ptr<> operator >.
2006-06-26 20:45:51 +00:00
Robert Osfield
a9f2e345c9 From David Fries, Reset only the RenderLeaf objects used in the last
frame as given by the _currentReuseRenderLeafIndex instead of
resetting all leaves which can be very time consuming.
2006-06-26 09:18:49 +00:00
Robert Osfield
4c5452733b With direction from Paul Melis, fixed bug in CopySharedSubgraphsVisitor which prevented
it being applied.  Also fix inappropriate comment.
2006-06-08 11:39:10 +00:00
Robert Osfield
bf0828138c Cleaned up the OpenGL error reporting. 2006-05-22 19:30:07 +00:00