Commit Graph

2846 Commits

Author SHA1 Message Date
Robert Osfield
2d55740b3e Refactored osg::TransferFunction1D to use an std::map internally which is kept in sync with the actual osg::Image that is passed to the GPU.
Added .osg support for osg::TransferFunction1D.

Updated wrappers
2009-02-02 14:43:27 +00:00
Robert Osfield
6130f292a7 From Sukender, add check against NULL parameter value 2009-02-02 09:23:28 +00:00
Robert Osfield
d6b0cd64f1 Ground work for full .osg support for osg::TransferFunction* 2009-02-01 12:38:55 +00:00
Robert Osfield
411431f3be Fixed warnings, updated NEWS 2009-01-30 10:55:28 +00:00
Robert Osfield
ac264a4a0c Moved push/popCulling set it public scope. 2009-01-28 15:15:19 +00:00
Robert Osfield
d2d89498ad Fixed the handling of setLightingMode and inheritCullSettings so that it properly manages the GL_LIGHTING mode 2009-01-28 09:23:26 +00:00
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
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
48f683ec3f Ported onscreen camera stats across to using thread safe stats collection 2009-01-26 21:23:09 +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
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
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
4161762cff Removed unneccesary warning disables 2009-01-23 14:00:49 +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
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
a6284b0e03 Renamed ShaderTechnique to RayTracedTechnique 2009-01-21 14:27:58 +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
a40aa3a734 Moved PropertyAdjustmentCallback from osgvolume.cpp into osgVolume.
Updated lighting shaders.
2009-01-20 17:41:45 +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
b176c3a223 Removed old volume rendering scene graph code from osgvolume example.
Moved createNormalMapTexture and applyTransferFunction functions from osgvolume example into include/osgVolume/Layer.
2009-01-16 17:59:38 +00:00
Robert Osfield
9d4b44f956 Completed firt pass implementation FixedFunction and ShaderTechnique. 2009-01-16 16:21:54 +00:00
Robert Osfield
29ac92df0e Moved basics of fixed function pipeline implementation from osgvolume example into osgVolume 2009-01-16 11:27:20 +00:00
Robert Osfield
78c2f98b7a Introduced ImageLayer computeMinMax + rescaling methods, and use of rescaleToZeroToOneRange by default. 2009-01-16 10:23:17 +00:00
Robert Osfield
ba94ea8c7d Introduce osgVolume::PropertVisitor, and IsoSurface, MaximumImageProjection, Ligting and AlphaFunc Properties 2009-01-15 15:57:04 +00:00
Robert Osfield
3be239bdb2 Removal of rendundant characters from Camera and Camera.cpp.
Updated wrappers
2009-01-15 10:44:52 +00:00
Robert Osfield
2f7fb53ff7 From Rudolf Wiedemann, "attached is the osg::Camera class (based on revision 9493), where
methods
 getProjectionMatrixAsOrtho()
 getProjectionMatrixAsFrustum()
 getProjectionMatrixAsPerspective()
 getViewMatrixAsLookAt() (2x)
are now const, as they only call const methods of osg::Matrixf/d.
"
2009-01-15 10:36:04 +00:00
Robert Osfield
c28221b06f Changed setVolumeTechnique to setVolumeTechniquePrototype() 2009-01-14 20:43:21 +00:00
Robert Osfield
778f4e321d Added VolumeTechnique to Volume 2009-01-14 20:38:12 +00:00
Robert Osfield
d87ec7cb18 Introduced osgVolume::Property, CompositePropery and TransferFunctionPropety classes 2009-01-14 15:16:29 +00:00
Robert Osfield
f260737cd8 Introduced class interfaces for FixedFunctionTechnique and ShaderTechnique volume rendering techniques. 2009-01-13 17:20:32 +00:00
Robert Osfield
2287f1190b Updated version number for next dev release 2009-01-09 15:25:34 +00:00
Robert Osfield
458993fa88 Moved osgVolume::ImageUtils to osg::ImageUtils, updated wrappers, and started moving osgvolume example across to create osgVolume subgraphs 2009-01-09 15:19:25 +00:00
Robert Osfield
fa499dc55f From Andy Skinner, fixes for Solaris build 2009-01-09 12:17:40 +00:00
Robert Osfield
3b192f5119 Added checked from the ARG version of glDraw*Instanced(). 2009-01-08 11:19:21 +00:00
Robert Osfield
95ebf1fe71 From Andy Skinner, "I added a const_cast for a call to atomic_cas_ptr, which takes a void* and has been given a const void* const." 2009-01-08 11:16:56 +00:00
Robert Osfield
5275c11d06 From Blasius Czink, "It seems there is no atomic_xor_uint_nv(). I
attached a changed version of the Atomic header where a mutex fallback
is used for "xor" on solaris."
2009-01-08 11:15:14 +00:00
Robert Osfield
46eeac4514 Moved supression of VS warning C4706 from the include/osg/Export header into the CMake options list. Added suppression of C4127 as well. 2009-01-08 10:34:05 +00:00
Robert Osfield
fb75c50714 Fixed assingment operator 2009-01-07 15:35:28 +00:00
Robert Osfield
4add5f6fd1 Added supression VS warning "C4706: assignment within conditional expression" thanks gets spat out even for perfectly valid if ((variable=expression)) {} usage. 2009-01-07 15:33:24 +00:00
Robert Osfield
98bd058317 Fixed warnings 2009-01-07 10:32:59 +00:00
Robert Osfield
85c510ba27 Added a protected = operator 2009-01-07 09:49:49 +00:00
Robert Osfield
8745ec7d69 Removed the usage of assert to prevent associated compile warnings and to clean up code 2009-01-06 19:09:50 +00:00
Robert Osfield
4f3b1baee4 Added support for primitive instancing 2009-01-06 14:55:49 +00:00
Robert Osfield
85fffc2e76 From Roland Smeenk, "Attached you will find an improved Collada plugin to properly support camera's.
A Collada camera will be added to the scenegraph as osg::CameraView. This allows the user to create a set of predefined camera viewpoints. I also added a new MatrixManipulator to osgGA called CameraViewSwitchManipulator and added usage of this to the osgviewer example. This manipulator allows switching between the predefined camera viewpoints. The current design limition I ran into is that a MatrixManipulator only manipulates the ViewMatrix, but for this particular  manipulator I also want to update the projectionMatrix of the camera when switching to a new viewpoint. This is not implemented because I don't know what would be the best way to design it. Any ideas?
 
Furthermore Collada also supports orthographic camera's, where an osg::CameraView only supports a perspective camera. Would it be useful to create a CameraView with customizable optics for this?"
2009-01-05 16:53:29 +00:00
Robert Osfield
375253ae8a From Paul Martz, Correction to Timer method comment. 2009-01-05 11:58:08 +00:00
Robert Osfield
c8752d6c18 From Cedric Pinson, added non const getText() method 2009-01-05 11:31:38 +00:00