Commit Graph

8383 Commits

Author SHA1 Message Date
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
Robert Osfield
400e6eb09a Updated to reflect changes in NodeVistor::ImageRequestHandler. 2008-10-06 17:02:56 +00:00
Robert Osfield
8147bd4df8 Refactored ImageSequence to provided a cleaner and more robust implementation 2008-10-06 17:02:20 +00:00
Robert Osfield
7e43decf4c From Wojciech Lewandowski, build fixes for handling Matrix::value_type == float 2008-10-06 14:18:27 +00:00
Robert Osfield
df12c7bc68 Ran dos2unix 2008-10-06 14:15:27 +00:00
Robert Osfield
9cce90e920 From Glenn Waldron, "osgTerrain::Locator::setTransformAsExtents() does not update the _inverse member. Fix attached.
"
2008-10-06 09:39:43 +00:00
Robert Osfield
45085f3eea Converted tabs to four spaces 2008-10-06 08:58:50 +00:00
Robert Osfield
236832f669 Ran dos2unix on headers 2008-10-06 08:53:54 +00:00
Robert Osfield
87e8f06522 Ran dos2unix on new shadow implemenations 2008-10-06 08:53:25 +00:00
Robert Osfield
5fe30854dd From Jason Beverage, "Attached is a fix for getTile in the Terrain class. It should be checking for itr == _terrainTileMap.end() instead of itr != _terrainTileMap.end()." 2008-10-06 08:48:44 +00:00
Robert Osfield
eb01f3365f Added include <osg/Config> to take advantage of OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION 2008-10-03 16:57:01 +00:00
Robert Osfield
7c6dbe0ed8 Moved the OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION definition into the Config.in rather use of -D define 2008-10-03 15:36:34 +00:00
Robert Osfield
3c52c2578f Updated wrappers 2008-10-03 15:15:33 +00:00
Robert Osfield
13d0292f29 Added optional compile of the new ref_ptr<>:T* operator() output conversion operator, controlled via a CMake option OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION. 2008-10-03 15:15:04 +00:00
Robert Osfield
e7bfc59f5a From Neil Groves, addition on a T* implicit output conversion method and removal of comparison methods that are replaced by the single conversion method.
From Robert Osfield, optional compilation of above.
2008-10-03 15:13:11 +00:00
Robert Osfield
56bc3ae194 Compile fix required when using ref_ptr<> implicit output conversion 2008-10-03 13:38:55 +00:00
Robert Osfield
eb5a656f4e From Neil Groves, added intrusive_ptr_add_ref and intrusive_ptr_release methods to enable
usage of boost::intrusive_ptr<> with osg::Referenced objects.
2008-10-03 13:34:32 +00:00
Robert Osfield
281f55a55c From Bryan Thrall, fixed typos in exception strings. 2008-10-03 11:04:23 +00:00
Robert Osfield
7a6ec46535 From Paul Martz, "I had to make Yet Another tweak to the workaround for the occlusion query issue on NVIDIA cards. Testing indicates that this produces stable results. I checked this in to the 2.6 branch as revision 8965. Please include this on the trunk" 2008-10-03 11:02:13 +00:00
Robert Osfield
99fd6ed93a From Neil Groves, "Frequently I would like code that has a signature like: void foo(osg::ref_ptr<osg::Node> node) to work for osg::ref_ptr<osg::Group>, osg::ref_ptr<osg::Geode> etc. The behaviour of osg::ref_ptr does not mimic the behaviour of a raw pointer in this regard.
To facilitate this possibility I have added a template copy constructor and a template assignment operator. These work for safe conversions like those in my previous example, but fail as desired for non-safe conversions since the template instantiation fails during the raw pointer copy/assignment.

The lack of this facility has appreciably handicapped development of generic algorithms applied to the scene graph, and I believe that this alteration will be welcomed by most of the community. If there are issues with antiquated compilers not supporting template member functions then perhaps a small piece of conditional compilation is in order.

I have made the change using the latest release version (2.6) as the base. The full file is attached.

I have not tested building the osg wrappers and the script binding code. I have tested the legal and illegal conversions of both copying and assignment to ensure that behave as expected on MSVC7.1, MSVC8, MSVC9, GCC 4.3."
2008-10-03 09:55:20 +00:00
Robert Osfield
830bb21a32 From Tatsuhiro Nishioka, submissions posted by Stephan Huber, "attached you'll find a modified ReaderWriterQT.cpp-file where I removed the support for rgb(a)-files.
Quicktime supports only files with 3/4-channels rgba-files and not 1/2-channels rgb-files.

This submission is from Tatsuhiro Nishioka, here's his original quote:

    When FlightGear crashes, the error message
    "GraphicsImportGetNaturalBounds failed" shows up. By adding printf
    debug, I found the error was -8969: codecBadDataErr when loading a
    gray-scaled (2 channels) rgba files even though the file can be loaded
    with Gimp and osgViewer properly.

    So I made an investigation on this problem and found an interesting
    thing. This error occurs only when non-rgb files are loaded before rgb
    files. The reason is that rgba files can be handled by both
    osgdb_rgb.so and osgdb_qt.so, but the error happens only when
    osgdb_qt.so try to load a gray-scaled rgba file.

    When a program is about to load an rgba file, osgdb_rgb.so is loaded
    and it handles the rgba file properly. In contrast, when a gray-scaled
    rgb file is being loaded after a non-rgb file (say png) is already
    loaded by osgdb_qt.so, osgdb_qt.so tries to load the file instead of
    osgdb_rgb, which causes the error above.

    Anyway, the bad thing is that QuickTime cannot handle gray-scaled rgb
    files properly. The solution for this is not to let osgdb_qt handle
    rgb files since osgdb_rgb can handle these properly.

"
2008-10-03 09:22:40 +00:00
Robert Osfield
4bde492d8c From Stephan Huber, removed now redundent setEventQueue method 2008-10-03 09:19:53 +00:00
Robert Osfield
fb9181ff17 From Roland Smeenk, A year ago Stephan Maximilian Huber sent in a submission with enhanced statistics. Because I was interested in the scene statistics of his submission I tried to merge his changes with the current CVS head. I made a few changes to the way the statistics are displayed. Attached you will find the new StatsHandler and a screenshot of the statistics in the compositeviewer example.
This code will add two extra statistics options:
-Camera scene statistics, stats for the scene after culling (updated at 10 Hz)
-View scene statistics, stats for the complete scene (updated at 5 Hz)
 
Each camera and each view will expand the statistics to the right.
 
I also added the requests and objects to compile of the databasepager to the databasepager statistics.""
2008-10-03 09:02:23 +00:00
Robert Osfield
03cec07df8 From Mathias Froehlich, Wr.t AC3D Texture clamping "I had a quick look at the problem.
Attached is a change that is able to provide shared textures for the clamp and
the repeat case.
So this appears to be the best fix I guess ...

Also it additionaly shares the TexEnv StateAttribute in a whole ac3d model."
2008-10-03 08:35:59 +00:00
Robert Osfield
82318cfd04 Added missing dirtyBound() calls 2008-10-03 08:33:17 +00:00
Robert Osfield
3b4184295e Various improvements to the dicom loader to be able to handle a broader range of dicom files 2008-10-02 15:45:08 +00:00
Robert Osfield
66c857b645 Updated shaders 2008-09-29 18:30:17 +00:00