Commit Graph

5659 Commits

Author SHA1 Message Date
Robert Osfield
0fdb54d8bb Changed loadLibrary so that it retusn a LoadStatus variable to enable calling
codes to differentiate between whether a library is already loaded, or is newly loaded
2008-09-26 13:51:18 +00:00
Robert Osfield
195ad58494 From Lionel Lagarde, "Here is a correction on DatabasePager::FindCompileableGLObjectsVisitor
The apply(osg::Drawable *) method doesn't update the _drawableSet and
the isCompiled test was inversed."
2008-09-26 10:59:28 +00:00
Robert Osfield
bce664dcab From Fabio Mierlo, "n the lines 428 and 430 of obj.cpp file from release 2.6.0, the parser
use only the first 7 characters to compare the string "map_opacity "
and to copy the followed parameter, but the string have 12 characters."
2008-09-26 10:43:18 +00:00
Robert Osfield
57150bb86a Updated wrappers 2008-09-25 15:04:05 +00:00
Robert Osfield
36409f8597 Added .vert and .frag to list of accepted extension in the GLSL plugin 2008-09-25 10:21:44 +00:00
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
5c264c7c74 Added mutex usage to protect access to plugin and readerwriter containers 2008-09-23 17:29:28 +00:00
Robert Osfield
71af4851c7 Fixed typo 2008-09-22 16:17:28 +00:00
Robert Osfield
976df65bcc From Ulrich Hertlein, fixes for OSX build 2008-09-22 15:01:25 +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
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
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
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
Robert Osfield
ff119b78cd From Adrian Egli, "i came around reviewing my code, and found now finally a solution to remove the polygon offset issue. as we all know the polygon offset has a different behaviour on different GPU system (ATI, NVidia) and this make the use of
polygon offset complicate. so i looked for a solution to remove this offset.

i changed the shader, also the filtering (default: on) use now a correct 3x3 filter:
 1 0 1
 0 2 0
 1 0 1

div: 6

of course a better one would be
 1 2 1
 2 4 2
 1 2 1

div: 16
but this isn't as performant as the simple filter above is. because we need only 5 texture lookups instead of 9, and the result is still good, if you wish we can add a enum to change the pcf filter type once, if there is a need.


testet on NVidia Quatro 570M and on ATI Radeon X1600

"
2008-09-17 18:54:23 +00:00
Robert Osfield
19d02d8c78 From Adrian Egli, "I changed the PSSM shadow map implementation, if we have filtered turned on, it should be now correct. The implementation is more robut on different scene. i tested it on NVIDIA card against a park scene, a chess board and a terrain.
unfort. i couldn't test it on any ATI system. may there will be still another problem there. if there are still some artefacts. we should try out better fZOffSet value
"
2008-09-17 18:51:17 +00:00
Robert Osfield
7f39dc3499 From Bill Prendergast, "Found a typo in CameraRenderOrderSortOp in osg/GraphicsContext.cpp
(V2.6.0 and prior) as noted below:

struct CameraRenderOrderSortOp
{
   inline bool operator() (const Camera* lhs,const Camera* rhs) const
   {
       if (lhs->getRenderOrder()<rhs->getRenderOrder()) return true;
       if (rhs->getRenderOrder()<lhs->getRenderOrder()) return false;
--->    return lhs->getRenderOrderNum()<lhs->getRenderOrderNum();
              ^^^                      ^^^
   }
};

Corrected code attached."
2008-09-17 18:42:52 +00:00
Robert Osfield
5209b33c31 From Max Bandazian, "Lines 302-305 of WindowManager.cpp seem to have a parenthesizing error - the code is
if(
                (!win || win->getVisibilityMode() == Window::VM_PARTIAL) &&
                !win->isPointerXYWithinVisible(x, y)
            ) continue;

But it probably should be

if (!win || (win->getVisibilityMode() == Window::VM_PARTIAL) && !win->isPointerXYWithinVisible(x, y)))
   continue;

The effect of the bug is to segfault if a non-osgWidgets::Window node hasn't been excluded from picking via NodeMask."
2008-09-17 17:13:13 +00:00
Robert Osfield
5052432cc7 Updated wrappers 2008-09-17 17:07:52 +00:00
Robert Osfield
22eae68e48 From Mathias Froehlich, "This is a generic optimization that does not depend on any cpu or instruction
set.

