Commit Graph

8852 Commits

Author SHA1 Message Date
Robert Osfield
a51e95222d From Patrick Hartling, "I encountered a bug related to RTTI for subclasses of osg::Shape. The
circumstances under which this bug occur are rather specific, but the
basic problem occurs when one translation unit other than libosg.so
constructs an object that is a subclass of osg::Shape and another
translation unit other than libosg.so tries to perform a dynamic_cast or
other RTTI-based operation on that object. Under these circumstances,
the RTTI operation will fail. In my case, the translation units involved
were an application and osgdb_ive.so. The application constructed a
scene graph that included instantiations of subclasses of osg::Shape.
Depending on how the user ran the application, it would write the scene
graph to an IVE file using osgDB::writeNodeFile(). The dynamic_cast
operations in DataOutputStream::writeShape() would fail on the first
subclass of osg::Shape that was encountered. This is because there were
two different RTTI data objects for all osg::Shape subclasses being
compared: one in the application and one in osgdb_ive.so.

The fix for this is simple. We must ensure that at least one member
function of each of the subclasses of the polymorphic type osg::Shape is
compiled into libosg.so so that there is exactly one RTTI object for
that type in libosg.so. Then, all code linking against libosg.so will
use that single RTTI object. The following message from a list archive
sort of explains the issue and the solution:

  http://aspn.activestate.com/ASPN/Mail/Message/1688156

While the posting has to do with Boost.Python, the problem applies to
C++ libraries in general."
2009-01-28 09:21:46 +00:00
Robert Osfield
998582e945 Added back in intializers for RenderSurface. 2009-01-28 09:06:46 +00:00
Robert Osfield
e02ef22062 Removed .pc files as they are now automatically generated with the correct values by Cmake from the openthreads.pc.in and openscenegraph.pc.in files. 2009-01-27 15:35:51 +00:00
Robert Osfield
c898bc0ce7 From Alberto Luaces, "I have modified CMakeLists.txt in order to make CMake fill the existent
openscenegraph.pc and openthreads.pc files with OSG's installation values.
Then I install those files into the expected path for pkg-config (this can
also be modified through PKG_CONFIG_PATH environment variable). Therefore
those of us who are using pkg-config for linking can easily select which
version of OSG we want to use."
2009-01-27 15:34:57 +00:00
Robert Osfield
0308a2005e From Alberto Luaces, "I have modified CMakeLists.txt in order to make CMake fill the existent
openscenegraph.pc and openthreads.pc files with OSG's installation values.
Then I install those files into the expected path for pkg-config (this can
also be modified through PKG_CONFIG_PATH environment variable). Therefore
those of us who are using pkg-config for linking can easily select which
version of OSG we want to use."
2009-01-27 15:34:28 +00:00
Robert Osfield
a7b057feee From Jason Beverage, "Here is a small fix that enables writing 16 bit short images in the tiff plugin.
"
2009-01-27 15:14:47 +00:00
Robert Osfield
c7744b15a3 Converted viewer camera references to use observer_ptr<> rather than ref_ptr<> or C pointers to avoid issues with circular references/dangling pointers. 2009-01-27 14:11:37 +00:00
Robert Osfield
29157f24d9 Refactored the view stats. 2009-01-27 13:23:20 +00:00
Robert Osfield
1787efc9a3 Commented out debug message 2009-01-27 09:09:48 +00:00
Robert Osfield
48f683ec3f Ported onscreen camera stats across to using thread safe stats collection 2009-01-26 21:23:09 +00:00
Robert Osfield
eb17751edd Added passing of command line args to cmake 2009-01-26 19:22:27 +00:00
Robert Osfield
c7bf776bcb Converted across to using ref_ptr<> to avoid memory leak/dangling pointer issues. 2009-01-26 16:55:53 +00:00
Robert Osfield
69f9377093 Fixed effective leak in Program::PerContextProgram caused by previously osg::State keeping a set of std::ref_ptr<Program::PerContextProgram> without ever pruning this list.
The fix was to convert the osg::State to use C pointers for the set of applied PerContexProgram objects, and use the osg::Oberver mechanism to avoid dangling pointers for being maintained in osg::State.
2009-01-26 15:16:24 +00:00
Robert Osfield
55a0381687 Moved the XRANDR include into LIB_PRIVATE_HEADERS to avoid FreeBSD build problem 2009-01-26 13:48:50 +00:00
Robert Osfield
f623f6e83f Updated wrappers 2009-01-26 10:52:16 +00:00
Robert Osfield
6b48e4b1ea From Rick Appleton, "In DatabasePager.cpp I believe there's a copy-paste ommission. A little bit further down the file where the Drawables are compiled the code is similar to how I have fixed the code here for the StateSets. If the DatabasePager thread is supposed to pre-compile things, it will call the compileGLObjects such that compileAll will be true. However, when compiling StateSets compileAll isn't currently checked." 2009-01-26 10:35:16 +00:00
Robert Osfield
2d9097bb26 Changed META_NodeVisitor usage to META_Object as it's more appropriate. 2009-01-24 10:02:32 +00:00
Robert Osfield
e4b2562f7b From Stephan Huber, "OS X failed to compile AnimationManager because of
the useage of META_Node-macro, but AnimationManager is inherited from
NodeVisitor, so I changed the Macro to META_NodeVisitor"
2009-01-24 10:00:23 +00:00
Stephan Maximilian HUBER
85d993cdef From Stephan Huber: updated XCode project 2009-01-23 23:04:18 +00:00
Robert Osfield
88ce4a3786 From Roland Smeenk, "attached is a small crash fix for the case that a texture is used for transparency without the availability of a diffuse texture." 2009-01-23 15:52:10 +00:00
Robert Osfield
e0c279bf3d Added forward declaration of callbacks to headers to avoid scoping issues of classes with same names. 2009-01-23 15:50:05 +00:00
Robert Osfield
7b598c5701 Warning fixes for VS, and removal of associated warning disables 2009-01-23 15:12:26 +00:00
Robert Osfield
aa8402ce81 Added workaround for silly posix read deprecation warning under VS. 2009-01-23 15:02:04 +00:00
Robert Osfield
4161762cff Removed unneccesary warning disables 2009-01-23 14:00:49 +00:00
Robert Osfield
1fe0f0c0d6 Added range of visual rendering properties to readNode's creation of VolumeTile/ImageLayer. 2009-01-23 11:52:18 +00:00
Robert Osfield
b36f7e1fe7 From Mattias Froehlich, "To pass the Microsoft application verifier we have tried to get osgviewer
working with that thing.
This is what was missing so far:

