Commit Graph

8460 Commits

Author SHA1 Message Date
Robert Osfield
306a9dd6db From Riccardo Corsi, Added 3gp file extension to supported list in quicktime plugin 2008-09-24 16:00:45 +00:00
Robert Osfield
5a87473444 Added 3gp extension alias for quicktime 2008-09-24 15:59:55 +00:00
Robert Osfield
62331769ac Added shader based transfer function, enabled via --gpu-tf 2008-09-24 10:45:15 +00:00
Robert Osfield
169d9f550e Fixed transfer function parsing 2008-09-24 10:20:23 +00:00
Robert Osfield
5c264c7c74 Added mutex usage to protect access to plugin and readerwriter containers 2008-09-23 17:29:28 +00:00
Robert Osfield
edc966c4c2 Added "serialize" and plugin "preload" options in the "read-threads" code path. 2008-09-23 15:41:49 +00:00
Robert Osfield
1b02cf99dc Added read-threads <numThreads> command line and read thread test back end 2008-09-23 13:58:49 +00:00
Robert Osfield
b1c93f05f6 From Wojciech Lweandowski, added support for noew LispSM shadow technique (use --lispsm on CmdLine) and added IslandScene database (use -4 on CmdLine). 2008-09-23 09:59:23 +00:00
Robert Osfield
55d4756d31 Added support for reading raw data and transfer function from a volume header 2008-09-22 17:24:26 +00:00
Robert Osfield
65cb2e625f Added --page-and-discard, --page-and-retain, --preload and --length command line options 2008-09-22 16:18:02 +00:00
Robert Osfield
71af4851c7 Fixed typo 2008-09-22 16:17:28 +00:00
Robert Osfield
260334e4fe Added stats handler 2008-09-22 15:56:22 +00:00
Robert Osfield
976df65bcc From Ulrich Hertlein, fixes for OSX build 2008-09-22 15:01:25 +00:00
Robert Osfield
e9e3a533ea Changed OSG_DEBUG_POSTFIX to use ADDQUOTES in the .cpp rather than trying to add quotes via CMakeLists.txt 2008-09-22 14:58:35 +00:00
Robert Osfield
8f4335825b From Ralf Habacker and Robert Osfield, added search for plugins with OS specific file plugin extensions 2008-09-22 14:55:19 +00:00
Robert Osfield
48fe06fec3 Added getExtensionIncludingDot to provide more efficient handling of extensions 2008-09-22 14:46:54 +00:00
Robert Osfield
922b85b386 Changed the macro usage so that the quotes are now added inside the .cpp 2008-09-22 13:16:29 +00:00
Robert Osfield
fa77f50260 Added readNode implementation that creates an osgVolume::Volume for the specified dicom file. 2008-09-22 11:13:50 +00:00
Robert Osfield
3ec2c22ad4 Added Volume wrappers, and updated terrain wrappers 2008-09-21 11:12:31 +00:00
Robert Osfield
00f6622ac8 Create initial class placeholders for main volume rendering classes 2008-09-21 11:05:03 +00:00
Robert Osfield
ae08a5b261 Change TileID::layer to TileID::level 2008-09-20 15:43:38 +00:00
Robert Osfield
c35159fdde From Chris Denham, changed gluGetErrorString to using osg::State::checkGLErrors() to avoid null pointer dereference 2008-09-20 10:34:47 +00:00
Robert Osfield
4aaf24b5d8 From Mathias Froehlich, added catch for GL_COLOR_MATERIAL mode being set. 2008-09-20 10:09:56 +00:00
Robert Osfield
8552faf774 From John Vida Larring, "If an application initializes osgViewer::GraphicsWindowEmbedded() but never gets around to do any rendering before the application is closed, the result with be a crash (SIGABRT/std::logic_error) in osg::getGLVersionNumber().
The fix was to check whether glGetString( GL_VERSION ) returned a null pointer (Ref. svn diff below). The altered src/osg/GLExtensions.cpp is zipped and attached to this email."
2008-09-20 10:05:31 +00:00
Robert Osfield
0b5852948d Added wrapper support for new osgShadow classes 2008-09-19 19:51:57 +00:00
Robert Osfield
bf15614df6 From Wojciech Lewandowski, a range of new ShadowMap implementations include View Dependent Shadow Maps - LispSM
From Robert Osfield, refactored Wojciech's submission to integrated with osgShadow and use coding sytle more consistent with rest of OSG.
2008-09-19 19:51:27 +00:00
Robert Osfield
f388d6a938 From Mathias Froehlich, added support for search in the installed directories for plugins 2008-09-19 12:49:22 +00:00
Robert Osfield
a961b880bb From Richard Schmidt, fixed the handling of user data so that it uses ref_ptr<> to avoid data getting deleted. 2008-09-19 08:16:41 +00:00
Robert Osfield
9f1672ca4c Updated ChangeLog 2008-09-18 16:48:21 +00:00
Robert Osfield
44113cfa14 Added Serializer wrappers 2008-09-18 16:03:34 +00:00
Robert Osfield
90d5c9d0c6 Moved Serializer header from VPB into osgDB. 2008-09-18 15:50:22 +00:00
Robert Osfield
7615c7073c Updated wrappers 2008-09-18 15:44:21 +00:00
Robert Osfield
91f7895735 refactored the getWindows(..) and getContexts(..) methods so that they produce
consistent ordering based on the order Camera/slave camera ordering.
2008-09-18 15:18:59 +00:00
Robert Osfield
8bdb22c22e From Mathias Froehlich, "Attached one namespace/scope lookup problem which shows up on irix." 2008-09-18 15:16:57 +00:00
Robert Osfield
1d328ba0d4 From Christopher Blaesius,
"Soft shadow mapping is basically the same as hard shadow mapping beside that
it uses a different fragment shader.
So for me it makes sense that osgShadow::SoftShadowMap is derived from
osgShadow::ShadowMap, this makes it easier to maintain the two classes.
Additional SoftShadowMap also provides the same Debug methods as ShadowMap."
2008-09-18 14:48:28 +00:00
Robert Osfield
47e07244b9 Updated wrappers 2008-09-18 13:54:22 +00:00
Robert Osfield
9510df9c2e From Alan Dickinson, change methods to virtual. 2008-09-18 13:54:13 +00:00
Robert Osfield
95a822b70d From John Argentieri, added missing _stripTextureFilePath( false ) initializer. 2008-09-18 13:18:12 +00:00
Robert Osfield
9cca510d6c From Chris Denham, added missing ccopy of polyOffset in copy constructor 2008-09-18 13:09:21 +00:00
Robert Osfield
40723ca8ac From Chris Denham, "
I think I may have discovered a bug in osgShadow/ShadowMap.cpp that results in incomplete shadows being generated.
The problem seems to caused by an incorrect interpretation of the spot light cutoff angle. The valid ranges for spot cutoff are 0-90 and 180, i.e half the 'field of view' for the spotlight. Whereas the shadow map code seems to assume the the spot cutoff is equal to the field of view. This results in the shadows generated by the spotlight getting clipped at half the spot cutoff angle.