The optimization is based on the observation that matrix matrix multiplication
with a dense matrix 4x4 is 4^3 Operations whereas multiplication with a
transform, or scale matrix is only 4^2 operations. Which is a gain of a
*FACTOR*4* for these special cases.
The change implements these special cases, provides a unit test for these
implementation and converts uses of the expensiver dense matrix matrix
routine with the specialized versions.

Depending on the transform nodes in the scenegraph this change gives a
noticable improovement.
For example the osgforest code using the MatrixTransform is about 20% slower
than the same codepath using the PositionAttitudeTransform instead of the
MatrixTransform with this patch applied.

If I remember right, the sse type optimizations did *not* provide a factor 4
improovement. Also these changes are totally independent of any cpu or
instruction set architecture. So I would prefer to have this current kind of
change instead of some hand coded and cpu dependent assembly stuff. If we
need that hand tuned stuff, these can go on top of this changes which must
provide than hand optimized additional variants for the specialized versions
to give a even better result in the end.

An other change included here is a change to rotation matrix from quaterion
code. There is a sqrt call which couold be optimized away. Since we divide in
effect by sqrt(length)*sqrt(length) which is just length ...
"
2008-09-17 16:14:28 +00:00
Robert Osfield
fbeabc23e0 Updated wrappers of osgWidget 2008-09-17 14:23:05 +00:00
Robert Osfield
97b37cb117 Added support for finding DCMTK-3.5.4 installed lib/include placement 2008-09-17 11:43:14 +00:00
Robert Osfield
d57ad27fcc Added osgVolume to docs and wrappers 2008-09-16 18:41:13 +00:00
Robert Osfield
6ea2adf1f5 Introduced beginings of osgVolume NodeKit. 2008-09-16 15:32:23 +00:00
Robert Osfield
28af7882f5 Complted the first pass at the DCMTK based dicom loader 2008-09-16 15:31:47 +00:00
Robert Osfield
d07f3d5662 Added optional usage of DCMTK in the dicom plugin 2008-09-15 19:59:12 +00:00
Robert Osfield
d71a6f6cab Introduced Geometry::containsSharedArrays() and Geometry::duplicateSharedArrays() to
support a fix to the osgUtil::Simplifier that couldn't handle shared arrays
2008-09-14 10:31:27 +00:00
Robert Osfield
995ead176a Introduced TransferFunction1D::assign(ValueMap&). 2008-09-13 09:09:51 +00:00
Robert Osfield
f494bc5b8a Updated wrappers 2008-09-11 16:01:17 +00:00
Robert Osfield
e1930d127e Refinements to SwitchLayer and WhiteListTileLoadedCallback 2008-09-11 14:28:42 +00:00
Robert Osfield
2be243deda Added support for SwitchLayer into GeometryTechnique 2008-09-11 14:27:50 +00:00
Robert Osfield
ff299eb104 Introduced osgTerrain::WhiteListTileLoadedCallback for the management of options terrain layers 2008-09-11 13:21:58 +00:00
Robert Osfield
04a3f0da1c Changed the createGeodeFromImage code to use the non power of two extension, and disabled mipmapping 2008-09-11 09:26:14 +00:00
Robert Osfield
b4b5b5ea41 Introduced TerrainTile::TileLoadedCallback 2008-09-10 18:11:54 +00:00
Robert Osfield
ed4bd41574 Removed unneccessary compound name usage 2008-09-10 16:17:17 +00:00
Robert Osfield
898a0c11c2 Removed debugging output 2008-09-10 11:38:49 +00:00
Robert Osfield
f738ab8fe2 Changed the image reading so that it leverages the osgDB::Input::readImage() method
to ensure that it picks up on any local paths set on the Input object.
2008-09-10 11:28:47 +00:00
Robert Osfield
c266cef6b1 Changed the path management so that the node path is prepended on the database path list, rather than replacing it. 2008-09-10 11:27:45 +00:00
Robert Osfield
45ccf11161 Added osg::Image::set/getWriteHint() that allows images themselves to control how
they are written to disk, either inline or as an external file.  Added support for
this in the .ive plugin.  Default of WriteHint is NO_PREFERNCE, in which case it's
up to the reader/writer to decide.
2008-09-10 11:26:30 +00:00
Robert Osfield
c478ad08fc Fix for when looping is is disabled 2008-09-04 17:30:56 +00:00
Robert Osfield
d2e29efcd9 Added acceptance of .ogv extensions in xine-lib plugin 2008-09-02 16:13:54 +00:00
Robert Osfield
8759984f52 Replaced uint with unsigned int 2008-09-01 15:29:22 +00:00
Robert Osfield
d10d0137b9 Updated wrappers 2008-09-01 14:05:40 +00:00
Robert Osfield
13878d9a2e Changed curr and min to current and minimum respectively, to avoid compile problems under Windows 2008-09-01 14:03:41 +00:00
Robert Osfield
99a294ebae Implemented support for ShapeAttributeList, used John Vidar Larring's initial
submission as a base, but implementing the user data functionality in a different
way to facilitate more flexible user data support
2008-09-01 12:40:33 +00:00
Robert Osfield
befa2112f8 From John Vidar Larring, initial cut of .ive support for ShapeAttributeList user data 2008-09-01 12:39:19 +00:00
Robert Osfield
58f4290310 Updated wrappers 2008-09-01 10:49:22 +00:00
Robert Osfield
7945f94246 From He Sicong, "I found a bug here in VERTICAL_SPLIT stereo type:
The vertical separation not actually displayed as it is set.  So some
display the up and down stereo images style will not be correct.
Someone may forget to change the "Horizontal" to "Vertical" after
copying and pasting the code from above HORIZONTAL_SPLIT code segment.
I've attached the file. By replacing the incorrect "Horizontal" to
"Vertical", the bug is gone.
"
2008-09-01 10:22:06 +00:00
Robert Osfield
2ce8fbdcf9 From Wojciech Lewandowski, "Most recent changes to CameraPathEventHandler change path writing method. Now control points are written on the fly. But default stream precision is not adjusted as it used to and remains set to 6 digits (at least with VS 2008) so larger coordinates like positions on Earth Ellipsoid loose lots of fidelity. This patch fixes this issue.
"
2008-09-01 10:06:19 +00:00
Robert Osfield
bc747b0935 Added CompositeLayer::addLayer(setname,filename) convinience function 2008-08-29 09:28:28 +00:00
Robert Osfield
141296c323 From Michael Guerrero, "I've attached the files with the new addition of the "registered = true"
flag set."
2008-08-29 09:26:07 +00:00
Robert Osfield
ed617f87df Introduce the concept of layer set name, using the osg::Object::s/getName() to store
the setname, and using a compound string (set:setname:filename) in place of standard filename when reading and writing
files.
2008-08-28 16:15:57 +00:00
Robert Osfield
c8ef144532 Converted AutoTransform to use doubles. 2008-08-28 09:43:00 +00:00
Robert Osfield
95a359bdab Introduced SwitchLayer which will form the basis of provided support for varients 2008-08-27 10:13:30 +00:00
Robert Osfield
9499cfa420 Improved the GLSL implementation. 2008-08-26 17:40:04 +00:00
Robert Osfield
6af69a3615 Added wrapper build target for generating the osgWrappers 2008-08-26 12:05:24 +00:00
Robert Osfield
86d2eb1e4a Added provisional block in computePositions() 2008-08-26 09:39:45 +00:00
Robert Osfield
11bd5f39d4 From Ulrich Hertlein, attached is a small fix for a mismatched function signature 2008-08-26 08:41:30 +00:00
Robert Osfield
7f042b803a From Doug McCorkle, via Paul Martz who writes : "Summary: Some platforms/configurations cause application crashes if the
occlusion query result is not ready for retrieval when the app tries to
retrieve it. This fix adds an application-level wait loop to ensure the
result is ready for retrieval. This code is not compiled by default; add "-D
FORCE_QUERY_RESULT_AVAILABLE_BEFORE_RETRIEVAL" to get this code.