Make win32 threads behave like the posix implementation when setting thread
cpu affinity. That includes avoid setting thread affininty on a non running
thread. Set that once it is running."
2009-01-23 10:29:09 +00:00
Robert Osfield
c17d85c241 From Lionel Lagarde, "here is a correction on
osgVolume/Property
  added OSGVOLUME_EXPORT to PropertyAdjustmentCallback

osgVolume/VolumeTile.cpp
  in copy constructor, removed ';' on if (volumeTile.getVolumeTechnique())"
2009-01-23 09:24:34 +00:00
Robert Osfield
33db349781 Upped notification level of timing stats 2009-01-23 09:22:31 +00:00
Robert Osfield
2e7ef9ed62 Updated wrappers 2009-01-21 19:28:46 +00:00
Robert Osfield
55e89e4466 From Cedric Pinson, "updated osgAnimation with the trunk here the update:
examples/osganimationviewer/AnimtkViewer.cpp:
- add option to display bone (--drawbone)
- dont crash if the file does not contains a AnimationManagerBase, display the content only

examples/osganimationviewer/AnimtkViewerGUI.cpp:
- adjust the path of image for the gui

include/osgAnimation/Interpolator:
- add warn message instead of old assert

include/osgAnimation/Bone:
src/osgAnimation/Skeleton.cpp:
- change a method name to fit better with what it does. setMatrixInSkeletonSpace instead of setBoneInSkeletonSpace

include/osgAnimation/Skinning:
src/osgAnimation/RigGeometry.cpp:
- add patch from Fabien Lavignotte to compute normal correctly