I have fixed this in my copy of ShadowMap.cpp:
===============================
//Original code from OSG 2.6:
      if(selectLight->getSpotCutoff() < 180.0f)   // spotlight, then we don't need the bounding box
      {
          osg::Vec3 position(lightpos.x(), lightpos.y(), lightpos.z());
          float spotAngle = selectLight->getSpotCutoff();
          _camera->setProjectionMatrixAsPerspective(spotAngle, 1.0, 0.1, 1000.0);

_camera->setViewMatrixAsLookAt(position,position+lightDir,osg::Vec3(0.0f,1.0f,0.0f));
      }
===============================
// My modifications:
      float fov = selectLight->getSpotCutoff() * 2;
      if(fov < 180.0f)   // spotlight, then we don't need the bounding box
      {
          osg::Vec3 position(lightpos.x(), lightpos.y(), lightpos.z());
          _camera->setProjectionMatrixAsPerspective(fov, 1.0, 0.1, 1000.0);

_camera->setViewMatrixAsLookAt(position,position+lightDir,osg::Vec3(0.0f,1.0f,0.0f));
      }

This change seems correct for spot cutoff in the range 0, 90, but since OpenGL doesn't claim to support cutoffs >90 && <180, I'm not sure how shadow map should deal with those cases, but ignoring spot cut off greater than 90 here seems reasonable to me.
"
2008-09-18 13:05:24 +00:00
Robert Osfield
4923c88bd0 From Ralf Habacker, "the appended patch fixes the problem reported on http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2008-January/006110.html. "
> Using QOSGWidget - QWidget + osgViewer creating the graphics context.
>
> Windows Error #2000: [Screen #0] GraphicsWindowWin32::setWindow() - Unable
> to create OpenGL rendering context. Reason: The pixel format is invalid.
>
>
>
> And then the following fate error pops up:
>
>
>
> The instruction at "0x014c7ef1" referenced memory at "0x000000a4", The
> memory could not be "read".
>
> Click on Ok to terminate the program
>
> Click on CANCEL to debug the program
>
>
2008-09-18 12:57:15 +00:00
Robert Osfield
8dd9c54229 From Robert Osfield and Christophe Loustaunau, fixes for support for 16bit and 32bit tiff images 2008-09-18 12:50:20 +00:00
Robert Osfield
21686c27af From Mathias Froehlich, "I did some performance test runs with the development gcc-4.4 version.
To make it compiel with future gcc's we sppear to need the attached missing
includes ..."
2008-09-18 10:52:35 +00:00
Robert Osfield
9e47480bc7 From Mathieu Marache, "This is an addition for osgSim reader/writer for the osg ascii file format adding osgSim::OverlayNode support. " 2008-09-18 10:49:18 +00:00
Robert Osfield
0d74d508df From Tim Moore, "his submission fixes a bug when the ModularEmitter and ParticleSystem are in different frames of reference. Specifically, it supports the case where the ParticleSystem is not in the world frame. One way this can come up is if your world coordinate system is Earth-centric; the float coordinates of particles don't have enough precision to avoid terrible jitter and other rendering artifacts, so it's convenient to root the particle systems in a local Z-up coordinate system that gets moved around from time to time.
"