Full, gory details, to the best of my recollection:

The conditions under which we encountered this issue are as follows: 64-bit
processor, Mac/Linux OS, multiple NVIDIA GPUs, multiple concurrent draw
threads, VRJuggler/SceneView-based viewer, and a scene graph containing
OcclusionQueryNodes. Todd wrote a small test program that produces an almost
instant crash in this environment. We verified the crash does not occur in a
similar environment with a 32-bit processor, but we have not yet tested on
Windows and have not yet tested with osgViewer.

The OpenGL spec states clearly that, if an occlusion query result is not yet
ready, an app can go ahead and attempt to retrieve it, and OpenGL will
simply block until the result is ready. Indeed, this is how
OcclusionQueryNode is written, and this has worked fine on several platforms
and configurations until Todd's test program.

By trial and error and dumb luck, we were able to workaround the crash by
inserting a wait loop that forces the app to only retrieve the query after
OpenGL says it is available. As this should not be required (OpenGL should
do this implicitly, and more efficiently), the wait loop code is not
compiled by default. Developers requiring this work around must explicitly
add "-D FORCE_QUERY_RESULT_AVAILABLE_BEFORE_RETRIEVAL" to the compile
options to include the wait loop."
2008-08-25 16:43:40 +00:00
Robert Osfield
38efb23901 From Liang Aibin, added support for :
osgFX::Effect
    osgFX::AnisotropicLighting
    osgFX::BumpMapping
    osgFX::Cartoon
    osgFX::Scribe
    osgFX::SpecularHighlights.
