Commit Graph

8409 Commits

Author SHA1 Message Date
Robert Osfield
c1fd14fb2c Introduced new method of management the number of PagedLOD active, by using
a capping the number of PagedLOD to a sepcified maximum, with pruning of inactive
PagedLOD when the total number of inactive and active PagedLOD goes above the maximum.

To enable the mode set the env var OSG_MAX_PAGEDLOD to a value something like 1000.
2008-10-23 16:33:14 +00:00
Robert Osfield
f4f6aa288d From Panagiotis Koutsourakis, "We are using Open Scene Graph for an application and we need COLLADA
support. While testing the pluggin we found a small bug and we are
submitting a patch.

The first attachment is a small program that creates a scene with two
pyramids, transformed by two instances of
osg::PositionAttitudeTransform. One of them is rotated 90 degrees in
the X axis, and the scene is exported both in the native OSG (.osg)
and COLLADA (.dae)  formats. In the first case the rotated pyramid is
displayed correctly whereas in the second the pyramid seems not to be
rotated.

In the COLLADA 1.4.1 specification (found at
http://www.khronos.org/collada/) it is specified that
"The <rotate> element contains a list of four floating-point values
[...] followed by an angle in degrees" but the plugin seems to write
the value in radians.

The problem seems to be in the method daeWriter::apply() that seems to
be writing the angle value in radians to the COLLADA file. The patch
can be found in the second attachment and is simply a call to
RadiansToDegrees wrapped around the angle.
"
2008-10-21 16:39:24 +00:00
Robert Osfield
fd5f9741d3 From Wojciech Lewandowski, "I made a minor tweak in StandardShadowMap.cpp. As agreed with J-S I have added AlphaFunc/AlphaTest to shadow camera stateset to make sure transparent objects will not cast blocky solid shadows." 2008-10-21 16:32:55 +00:00
Robert Osfield
3b5f9f1e5d From Chris Denham, "However, just spotted another inconsistency between UFOManipulator::getMatrix() and UFOManipulator::getInverseMatrix()
It assumes that inverse(_inverseMatrix * _offset) = _offset * _matrix
This is only true when _offset=identity, so I think it should be inverse(_offset) * _matrix
This inconsistency can cause problems when switching from UFO to other manipulators, because the UFO:Manipulator::getMatrix function is not necessarily returning a correct inverse of the currently set ModelViewTransform.
It was tempting to change the name of the _offset member to _inverseOffset, or to maintain both variables, but in the end went for the minimal change."
2008-10-21 16:31:01 +00:00
Robert Osfield
144e44a749 From Per Fahlberg, "I ran into a problem when using another library that implemented the same functions as the osg jpeg plugin, i guess they both originated from the same example code :) As a solution I added a namespace in ReaderWriterJPEG.cpp around the functions.
"
2008-10-21 16:27:22 +00:00
Robert Osfield
01593240ed #if'd out an premature StateSet optimization that was causing problems with datasets that mixed multi-texture coord geometry with single texture coord geometries in a single scene graph. 2008-10-21 15:51:56 +00:00
Robert Osfield
f058fc299e Updated wrappers 2008-10-21 09:50:07 +00:00
Robert Osfield
24eb2f6c43 Introduce osgDB::FileCache, and updated osgfilecache and DatabasePager to use it. 2008-10-20 16:24:57 +00:00
Robert Osfield
10186190f6 Introduced support for controlling mipmapping of osgTerrain::ImageLayer and compression of osgTerrain::HeightFieldLayer. 2008-10-20 08:43:25 +00:00
Robert Osfield
351ac1614c From Paul Melis, fixed typo 2008-10-17 09:16:02 +00:00
Robert Osfield
61bd2b825f From Chris Denham, "I noticed that UFOManipulator _matrix and _inverseMatrix may be inconsistently set due to typo in
UFOManipulator::home().
I assume the intention is that _matrix and _inverseMatrix are kept consistent, so corrected file attached.

///////////// OSG 2.6 //////////////////
  _inverseMatrix.makeLookAt( _homeEye, _homeCenter, _homeUp );
  _matrix.invert( _matrix );
///////////// after typo correction /////////////////
 _inverseMatrix.makeLookAt( _homeEye, _homeCenter, _homeUp );
  _matrix.invert( _inverseMatrix );
///////////////////////////////////////"
2008-10-15 10:07:21 +00:00
Robert Osfield
f66a285b01 Changed erroneous ZLIB_INCLUDE_DIRS to ZLIB_INCLUDE_DIR 2008-10-14 17:20:58 +00:00
Robert Osfield
1bbab1fcc7 From Jason Beverage, "Here is a small change to the CURL plugin to distinguish between a 400 level error and a 500 level error.
If a 400 level error occurs, a FILE_NOT_FOUND ReadResult is appropriate.

If a 500 level error occurs (such a 503, Service unavailable), the application might want to try to load the file again in a few seconds/minutes.  This submission returns ERROR_IN_READING_FILE if a 500 level error occurs so that clients can easily distinguish between the errors.

The actual error code is also added to the "message" of the ReadResult so if a client needs more information, they can just parse the message to retrieve the error code."
2008-10-14 16:57:37 +00:00
Robert Osfield
36a93d9cf3 Converted M_PI* usage across to osg::PI 2008-10-14 16:44:14 +00:00
Robert Osfield
ec797b3a81 From Ricard Schmidt, dot writer plugin. 2008-10-14 16:35:03 +00:00
Robert Osfield
8c6f65caca From James Moliere,
"   The code below is to show how a heirarchy of objects can be made within a scenegraph.
    In other words, how there can be a parent/child relationship between objects such
    that when a parent is rotated or translated, the children move is respect to it's
    parent movement.  A robotic arm is used in this example because this is what I'm
    using OSG for."
2008-10-14 15:24:39 +00:00
Robert Osfield
e4057b65ee Removed geomoflife_frag.cpp experiement from CMakeList.txt file 2008-10-14 15:10:10 +00:00
Robert Osfield
3aebed206e From J.P Delport, game of life example that demonstrates ping pong render to texture rendering 2008-10-14 14:58:10 +00:00
Robert Osfield
78d731a316 Added zlib support to curl and ive plugins 2008-10-14 14:37:11 +00:00
Robert Osfield
ad78c21e07 Added debug timing code 2008-10-14 14:36:24 +00:00
Robert Osfield
ac975bf79a Added a Refrenced::getGlobalReferencedMutex, and OpenThreads::ScopedPointerLock() and use of this in add/removeParent() codes
to avoid threading problems when using atomic ref counting.
2008-10-14 14:27:41 +00:00
Robert Osfield
af13e84093 UPdated version numbers 2008-10-14 14:25:54 +00:00
Robert Osfield
d8525815fd Moved compress/uncompress code across to using gzip compatible methods 2008-10-10 12:01:54 +00:00
Robert Osfield
46172c931e Added initial cut of gz compress/uncompress plugin 2008-10-09 18:46:49 +00:00
Robert Osfield
ab3ecd129d Initial cut of zlib based compress/uncompress plugin 2008-10-09 17:02:16 +00:00
Stephan Maximilian HUBER
df0fcbdf9b From Stephan Huber: updated XCode-project, added osgVolume-lib 2008-10-09 13:16:49 +00:00
Robert Osfield
c3af8b1c8e Fixed the frame rate reporting so that it handles the case when animation is slowed or speeded up 2008-10-09 08:52:14 +00:00
Robert Osfield
e41ee9f951 Updated date 2008-10-08 13:19:16 +00:00
Robert Osfield
f75e43e93a Updated ChangeLog and AUTHORS.txt for 2.7.3 dev release 2008-10-08 13:18:14 +00:00
Robert Osfield
9cd739d45c Updated wrappers 2008-10-08 12:54:45 +00:00
Robert Osfield
c47d63ba1c Added friend struct ViewData to try and avoid compile issues under HP-UX 2008-10-08 12:29:43 +00:00
Robert Osfield
5e95d6e3b5 Added Texture1D(Image*) and Texture3D(Image*) constructors 2008-10-08 11:30:18 +00:00
Robert Osfield
a4aa8fbcd2 Replaced std::vector::insert with std::copy + back_inserter to avoid member template problems with sunos. 2008-10-08 10:55:20 +00:00
Robert Osfield
29c0e913d7 From Mathias Froehlich, fixes for HP-UX, SGI and Solaris build 2008-10-08 10:10:34 +00:00
Robert Osfield
91d20fb3ec Moved OSG_FORCE_QUERY_RESULT_AVAILABLE_BEFORE_RETRIEVAL into src/osg/CMakeLists.txt 2008-10-07 15:59:10 +00:00
Robert Osfield
9b83cad247 Made line graph solid (alpha = 1.0) 2008-10-07 15:58:07 +00:00
Robert Osfield
4f684d16f2 From Jean-Sebastien Guay and Robert Osfield, added setDataVariance(osg::DYNAMIC) to avoid problems to optimization. 2008-10-07 15:41:47 +00:00
Robert Osfield
8ea9fad93a Added osgText to link line 2008-10-07 15:21:12 +00:00
Robert Osfield
c569b8a1f3 Restoring Roger's original 2.0 factor as on review the later orthographic projection code
doesn't require the position to be far out from the center to simulate an infinite light.
2008-10-07 15:19:48 +00:00
Robert Osfield
ad72dc66ce From Roger James, "The light position is incorrectly calculated for shadow casting scenes whose bounding box centre is not the origin. This is a one line fix.
"
2008-10-07 15:16:37 +00:00
Robert Osfield
09e6261e9a From Wojciech Lewandowski and Robert Osfield, add CMake build option for controlling the Windows/NVidia multi-monitor workaround. 2008-10-07 14:36:46 +00:00
Robert Osfield
0daf1f007a Updated wrappers 2008-10-07 14:25:09 +00:00
Robert Osfield
b7fa3f6f3c Replaced IntersectVisitor usage with IntersectionVisitor 2008-10-07 14:19:28 +00:00
Robert Osfield
907a51b198 Replaced usage of depreacted IntersectVisitor with IntersectionVisitor 2008-10-07 14:01:14 +00:00
Robert Osfield
ed2bbbf23b From Jean-Sebastirn Guay, "Inspired by the latest additions to the StatsHandler, here is my own addition. It's a graph that helps show the variation of the various stats over time. It's clearer than just having bars for the last 10 frames or so, IMHO, since 10 frames go by pretty fast...
The graph is displayed "under" (behind) the normal bar chart you get when you press 's' twice. It doesn't hide the normal stats, you can still read them without any trouble, and that way, it doesn't take any more screen space. It starts from the left, and will scroll left when there is enough data to fill the screen width. The graph lines have the same colors we're used to (except I made the event color a bit bluer, so it's not exactly the same as the update color). A screen shot is attached.