include/osgAnimation/Sampler:
- adjust behviour without assert, return 0 instead of crashing
"
2009-01-21 19:02:54 +00:00
Robert Osfield
d542961ca3 Fixed compile errors for when ref_ptr<> auto conversion is disabled 2009-01-21 19:01:26 +00:00
Robert Osfield
99313d225b From Roger James, The changes are as follows:-
1. Support for ambient occlusion maps.
2. A fix for the incorrect handling of normals on all geometries. The optimizer usually fixed this bug so it probably was not noticed very often.
3. A new option flag on the reader. "StrictTransparency"
          // Process transparent and transparency settings according to a strict interpretation of the spec
          // See https://collada.org/public_forum/viewtopic.php?f=12&t=1210
otherwise
          // Jump through various hoops to accomodate the multiplicity of different ways
          // that various people have interpreted the specification
4. Handling of texures in the transparent channel. This is allowed provided that they are the same texture that is specified in the diffuse channel. Accomodating a different texture would require use of programmable pipeline functionality which I have tried to avoid.
5. Handling of <bind_vertex_input> elements.
""
2009-01-21 18:47:55 +00:00
Robert Osfield
a3b91f9294 From Mattias Helsing, "got some feedback from J-S on the packaging so I have changed the
name of the top folder in each package to OpenSceneGraph-x.y.z

Noone else has had an opinion on whether compiler and it's version
should be part of the package filename on their platform/setup so I'll
leave it as is. That is - No action is taken for compilers other than
msvc but one can easily add this information to the cmake cache
regardless of platform.
"
2009-01-21 18:34:10 +00:00
Robert Osfield
908432c732 Replaced readImageFile() usage with readRefImageFile() to prevent threading issues with caching of imagery in the osgDB::Registry cache. 2009-01-21 18:23:55 +00:00
Robert Osfield
e17535813f From Jason Beverage, "I realized today that there is an issue with the Registry changes I submitted to allow plugins to have the first go at URLs.
The code works fine as is if the format plugin is not already loaded in memory.

If a plugin is already in memory, say the PNG plugin for example, then a call to readImageFile("http://server.com/image.png") will return FILE_NOT_FOUND because osgDB::findDataFile will not be able to locate the file.  So the Registry::read method is returning before the CURL plugin is given a chance to download the file.

I've made a few changes to the Registry to not return FILE_NOT_FOUND if the filename contains a URL that fix the issue."
2009-01-21 17:10:51 +00:00
Robert Osfield
39fc490a64 From Sherman Wilcox, "Minor change to the glPushAttrib(...) call in
renderWithStencilBuffer(...)  - added GL_STENCIL_BUFFER_BIT"
2009-01-21 14:37:36 +00:00
Robert Osfield
a6284b0e03 Renamed ShaderTechnique to RayTracedTechnique 2009-01-21 14:27:58 +00:00
Robert Osfield
0897368fa6 Cleaned up osgvolume 2009-01-21 12:06:13 +00:00
Robert Osfield
1c88753551 Introduced the ability to switch between different visual properties in osgVolume 2009-01-21 11:46:03 +00:00
Robert Osfield
f23f2c351f Updated wrappers 2009-01-20 17:53:06 +00:00
Robert Osfield
a40aa3a734 Moved PropertyAdjustmentCallback from osgvolume.cpp into osgVolume.
Updated lighting shaders.
2009-01-20 17:41:45 +00:00
Robert Osfield
0739b09519 Removed redundent shader files 2009-01-20 15:30:30 +00:00
Robert Osfield
bda89b113e Added lighting based shaders 2009-01-20 15:29:32 +00:00
Robert Osfield
fe667cdd2b Added event key variables 2009-01-20 15:06:44 +00:00
Robert Osfield
d46e0fcc79 Added support for SampleDensityProperty and TransparencyProperty 2009-01-20 13:50:57 +00:00
Robert Osfield
87cd4530f5 Added AlphaFunc support into osgVolume::AlphaFuncProperty. 2009-01-20 12:39:26 +00:00
Robert Osfield
8a971d96d2 Fixed compile error when using ITK 2009-01-20 11:34:15 +00:00
Robert Osfield
894b161878 Updated event callback to be able to update iso surface value. 2009-01-17 17:23:47 +00:00
Robert Osfield
71ee1a7047 Updated Uniform name for controlling IsoSurfaceValue 2009-01-17 17:23:17 +00:00
Robert Osfield
069d86ae8b Updated wrappers 2009-01-17 16:00:39 +00:00