2008-08-25 15:57:17 +00:00
Robert Osfield
d3dda658a8 From Liang Aibin, removed redundent spaces 2008-08-25 15:37:48 +00:00
Robert Osfield
5c2a4b014e From Michael Guerrero, Fixed crash that occurred when openning an new movie file after all previous movie ImageStream had been closed. Also add a missing close of the movie file. 2008-08-25 15:20:42 +00:00
Robert Osfield
0c9214636f From Paul Martz, "This change fixes a problem with PAT nodes during FLT export."
Note, Paul Martz has merged this patch into OpenSceneGraph-2.6.
2008-08-25 15:03:31 +00:00
Robert Osfield
43d19c11cf From Guillaume Chouvenc, "I have added the file StateAttribute.cpp in src/osgPlugins/osg
to support the reading and writing of StateAttribute Callback
in osg files.
"
2008-08-25 14:59:06 +00:00
Robert Osfield
8d5bfeddee From Guillaume Chouvenc, "I have modified Uniform.cpp and StateSet.cpp in src/osgPlugins/osg
to support the reading and writing of Uniform Callback and
StateSet Callback in osg files."
2008-08-25 14:54:11 +00:00
Robert Osfield
a2c1dc85dc Removed debug info 2008-08-25 10:38:07 +00:00
Robert Osfield
ff35465a33 Moved _stateset = new StateSet instances to setStateSet(new StateSet) to make
sure the wiring up of the StateSet parents is done consistently
2008-08-25 10:20:20 +00:00
Robert Osfield
78e22f24c2 Introduced initial cut of a dicom loader, which uses ITK to do the loading. 2008-08-22 16:39:17 +00:00
Robert Osfield
8c8421e7a2 Added warning message 2008-08-22 16:37:56 +00:00
Robert Osfield
f930e707e8 Added checked against an empty _kdNodes list before commensing with intersection 2008-08-19 17:41:55 +00:00
Robert Osfield
8303f03b24 Added .ive support for BlendEquation 2008-08-18 15:06:41 +00:00
Robert Osfield
4adb68c802 Added BlendEquation .osg support 2008-08-18 14:49:16 +00:00
Robert Osfield
9bc5d7f000 Updated wrappers 2008-08-18 11:48:07 +00:00
Robert Osfield
8ecf508fda From Sergey Leontyev, "1. In StyleManager
when applying styles to a Label element the code below runs in a infinite loop.

The reason for this is that nothing increments the Reader "r" in the case when applying a style to label,

so I advance the reader when no match was found. 

( To replicate the error apply style to any label)

 

replaced this:

                while(!r.eof()) if(_styles[style]->applyStyle(t, r)) inc = true;

 

with this:

                while(!r.eof())

                 {

                                if(_styles[style]->applyStyle(t, r))

                                    inc = true;

                                else

                                    r.advanceOverCurrentFieldOrBlock();

                 }            

 

 

I tested it and it works well for me, I did not find any problems with it.

 

 

2.  Added style support for Canvas element, event though there is no styles to apply yet.