The lines get a bit confused when they're all overlapping at the bottom of the graph, but I think that's the least of our concerns (if they're all at the bottom of the graph - except FPS of course - then great!).

The only thing I'm not very keen about is that to make things simple, I clamp the values to a given maximum. Right now, the maximums I have set are:

* Frame rate: 100 fps (people have 60, 75, 85Hz refresh rates, so there's no one right value, but I think 100 is OK)
* Stats: 0.016 seconds (what you need to get 60Hz minimum)

This could be changed so that the scale of the graph changes according to the maximum value in the last screenful of the graph instead of clamping values. We would then need to display the scale for each value on the side of the graph, because if the scale changes, you need to know what it is at this moment.

I tried to make things easy to change, so for example if you don't like that the graph is in the same space as the normal stats bars, it's easy to move it anywhere else, and make it have other dimensions. The maximums and colors are also easy to change.

The impact on performance should be minimal, since it's one vertex per graph line that's added per frame, and vertices are removed when they scroll off the screen, so you'll never have more than say 1280 * (3 + ncameras) vertices on the screen at one time. No polygons, I used line strips. The scrolling is done with a MatrixTransform."
2008-10-07 13:37:04 +00:00
Robert Osfield
af30f0769a From Colin McDonald, "Attached is an update to the dxf plugin which adds rudimentary support for
text entities.
"
2008-10-07 13:06:53 +00:00
Robert Osfield
ff8c6aa32b From Mathias Froehlich, build fixes 2008-10-07 12:31:42 +00:00
Robert Osfield
8c98220878 Added the ability to release OpenGL objects in PagedLOD subgrphs that are no longer being rendered. 2008-10-07 11:35:41 +00:00
Robert Osfield
6ec4c64914 Updated wrappers 2008-10-06 17:15:16 +00:00
Robert Osfield
1f4e712fd8 Improved the ImageSequence::setLength() settting. 2008-10-06 17:03:32 +00:00