Tweak from Robert Osfield, converted code to use new Drawable::getWorldMatrices method
2008-09-18 10:39:37 +00:00
Robert Osfield
0969a5384b Improved the constness of parameters the Node::getWorldMatrices(..) method.
Added Drawable::getWorldMatrices(const Node*) method.
2008-09-18 10:38:18 +00:00
Robert Osfield
93d4090169 From Rob Bloemkool, "This is a submission for src/osgPlugins/ogr/ReaderWriterOGR.cpp
- adds display of options when using osgconv --formats.
- adds useGroupPerFeature option to have each feature in a separate group. Usage: OSG_OPTIMIZER=OFF osgconv -e ogr -O addGroupPerFeature <infile> <outfile>
"
2008-09-17 20:02:39 +00:00
Robert Osfield
17161a9363 From Ewe Woessner, "I looked at the Anaglyphic stereo implementation in SceneView.cpp and think I spotted some copy-paste bugs.
osg::ColorMask* leftColorMask = _renderStageLeft->getColorMask();
if (!leftColorMask)
{
   leftColorMask = new osg::ColorMask();
   _renderStageLeft->setColorMask(leftColorMask);
               ^^^^ here it said right, I think this should be Left.
}


// ensure that right eye color planes are active.
osg::ColorMask* rightColorMask = _renderStageRight->getColorMask();
                                             ^^^^ similar here, I think this should be right
if (!rightColorMask)
{
   rightColorMask = new osg::ColorMask();
   _renderStageRight->setColorMask(rightColorMask);
}

and i further removed an unnecessary setColorMask."
2008-09-17 19:51:35 +00:00
Robert Osfield
cc079453da From Mattias Helsing,
CMakeLists.txt changes: "I installed latest Cmake(2.6.1) on a new machine and got a CMP008
warning from cmake. This fix set up osg to use the old behaviour which
have worked before. We might set this to NEW but I need to do more
testing first. I'l be able to test this on winxp with msvc80/90 and
ubuntu hardy with gcc-4.2.

quote from cmake cvs log
policy CMP0008 to decides how to treat full path libraries that do not
appear to be valid library file names.  Such libraries worked by
accident in the VS IDE and Xcode generators with CMake 2.4 and below."


OsgMarcroUtils.cmake changes: "On Philips suggestion truncated a redundant if/else construction in
OsgMacroUtils to avoid developer warnings in cmake-2.6.1 concerning
cmake policy CMP0008 which allows full paths to libraries only with
valid library names
"
2008-09-17 19:25:40 +00:00
Robert Osfield
377a553295 From Alberto Luaces, "Cygwin's cmake build adds a "d" postfix to the plugins installed in debug
mode. Nevertheless, the code doesn't acknowledge that, so I had problems with
debug versions of the library not being able to open their plugins whereas
the release versions worked fine.

I have made the same changes in Registry.cpp that are available for the rest
of platforms appending that "d" to their plugins. I have also updated the
CMakeLists.txt file to get "_DEBUG" defined at compilation time. I have
copied the already existent conditional block because of cmake's bizarre
operator precedence. Since Cygwin defines both CYGWIN and WIN32, the
following would suffice:

IF(CYGWIN OR UNIX AND NOT WIN32 AND NOT APPLE)

Sadly, it actually doesn't work, so I wrote a new conditional block just for
Cygwin. I could join the two blocks when the parentheses support is added in
newer versions of cmake."
2008-09-17 18:56:59 +00:00