It is usefull for someone who inherits from Canvas class to develop another element.

 If applyStyle(Canvas) does not exist

there is no way to apply style to the  element that inherited from Canvas element.

 

Added virtual

     bool applyStyle(Canvas).

 

and in added call to apply style if the Object is of type Canvas:

StyleManager::_applyStyleToObject(osg::Object* obj, const std::string& style) {

...

 

else if(!std::string("Canvas").compare(c))

return _coerceAndApply<Canvas>(obj,style,c);

 "
2008-08-18 11:21:41 +00:00
Robert Osfield
0b39044666 Ran fixtabs to enforce four space tabs 2008-08-18 11:17:44 +00:00
Robert Osfield
9c8e44659f From Erik van Dekker,
"I made several modifications:

 

    * The cause of my errors was that my OSG source directory path contains spaces. To fix this issue I wrapped all paths with quotes, as stated in doxygen documentation.

 

    * I also received some warning messages about deprecated doxygen settings, which I fixed by updating the doxygen file, i.e. running \u2018doxygen \u2013u doxygen.cmake\u2018. By running this command deprecated doxygen options are removed, some option comments have changed and quite some options have been added (I kept their default settings unless mentioned).

 

    * I was surprised to find that the doxygen OUTPUT_DIRECTORY was set to \u201c${OpenSceneGraph_SOURCE_DIR}/doc\u201d, which does not seem appropriate for out of source builds; I changed this to \u201c${OpenSceneGraph_BINARY_DIR}/doc\u201d. (On the other hand, maybe a cmake selectable option should be given to the user?)

 

    * Fixed two warnings I received about unexpected end-of-list-markers in \u2018osg\AnimationPath and \u2018osgUtil\CullVisitor due to excess trailing points in comments.

 

    * Fixed a warning in osgWidget\StyleInterface due to an #include directive (strangely) placed inside a namespace.

 

    * Fixed a warning in osg\Camera due to the META_Object macro that confused doxygen. Adding a semi-colon fixed this.

 

    * Removed auto_Mainpage from the INCLUDE option, because I am positive that this file does not belong there; It never generated useful documentation anyway.

 

    * I added the OSG version number environment variable to the PROJECT_NUMBER option so that the version number is now shown on the main page of generated documentation (e.g. index.html).

 

    * Changed option FULL_PATH_NAMES to YES, but made sure STRIP_FROM_PATH stripped the absolute path until the include dir. This fixed an issue that created mangled names for identical filenames in different directories. E.g. osg/Export and osgDB/Export are now correctly named.

 

    * Changed option SHOW_DIRECTORIES to yes, which is a case of preference I guess.

 "
2008-08-18 11:00:40 +00:00
Robert Osfield
3de3b2dccc From Maceij Krol, "I have implement frame based expiration of PagedLOD children.
New attribute DatabasePager::_expiryFrames sets number of frames a PagedLOD child is kept in memory. The attribute is set with DatabasePager::setExpiryFrames method or OSG_EXPIRY_FRAMES environmental variable.

New attribute PagedLOD::PerRangeData::_
frameNumber contains frame number of last cull traversal.

Children of PagedLOD are expired when time _AND_ number of frames since last cull traversal exceed OSG_EXPIRY_DELAY _AND_ OSG_EXPIRY_FRAMES respectively. By default OSG_EXPIRY_FRAMES = 1 which means that nodes from last cull/rendering
traversal will not be expired even if last cull time exceeds OSG_EXPIRY_DELAY. Setting OSG_EXPIRY_FRAMES = 0 revokes previous behaviour of PagedLOD.

Setting OSG_EXPIRY_FRAMES > 0 fixes problems of children reloading in lazy rendering applications. Required behaviour is achieved by manipulating OSG_EXPIRY_DELAY and OSG_EXPIRY_FRAMES together.

Two interface changes are made:

DatabasePager::updateSceneGraph(double currentFrameTime) is replaced by DatabasePager::updateSceneGraph(const osg::FrameStamp &frameStamp). The previous method is in #if 0 clause in the header file. Robert, decide if You want to include it.

PagedLOD::removeExpiredChildren(double expiryTime, NodeList &removedChildren) is deprecated (warning is printed), when subclassing use PagedLOD::removeExpiredChildren(double expiryTime, int expiryFrame, NodeList &removedChildren) instead. "
2008-08-17 16:52:35 +00:00
Robert Osfield
0c234e7997 From Jason Beverage, "I've got a few machines that OSG incorrectly believes support FRAME_BUFFER_OBJECTS so I am manually trying to set the renderTargetImplementation to PIXEL_BUFFER or PIXEL_BUFFER_RTT. I noticed that this call wasn't setting the camera's overlay data properly because the setRenderTargetImplementation simply calls init() which only does anything for OBJECT_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY. Any subsequent calls to getOverlayData will simply return the cached OverlayData instead of setting it up.
My fix updates the camera's render target implementation for all OverlayData objects in the OverlayDataMap."
2008-08-17 16:45:09 +00:00
Robert Osfield
f0c2b89fc5 From Paul Palumbo, "Fixes a typo in coverage antialiasing code... Without this fix, get incorrect antialiasing results. " 2008-08-15 17:35:04 +00:00
Robert Osfield
dceb3cbe88 From Jutta Sauer, "We added a raise window method to GraphicsWindow. And added two
implementations for Win32 and X11.

"
2008-08-15 17:32:26 +00:00
Robert Osfield
0448b31f93 From Frashid Larshkari, "I modified the vertical/horizontal interlace stereo modes so that they
use the osg::State::applyMode for enabling/disabling certain while
rendering the stencil mask. Previously some of these calls were
overriding the scene graph states because the global state was not
aware of this change.

"
2008-08-15 17:25:42 +00:00
Robert Osfield
5400e570c7 Added support for geometry shader attributes 2008-08-15 17:18:10 +00:00
Robert Osfield
7cd4641ece From Stephane Lamoliatte, "I added the osg::Program parameters support for the osg plug'in.
Now we could correctly configure geometry shaders in osg files."

Notes from Robert Osfield, renamed the names of the parameters to be less GL centric and more human readable.
2008-08-15 16:43:56 +00:00
Robert Osfield
38f6cddc2c Changed osg::ImageSequence::set/getDuration to set/getLength() to be in keeping with the
osg::ImageStream's getLength().
2008-08-15 16:21:44 +00:00
Robert Osfield
c6c5cdaf89 Updated wrappers 2008-08-15 13:06:18 +00:00
Robert Osfield
927942a0f8 Further work on osg::ImageSequence, improving pause functionality, and introducing new seek(double time) method 2008-08-15 12:45:20 +00:00
Robert Osfield
49e7358bf6 Added initial looping and pause play support 2008-08-14 16:29:12 +00:00
Robert Osfield
bcbd50af39 Implemented a reference eye point and associated methods in support of intersecting billboards 2008-08-14 14:22:39 +00:00
Robert Osfield
f17b307305 Added NullStream class that automatically creates and delete the NullStreamBuffer, thus fixing a memory leak 2008-08-05 15:11:47 +00:00
Robert Osfield
7a7ee85f69 From Eric Sokolowski, "Fixed the build of the osgViewer library to get GL/glx.h from the right place, when building on OSX with X11" 2008-08-05 15:06:22 +00:00
Robert Osfield
7f8183f64c Merged changes to OpenSceneGraph-2.6 into trunk using :
svn merge -r 8729:8734 http://www.openscenegraph.org/svn/osg/OpenSceneGraph/branches/OpenSceneGraph-2.6 .
2008-08-05 11:17:48 +00:00
Robert Osfield
384d2921fd Moved initial drawable setup to within the mutex locked section to avoid multi-threaded crash on startup. 2008-08-04 12:47:14 +00:00
Robert Osfield
6595562442 Removed debug info 2008-08-04 12:27:22 +00:00
Robert Osfield
c8001915f6 From Ulrich Hertlien, "attached is a patch to src/osgPlugins/quicktime/QTImportExport.cpp that fixes loading images using the quicktime loader. Also fixes some minor bugs like uninitialized variables and incorrect deletes.
I'm a bit puzzled why this didn't pop up for more people as it's quite severe: basically the filename was never set!""
2008-08-04 09:05:29 +00:00
Robert Osfield
fcc8426226 Added a small epsilon expansion of the bounding box being clipped/intersected against, to avoid numberic errors causing problems. 2008-08-04 08:45:08 +00:00
Robert Osfield
268b79d03f Improved the terrain intersection code so that it produces more stable terrain movements. 2008-08-03 20:35:45 +00:00
Robert Osfield
f81ff952a2 merged 2.6 branch changes back into trunk using : svn merge -r 8699:8706 http://www.openscenegraph.org/svn/osg/OpenSceneGraph/branches/OpenSceneGraph-2.6 . 2008-08-03 16:57:09 +00:00
Robert Osfield
ced418ccb5 Moved bb expansion out of loop. 2008-08-03 16:48:12 +00:00
Robert Osfield
bdd558af3b Updated wrappers 2008-07-25 20:50:59 +00:00
Robert Osfield
5cac386fa6 Renamed enums in osgWidget from ALLCAPITALS to normal OSG conventional of AllCapital 2008-07-25 20:50:42 +00:00
Robert Osfield
eed365aef4 Added PluginQuery function to wrappers 2008-07-25 20:49:17 +00:00
Robert Osfield
f4d74b66cf Added OSGPL Copyright notices 2008-07-25 20:04:41 +00:00
Robert Osfield
e525dd21bf Improved handling of PAGE_AND_RETAIN_IMAGES 2008-07-25 18:44:13 +00:00
Robert Osfield
65d5ef608d Reverted back to using std::list<std::String> 2008-07-25 17:42:37 +00:00
Robert Osfield
d137394169 Added Mode support 2008-07-25 16:23:00 +00:00
Robert Osfield
d0890ab250 Updated wrappers, and further refined the ImageSequence API 2008-07-25 16:11:51 +00:00
Robert Osfield
d8d2bc4193 From Ulrich Hertlein, "as I hinted at on osg-users in the "obj loader: map_* only reads last component" thread, this submission broke material/texture loading for some files I have that specify texture matrix scaling.
The following link shows a very comprehensive list of .mtl file options:
http://local.wasp.uwa.edu.au/~pbourke/dataformats/mtl/

Attached is a patch that should fix spacey filenames and optional texture scale/offset.  I have tested it with files I have that I modified to contain spaces in the texture filenames."
2008-07-25 15:45:40 +00:00
Robert Osfield
ec4d189b64 Added ImageSequence to .ive plugin, added support for multiple ImageThreads in osgDB::ImagePager 2008-07-25 13:45:07 +00:00
Robert Osfield
0d1656055c Moved PluginQuery from osgconv into osgDB 2008-07-25 10:18:36 +00:00
Robert Osfield
5cdb5c055c Added extension docs 2008-07-25 10:18:14 +00:00
Robert Osfield
7c6aba874b Added option docs 2008-07-25 09:46:05 +00:00
Robert Osfield
79fbab4a95 From Paul Martz, "Not sure about the descriptions, so I left those blank. But at least "osgconv --formats" will display the .ive options now." 2008-07-24 13:25:49 +00:00
Robert Osfield
c8d3e81e08 Updated wrappers 2008-07-24 12:48:25 +00:00
Robert Osfield
6915bce1a2 Added a getCurrentRenderStage() and getCurrentCamera() convninience methods, and
converted the CullVisitor::apply(OcclusionQueryNode&) implementation to use the
new getCurrentCamera method.
2008-07-24 12:18:49 +00:00
Robert Osfield
7dabdf5d7e Added supportOptions() entry docs 2008-07-24 12:01:45 +00:00
Robert Osfield
ea309e2677 From Bob Kuehne, "fix for filenames that have spaces within their name."
Note form Robert, changed std::cout to osg::notify(osg::INFO)
2008-07-24 11:22:43 +00:00
Robert Osfield
4fe8907748 Updated wrappers 2008-07-23 22:19:37 +00:00
Robert Osfield
ec9218ad1f Refactored OverlayData so that its possible to subclass OverlayNode/OverlayData. 2008-07-23 22:19:29 +00:00
Robert Osfield
820586a3d0 Added wrappers 2008-07-23 21:52:03 +00:00
Robert Osfield
dc05f2ef95 Moved helper classes into Protected section 2008-07-23 21:49:07 +00:00
Robert Osfield
86ca0860cc From Paul Martz, typo fixes 2008-07-23 21:25:09 +00:00