Commit Graph

3225 Commits

Author SHA1 Message Date
Robert Osfield
1fce3c0ad1 Added handling of resetting of the texture object format 2009-09-27 15:14:57 +00:00
Robert Osfield
4d75729650 Added stats collection to new Texture Pool code, and improved TexturePool implementation.
The Texture Pool can be enabled by setting the env var OSG_TEXTURE_POOL_SIZE=size_in_bytes.
Note, setting a size of 1 will result in the TexturePool allocating the minimum number of
textures it can without having to reuse TextureObjects from within the same frame.
2009-09-25 18:05:54 +00:00
Robert Osfield
6bc9c626f4 Fixed warning 2009-09-25 18:03:49 +00:00
Robert Osfield
216849f73a From Jean-Sebastien Guay, fixed Widows build and updated the SO version 2009-09-23 15:16:34 +00:00
Robert Osfield
d56499025b Introduced memory pool size management 2009-09-23 13:51:20 +00:00
Robert Osfield
3d75054e2c Preliminary work on support for a texture object pool that is designed to help manage resources down the GPU more tightly. 2009-09-22 18:45:24 +00:00
Cedric Pinson
2b3d76aade From Cedric Pinson, Fix createKeyframeContainerFromTargetValue to recreate its sampler from scratch to not change keyframe container of another sampler 2009-09-09 18:13:24 +00:00
Cedric Pinson
d28b052fb7 From Cedric Pinson, remove unsused files include/osgAnimation/AnimationManager and src/osgAnimation/AnimationManager.cpp 2009-09-09 09:54:29 +00:00
Cedric Pinson
9b95a78e5d From Michael Platings, I have removed Target::normalize() as calling it was incorrect - the interpolation is already done in such a way that the Target's value is always normalized.
Finally, I have fixed TemplateTarget<osg::Quat>::lerp() as it was giving incorrect results when interpolating between some small rotations.
From Cedric Pinson, i renamed the method in channel to be more general. Adjusted the CubicBezier key constructor to use a single value as input.
2009-09-09 09:52:54 +00:00
Robert Osfield
fa84f280f6 Renamed the osgVolume::Layer/ImageDetails parameters RescaleIntercept and RescaleSlope to more general TexelOffset and TexelScale, and changed type to Vec4.
Refactored the transfer function set up in RayTracedTechnique to prepare for new scale and offset uniforms.

Updated wrappers
2009-09-03 13:40:50 +00:00
Robert Osfield
43e3089417 Added support for recording the RescaleIntecept and RescaleSlope from the dicome files and passing these values onto osgVolume::ImageLayer 2009-09-01 10:48:32 +00:00
Cedric Pinson
641769a681 From Cedric Pinson, add missing files 2009-08-31 10:37:44 +00:00
Cedric Pinson
b6ab5bbe27 From Cedric Pinson, The following modification are
Update Timeline.cpp to add current layer to the ActionVisitor, use correctly the priority
Add accessors in Action.cpp to retrieve protected data
Split files and rename them to classname
Change de default color of UpdateMaterial to FFOOFF to detect unset value
Add accessors in LinkVisitor instead of accessing data directly
Update osganimationtimeline example to fit the api callback
2009-08-31 09:40:56 +00:00
Robert Osfield
ca78f3a6bc Added support to .p3d format's volume tag for the properties:
region="xmin ymin zmin xmax ymax zmax"
   alpha="float_value"
   cutoff="float_value"
   sampleDenstiy="float_value"
2009-08-27 16:42:47 +00:00
Cedric Pinson
3f9216800d From Michael Platings, I've moved the matrix updating from UpdateSkeleton to UpdateBone. UpdateSkeleton now merely checks that Bones appear before other children and issues a warning if this isn't the case 2009-08-27 16:21:01 +00:00
Cedric Pinson
729d5205ef From Michael Platings, I've just added a few simple accessors I found necessary 2009-08-26 16:39:53 +00:00
Cedric Pinson
3c45fb1e6c From Michael Platings,
- Animations with equal priority are now weighted correctly relative to each other
- (minor) Channels no longer store their weight as the only time it's used is in update() when Animation can pass in the weight directly
From Cedric Pinson,
- I adjusted the quaternion blending to keep the commutativy property
2009-08-26 09:24:02 +00:00
Robert Osfield
c56dd6faa5 From Michael Platings, "the DAE importer was crashing when calling osg::Object::setName with a null pointer argument. Rather than trying to fix all the places this might happen and probably missing a few, I thought it would be better to trivially validate the input in setName. With this fix if setName is called with a null pointer then the name is cleared." 2009-08-22 17:13:19 +00:00
Robert Osfield
fd299b5f65 From Magnus Kessler, "At the end of the void function
osg::Animation::TemplateStepInterpolator::getValue the code tries to return
the result rather than assigning it to the result parameter reference.

The following patch fixes this."
2009-08-21 11:31:10 +00:00
Robert Osfield
aa85f18bbc From Stephane Lamoliatte, "I just add the a missing getView() function to the WindowManager." 2009-08-21 09:54:45 +00:00
Robert Osfield
3f65f4f80b From Wojciech Lewandowski, support for FBO's without colour or depth attachments.
Note from Robert Osfield, I've temporarily re-enabled the old focing of of color and depth attachment to avoid regressions on some OpenGL driver.  We'll revist this once
we have a mechanism for controlling this override at runtime.

#define FORCE_COLOR_ATTACHMENT  1
#define FORCE_DEPTH_ATTACHMENT  1
2009-08-21 09:34:48 +00:00
Robert Osfield
65352c8533 From Magnus Kessler, "osgAnimation/Interpolator includes itself. The following patch removes the
superfluous include"
2009-08-20 16:39:14 +00:00
Robert Osfield
a2a2740a23 From Ronald van Maarseveen and Robert Osfield, changed compute of up vector and localToWorld transform so that it takes in to account the geographic latitude. 2009-08-20 14:19:10 +00:00
Robert Osfield
850ea3de9f Added support for trimming the contents of parsed Xml graph 2009-08-19 15:36:23 +00:00
Cedric Pinson
2916d9b7ea From Michael Platings,
Changes to allow osgAnimation::*CubicBezierChannel to be used
Added TemplateStepInterpolator class
2009-08-06 12:40:06 +00:00
Robert Osfield
589629cab8 Introduced TabBoxTrackballDragger 2009-08-05 16:02:44 +00:00
Robert Osfield
93996e6133 Added support for volume tags with properties:
dragger="box" or dragger="trackball"

and

    technique="light" or technique="isosurface" or technique="iso" or technique="mip"

and

    tf="transferfunctionfile.tf"

i.e.

         <volume dragger="box">CardiacCT</volume>
         <volume tf="colour.tf">CardiacCT</volume>
         <volume technique="isosurface">CardiacCT</volume>
2009-08-05 14:37:56 +00:00
Robert Osfield
df9385ac19 Moved the updating and expiry of the Registry object cache from DatabasePager into osgViewer::Viewer/CompositeViewer. 2009-08-05 11:06:53 +00:00
Cedric Pinson
d2af7efc61 From Cedric Pinson, Add UpdateMaterial callback to animate material\nUpdate LinkVisitor to traverse stateset\nUpdate ReaderWriter to read osgAnimation::UpdateMaterial Callback\nUpdate nathan.osg data file to demonstrate the MaterialAnimation 2009-08-03 09:48:12 +00:00
Robert Osfield
239aed9a88 Tweak of NodeMask docs 2009-07-28 06:00:23 +00:00
Robert Osfield
35962ab099 From Lee Butler and Robert Osfield, doxygen comment explaining role of NodeMask 2009-07-24 15:30:13 +00:00
Robert Osfield
31a947fda6 From Terry Welsh, "Okay, here are the mods I wrote for drawing a filled bounding box
behind osgText::Text.  I made it so the box would get drawn using
whichever BackdropImplementation was selected.  However, I did not
implement STENCIL_BUFFER.  In that case it defaults to drawing the
bounding box using POLYGON_OFFSET instead.

Also made it so the BOUNDINGBOX and FILLEDBOUNDINGBOX are drawn with a
settable color and margin size.

While I was at it I tightened up the values applied with DEPTH_RANGE
and POLYGON_OFFSET, not just for drawing the bounding box but also for
drawing backdrop text (these values must be coupled since the bounding
box has to be drawn deeper in Z than the backdrop text).  The values
in use before seemed like overkill and I was seeing some z-clipping
with my background scenery in the case of DEPTH_RANGE.  If there was a
good reason for the large values please let me know...."
2009-07-24 14:59:51 +00:00
Robert Osfield
773ae51a45 From Chris Hanson, typo and comment clean ups 2009-07-24 14:45:44 +00:00
Robert Osfield
2e0f1dc0d1 From Chris Hanson, added EllipsoidModel::isWGS84() method and clean up on comments. 2009-07-24 14:25:34 +00:00
Cedric Pinson
5a73834cbe From Cedric Pinson, Store the linkvisitor to be able to configure it by user, like changing the nodemaskoverride, or use a custom LinkVisitor 2009-07-23 12:42:01 +00:00
Robert Osfield
5496e91f87 Added the ability to turn off the external paging in of PagedLOD children. 2009-07-16 10:13:41 +00:00
Cedric Pinson
a13b32a124 From Cedric Pinson, add accessors to osgAnimation ActionCallback 2009-07-15 20:52:51 +00:00
Robert Osfield
c47c0c2a26 From Stephan Huber, "ttached you'll find a small fix for the
GraphicsWindowCocoa-implementation, which enhances multithreaded
stability, it ensures that modifications to the size of an openglcontext
is done only from one thread.
"
2009-07-13 08:30:20 +00:00
Robert Osfield
6e6a7c960e Added Dragger::s/getActivationModKeyMask(..) and Dragger::s/getActivationKeyEvent(...) methods to make it possible to have draggers that only respond when you press a specified modified key or standard key.
Changed the optional dragger in osgvolume to require the shift key to be pressed for the dragger to become active.
2009-07-03 19:16:53 +00:00
Robert Osfield
11d7d98e79 Updated version numbers for 2.9.6 release 2009-07-03 10:33:51 +00:00
Robert Osfield
b37e871cec Added callback to locator in support of interactive updating of the volume extents 2009-07-03 05:54:02 +00:00
Robert Osfield
78229df14a Added setUpGeometry to Dragger base class to make it easier to use draggers interchangably. 2009-07-03 05:52:52 +00:00
Robert Osfield
a4dedc227b Refactored RayTracedTechnique to allow the position of the rendered part of the volume to be decoupled from the image data. 2009-07-02 18:49:59 +00:00
Robert Osfield
a7f0f3f49d Added constructor and destructor body 2009-07-01 14:49:30 +00:00
Robert Osfield
2525bb5d06 Completed refactor of osgManipulator, key changes are:
Selection is now just a typedef of osg::MatrixTransform, and is deprecated

   CommandManager is shell class that just sets values directly on Dragger, and is deprecated

   Dragger now has list of DraggerCallback that takes over the roll of tracking changes to the Dragger, and
   allows users to track the dragger in any way they wish.

   Dragger now has a convinience method making MatrixTransforms track a dragger.

   Selection and CommandManager are no longer required for use of osgManipulator and are kept around for backwards compatibility.
2009-07-01 14:01:09 +00:00
Robert Osfield
7904fe71a5 Simplified Command and CommandManager 2009-06-30 13:00:58 +00:00
Cedric Pinson
2c012faee4 From Cedric Pinson, Traverse StripAction instead of applying, this fix the execution of FrameCallback in BlendIn, BlendOut and AnimationAction\nFix warning of osgAnimation::StatsHandler\nFix crash when running example osganimationtimeline without nathan.osg in OSG_FILE_PATH or with bad file 2009-06-30 11:55:49 +00:00
Robert Osfield
a2ae370c8e Refactored osgManipulator so that CommandManager is no longer required, instead Dragger directly manages Constaints and associate Selections. 2009-06-30 11:39:39 +00:00
Robert Osfield
e30e4df30c Introduced event handling directly into osgManipulator::Dragger to allow it be used with a global event handler passing in events. 2009-06-29 21:32:10 +00:00
Robert Osfield
214e1b81ed Simplified throw rate code, and add throw rate compensation into zoom in/out code. 2009-06-25 18:31:43 +00:00
Robert Osfield
b1a99ba25f From Lee Bulter, "I noticed that when "throwing" things the rate of motion once thrown was
dependent on the complexity of the geometry. For complex scenes this
meant that it looked like you were "throwing" the display into molasses.
For simple geometry things get over-excited once thrown.

The fix is to factor in the frame rendering time to the caluclated
motion. I've implemented this for rotation and panning.

Now when things are thrown they maintain a rate very close to what was
happening when the mouse button was released."
2009-06-25 18:11:29 +00:00
Robert Osfield
b1f4a81606 From Mathias Froehlich, "Fix possible problem with aliasing rules.. and fix a gcc warning :)Use a union to determine if we are on a little endian or big endian machine." 2009-06-25 13:26:26 +00:00
Robert Osfield
3aded84015 From Cory Riddell, "I added an _allowThrow boolean along with a getter and setter to the
spherical manipulator. The default value is true.

This is very similar to the flag in trackball."
2009-06-25 09:14:47 +00:00
Robert Osfield
5eed82e32e Added export 2009-06-25 08:23:21 +00:00
Robert Osfield
95355c2a49 Refactored preset3D/p3d plugin so that common scene graph extensions and classes now live in a separate osgPresenttation NodeKit. 2009-06-24 16:03:49 +00:00
Cedric Pinson
51579cf436 From Cedric Pinson, Fix the drop of the first frame of action when adding action with addActionNow\nReport stats only for active animations\nAdd priority to RunAction callback 2009-06-24 10:10:09 +00:00
Cedric Pinson
658d96aa64 From Cedric Pinson, fix constructors for cloning osgAnimation objects 2009-06-22 14:24:59 +00:00
Robert Osfield
79b0060703 From Tom Jolly, "A new compiler and a new warning.
Enclosed is include/osgParticle/Particle.  I removed the const from the
return type of getSTexCoord.  I also changed the name on the next
function to getTTexCoord so it is consistent with getSTexCoord.  If you
prefer to change getSTexCoord to getSCoord you will need to change it in
ConnectedParticleSystem.cpp."
2009-06-19 13:09:31 +00:00
Robert Osfield
85bb6b327d From Wojciech Lewandowski, "Here are my changes:
- osg::Texture sets GL_MAX_TEXTURE_LEVEL if image uses fewer mipmaps than
number from computeNumberOfMipmaps (and it works!)
- DDS fix to read only available mipmaps
- DDS fixes to read / save 3D textures with mipmaps ( packing == 1 is
required)
- Few cosmetic DDS modifications and comments to make code cleaner (I hope)

Added _isTextureMaxLevelSupported variable to texture extensions. It
could be removed if OSG requires OpenGL version 1.2 by default.

Added simple ComputeImageSizeInBytes function in DDSReaderWrites. In
my opinion it would be better if similar static method was defined for
Image. Then it could be used not only in DDS but other modules as well (I
noticed that Texture/Texture2D do similar computations).

Also attached is an example test.osg model with DDS without last mipmaps to
demonstrate the problem. When loaded into Viewer with current code and moved
far away, so that cube occupies 4 pixels, cube becomes red due to the issue
I described in earlier post. When you patch DDS reader writer with attched
code but no osg::Texture yet, cube becomes blank (at least on my
Windows/NVidia)  When you also merge osg::Texture patch cube will look right
and mipmaps will be correct."
2009-06-19 11:55:52 +00:00
Robert Osfield
82b329b0a7 Added append() method 2009-06-19 11:04:48 +00:00
Robert Osfield
1523032d2b From Cedric Pinson and Robert Osfield, addition of NodeCallbacks to osg::CopyOp and osg::Node copy constructor. 2009-06-18 10:01:39 +00:00
Robert Osfield
1e45b24a7f Added exports 2009-06-18 08:29:20 +00:00
Robert Osfield
73b423ad85 Replaced forward declarations 2009-06-17 16:54:39 +00:00
Robert Osfield
acf07b5b22 Made method names consistent with each other 2009-06-17 15:12:50 +00:00
Robert Osfield
ad8f2d8974 Changed build OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION to ON and then fixed all the resulting build errors. 2009-06-17 10:39:39 +00:00
Robert Osfield
7c4225e574 Fixed error in DisplaySettings::setNumOfHttpDatabaseThreadsHint 2009-06-17 08:56:11 +00:00
Cedric Pinson
c4c5ca7566 From Cedric Pinson, split timeline classes in differents files, cleanup and add a statshandler to visualize current action in timeline 2009-06-15 14:48:37 +00:00
Cedric Pinson
b2943aa50a From Cedric Pinson, fix copy constructor for clone operation for Bone, add a missing contructor with quaternion for Target 2009-06-14 23:30:47 +00:00
Robert Osfield
d60801be3f From Mathias Froehlich, "attached is a change to the ProxyNode that also includes ProxyNode local
database options like recently added to PagedLOD.

Also there is a change to the traverse method:
The previous ProxyNode checks the VisitorType to be a CULL_VISITOR and the
presence of a request handler to submit a database request.
In contrast to that PagedLOD uses the request handler if it is there - even if
the visitor type is not a cull visitor.
The change removes the cull visitor test from the ProxyNode so that it behaves
like the PagedLOD.
I believe that the presence of a request handler in a visitor might be
sufficient to trigger the requests as this is done in the PagedLOD anyway.

Based on rev 10332."
2009-06-12 10:08:15 +00:00
Robert Osfield
27cf68b22d Replaced frame delta computation that was originally based on a local static variable, replacing it with member variable to tracking the previous frame time. This fixes a bug in the wind computation when multiple PrecipitaionEffects are in the scene. 2009-06-11 14:56:54 +00:00
Robert Osfield
3171be0ff7 From Gustav Haapalahti and Robert Osfield,
First Submission email from Gustav:
"This submission adds a --cache option to osgconv and osgviewer that enables setObjectCacheHint(osgDB::Options::CACHE_ALL); It greatly reduces memory usage when a .osg file has lots of external references with ProxyNode:s that points to the same file.

Options are also added to the osg plugin. The code was already mostly implemented but there was no way to change the options.
includeExternalReferences
writeExternalReferenceFiles
A counter is added to keep track if an external file has already been written down to avoid writing the same file over and over again. If it has already been written once then it is not written again.
The counter is added to the Output class in osgDB.
"

Second Submission email from Gustav:
"This is a continuation to my previous submission.
I noticed that the same problem that I fixed in ProxyNode.cpp for the osg plugin (external files being written over and over again) also existed in the ive plugin. I attached a submission where the ive plugin remembers which external files that have already been written and do not write them again."


Changes to the above done by Robert Osfield,

    changed command line parameter to --enable-object-cache
    changed set/get methods in osgDB::Output and ive/DataOutputStream.cpp to be s/getExternalFileWritten(const std::string&)
    cleaned up set up of osgDB::Options.
2009-06-08 16:50:50 +00:00
Robert Osfield
58184612d4 From Konstantin Sinitsyn, support for GL_EXT_blend_equation_separate extension like in osg::BlendEquation. 2009-06-08 13:46:39 +00:00
Robert Osfield
a09353f931 Fixed doc message 2009-06-08 12:44:23 +00:00
Robert Osfield
aa69137fb8 Added collateReferencesToDependentCameras() and clearReferencesToDependentCameras() methods into RenderStage and SceneView, and use
of these methods in src/osgViewer/Renderer.cpp to make sure that the draw thread keeps references to all in scene graph Cameras
that are being used by the drawing threads, to keep the Camera's alive even when the main thread removes these Cameras from the scene graph.
2009-06-05 19:05:37 +00:00
Robert Osfield
482a18b9f2 Added depends_on template and usage in RenderBin to help with static variable destruction ordering 2009-06-05 11:48:35 +00:00
Robert Osfield
40155d59b4 Implemented updating of revision files as new data is writing to the FileCache 2009-06-04 14:07:12 +00:00
Robert Osfield
1f878303b4 Implemented DatabasePath in DatabaseBase revision classes 2009-06-02 16:54:34 +00:00
Robert Osfield
986fc05ac1 Added revisions plugin in support of paged database revisions. 2009-05-29 18:24:47 +00:00
Robert Osfield
23c7646702 Introduced first iterations of DatabaseRevision classes for managing the revisioning of http hosted databases 2009-05-29 08:24:11 +00:00
Robert Osfield
45ec1a163c Added support for RenderBin::SortMode::TRAVERSAL_ORDER to enable rendering of scene graph drawables in the order that they were traversed in. 2009-05-27 09:54:17 +00:00
Robert Osfield
4a823acce0 Changed Status enums to ActionStatus and TimelineStatus to avoid X11 problems 2009-05-25 12:04:29 +00:00
Robert Osfield
56c32eb131 Changed TerrainManipulator to use HEADING rather than AZIM to keep it consistent with SphericalManipulator 2009-05-20 11:08:57 +00:00
Robert Osfield
cd18dc01da Converted SphericalManipulator to use Elevation and Heading rather than Zenith and Azimuth. 2009-05-20 10:58:29 +00:00
Robert Osfield
323deba59c From Martin Beckett, "In MatrixManipulator can we have computeHomePosition() use _homeUp rather than the hardcoded (0,0,1).
This makes it possible to redefine the viewing direction of 'home' in the other manipulator - so home in a GIS app could be a plan view.
Since _homeUp is set to (0,0,1) and no current code changes it there shouldn't be any difference for current users."
2009-05-19 14:03:09 +00:00
Robert Osfield
4d9d02e880 Changed the default home position so that it's consistent with other OSG manipulators. Added setter of properties of the SphericalManipualtor, moved across to using doubles internally 2009-05-19 12:21:42 +00:00
Robert Osfield
22fa18d585 From Mojtaba Fathi, "I've developed a new manipulator which uses azimuth and zenith angles to rotate scene and so avoids Roll angle rotation, such that scene is always seen as Z upward." 2009-05-19 11:18:03 +00:00
Robert Osfield
d38fb904d3 From Maciej Krol,"With advent of GUI applications in OSG there is a growing need to redirect notification messages to third party systems. For example windows applications do not have console output, it would be appropriate to redirect notifications to GUI widget or debug output. I have revamped notification system to fit this need. New notification stream is using NotifyHandler as a message sink. Handler is called whenever stream is synchronized (i.e. after <<std::endl). Standard streams std::cout and std::cerr are no longer used although by default StandardNotifyHandler is a message sink. Custom notification handler can be set with osg::setNotifyHandler(NotifyHandler *) function.
Two implementations of NotifyHandler are currently available:
- StandardNotifyHandler, calls fputs(message, stderr) for severity <= WARN and fputs(message, stdout) for severity > WARN
- WinDebugNotifyHandler, windows users can redirect notifications to windows debug output, notifications can be viewed in output window of the debugger i.e. MSVC or DebugView (http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx) (see screenshot).

I have seen on osg-users that some people do std::cerr.rdbuf(otherStream.rdbuf()) to redirect notifications. This trick will no longer work since osg::notify() returns internal osg::NotifyStream not std::cout or std::cerr. You can use osg::notify().rdbuf(otherStream.rdbuf()) to do this instead.

Additionally I've made some minor fixes:
- Minor imrovements to osg::notify documentation
- NullStream could crash by deleting stream buffer other than default NullStreamBuffer in the destructor i.e. after osg::notify(osg::DEBUG_FP).rdbuf(otherStream.rdbuf())"
2009-05-18 12:04:07 +00:00
Robert Osfield
7dead3f52d From Paul Obermeier, "Please find enclosed some changed OSG header files.
The changes are more or less just beautifications
(when looked at them from the C++ view), but make
wrapping OSG with SWIG easier.
I have tested the changes with both 2.8.1-rc4 and the
current head and would appreciate to incorporate the
changes in both branches.

Here is a description of the changes:

osg/BoundingSphere:
   Use the following typedef (like used in BoundingBox)
       typedef typename VT::value_type value_type;
   instead of
       typedef typename vec_type::value_type value_type;

   SWIG reports errors on the latter construct.
   Also makes it consistent with BoundingBox.


osg/Vec4ub:
   Consistent use of "value_type" throughout the file.


osg/Vec?b:
   Consistent use of "value_type" throughout the files.

   Also changed
       typedef char value_type;
   to
       typedef signed char value_type;

   In the case of a simple "char", SWIG assumes a string.
   Using "signed char" instead of "char" does not change
   the behaviour of the class.
"
2009-05-18 10:37:03 +00:00
Robert Osfield
47c922b0e5 Minor tweaks to avoid warnings when generating wrappers/doxygen documentation 2009-05-18 10:28:14 +00:00
Robert Osfield
6bcc1c527c From Ulrich Hertlein, "please find attached a patch for TrackballManipulator to fix zooming using the MBP touchpad. The old code would always zoom-in even when using the gesture to zoom-out.
Also attached are some code and documentation cleanups for GUIEventAdapter that collect related values (e.g. scrolling, tablet pen) in a struct.
"
2009-05-14 16:08:12 +00:00
Robert Osfield
6a269e24e5 From Stephan Huber, "attached you'll find some bugfixes and enhancements for the Cocoa
implementation of GraoicsWindowCocoa:

Enhancements/Bugfixes:

+ now it's possible to integrate osgViewer better into existing
cocoa-applications:
* create one or more NSOpenGLView(s) and add these to your window(s)
* create one or more NSWindows
* disable the integrated event-polling of osgViewer, and let the work be
done by Cocoa / NSApplicationRun. You'll have to run the osgViewer's
runloop in a separate thread

+ missing menu-event-handling implemented

+ added NSAutoReleasePools where necessary, this fixes some memory-leaks
+ fixed some crashes and thread-issues"
2009-05-14 15:34:15 +00:00
Robert Osfield
122ee0a001 Added ReaderWriter::fileExists() method to help enable querrying of existing of files on servers using the curl plugin 2009-05-13 19:46:16 +00:00
Robert Osfield
078fe9e84c Added support for Object, Image, HeightField and Shaders in FileCache 2009-05-13 19:44:27 +00:00
Robert Osfield
2e73fb2131 Fixed handling of space after = in options set up. 2009-05-13 15:05:23 +00:00
Robert Osfield
8138a7698f Moved getAttributeVec into public: to allow 3rd party code to access without having to subclass 2009-05-12 05:49:36 +00:00
Robert Osfield
5b89e2eb17 Moved ReadFile/WriteFile/FindFile/FileLocationCallbacks from include/osg/Options into their own Callbacks header/source file. 2009-05-11 16:38:40 +00:00
Robert Osfield
f939ea731e Moved Registry::ReadFileCallback + WriteFileCallback, and osgDB::ReaderWriter::Options into their own separate Options file and into the osgDB namespace.
Introduced a new callback osgDB::FindFileCallback that overrides the default behavior of findDataFile/findLibraryFile.

Introduced support for assigning ReaderWriter::Options directory to PagedLOD.

Introduced new osgDB::FileLocationCallback for assistancing the DatabasePager to know when a file is hosted on a local or remote file system.
2009-05-11 11:39:12 +00:00
Robert Osfield
67e0abf149 Added OSG_MIN_VERSION_REQUIRED, OSG_VERSION_LESS_THAN, OSG_VERSION_LESS_OR_EQUAL, OSG_VERSION_GREATER_THAN, OSG_VERSION_GREATER_OR_EQUAL macros to help out with management of feature usage in 3rd party libs and applications 2009-05-11 11:08:16 +00:00
Robert Osfield
c79b1f3ac8 Moved Options copy constructor to .cpp 2009-05-09 08:54:38 +00:00
Robert Osfield
b7b065abe3 Refactored the Registry::ReadFileCallback, WriteFileCallback and ReaderWriter::Options to they are now defined in their own header and in the osgDB namespace.
Introduced a new FindFileCallback to Registry to compliement the existing ReadFileCallback and WriteFileCallback.

Added support for assign Find, Read and WriteFileCallbacks to osdDB::Options to enable plugins/applications to override the callbacks just for that
read/write call and any nested file operations
2009-05-09 08:49:27 +00:00
Robert Osfield
24c19fa17e Changed setting of stack back assigned to push_back to fix bug with cull mask management. 2009-05-07 18:30:33 +00:00
Robert Osfield
7ea1a97afd From Frederic Bouvier, SetCursor fixes from GraphicsWindowWin32,
Original email from Frederic at start of thread:
"he patch attached, made from r10068, fix two things, in other of importance :

- the selected cursor is never shown ( second change in file ). Only the left arrow is always displayed.
- remove the arbitrary ( in my sense ) limitation that the user cannot choose a cursor with the same shape that one used when resizing the window. This limitation doesn't exist for X11, and we have a diverging behaviour there ( first change in file ). Flightgear use the LeftRightCursor in look around mode."

Follow up email from Frederic (with changes that finally made it into this check in:
"I've just tested Mark's suggestion and it works perfectly, even when the
cursor goes to the border then come back inside the window.
But his patch doesn't seem to be based on the last revision of the
files, or at least not on the trunk, and there are more changes than
expected in them, including some loss from the previous patches.
The patch attached is based on r10068 of
src/osgViewer/GraphicsWindowWin32.cpp and r10067 of
include/osgViewer/api/Win32/GraphicsWindowWin32"
2009-05-07 13:30:54 +00:00
Robert Osfield
e40102c954 Added export for windows build 2009-05-01 10:24:51 +00:00
Robert Osfield
d2f3615833 Build fixes 2009-04-30 08:27:07 +00:00
Robert Osfield
590ac02859 Created a simple XmlNode parser class for reading of basic xml files, such as used by present3D.
Converted Present3D across from using libxml2 to using the new osgDB::XmlNode/XmlNode::Input classes from Xml Parsing.
This changes removes the dependency on libxml2, and allows the present3D application and p3d to work on all platforms.
2009-04-29 20:30:21 +00:00
Robert Osfield
48a9b90dc5 Added suggestion of IntersectionVisitor instead. 2009-04-24 17:51:23 +00:00
Robert Osfield
619be4ced0 Changed doxygen docs to say deprecated 2009-04-24 17:49:34 +00:00
Robert Osfield
a50f0ccfaf Introduce new run frame rate management support to allow control of maximum frame rate and to support on demand rendering of frames 2009-04-24 16:20:50 +00:00
Robert Osfield
7b16ff5ae1 From Mathias Froehlich, Changed osg::TextureRectangle to use osg::Texutre::applyTexParameters() to take advantage of texture shadow extension settings for texture rectangle 2009-04-24 09:07:22 +00:00
Robert Osfield
c3e9f27f35 Updated version numbers in prep for 2.9.4 dev release 2009-04-22 16:33:24 +00:00
Robert Osfield
777b00353a From Mathias Froehlich, "attached is a change to TexGenNode rev 10060 that removes a private member
variable that is only initialized and copied by never used seriously.
"
2009-04-22 13:07:02 +00:00
Robert Osfield
616a96343c From Neil Hughes, "Please find attached two files that I've amended to add the IDC_HAND cursor for the windows platform." 2009-04-22 11:20:19 +00:00
Robert Osfield
b6182a1239 From Peter Amstutz, "Here is a simple change to osgViewer::GraphicsWindowWin32 to add a flag to WindowData to specify that the graphics window should not install an event handler of its own, per this discussion thread:
http://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg23734.html

The change is source compatible with current osg code and will not affect current users, it simply adds an additional parameter to the GraphicsWindowWin32::WindowData struct constructor and defaults to the current behavior.

Attached are the files "include/osgViewer/api/Win32/GraphicsWindowWin32" and "src/osgViewer/GraphicsWindowWin32.cpp" with my changes, based on svn revision 10045.  In addition, I have provided an svn patch file with the same changes for your convenience.

I have discussed the matter with my supervisor, and agreed that my company makes no copyright claim over this extremely trivial change (or to put it another way, we assign copyright to the open scene graph community.)"
2009-04-22 11:12:03 +00:00
Robert Osfield
9407def083 Changed parameter for T* to const T*. 2009-04-22 10:46:12 +00:00
Robert Osfield
a551c4864d From Neil Hughes, "please find attached a new version of the ReaderWriter header file. This has additional functions to mimic the setPluginData functions for string data." 2009-04-21 11:48:08 +00:00
Robert Osfield
655f7df28e From Chris Hanson, "Fixed case of morphTarget argument in Doxygen comments." 2009-04-21 10:46:45 +00:00
Cedric Pinson
bc39983030 From Cedric Pinson, remove unsused method in Bone class\nadd namespace osgAnimation for Timeline constructors\nadd OSGANIMATION_EXPORT on VertexInfluence and Timeline class 2009-04-10 15:30:02 +00:00
Robert Osfield
c949789ac7 Updated version info for 2.9.3 dev release, fixed typo and updated wrappers 2009-04-10 11:00:54 +00:00
Robert Osfield
57f6f9f6df Added typedef and updated wrappers 2009-04-10 10:07:13 +00:00
Robert Osfield
c7b981f0d6 From Romain Charbit, "added a getConnectedSelections(Dragger&) method, so we can get which selections are connected to a dragger without make our own multimap, copying the existing _draggerSelectionMap (which is protected with no accessors) ." 2009-04-10 09:56:04 +00:00
Robert Osfield
4f72be65dc From Cory Riddell, "I added an _allowThrow bool and get / set accessors to
TrackballManipulator. The purpose of this is to disable throwing when
you release the mouse button while moving the mouse. The default
settings is true (ie, allow throw). The two source files are attached.
"
2009-04-09 14:31:15 +00:00
Robert Osfield
38b02a26a9 From Glenn Waldron, "Here is a first cut at the mime-type support we discussed a little while ago
(http://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg23098.html)

Background: when you access a file over HTTP, you cannot rely on a file extension being present; instead the file's mime-type is conveyed in the HTTP Content-Type response header. This facility adds a mime-type-to-extension map to the registry to handle this.

There are two new osgDB::Registry functions which are pretty self-explanatory:

void addMimeTypeExtensionMapping( mime-type, extension )
ReaderWriter* getReaderWriterForMimeType( mime-type )

I also added the file osgDB/MimeTypes.cpp which houses a hard-coded list of built-in types. I took the list from here (http://www.webmaster-toolkit.com/mime-types.shtml) and then pared it down to include mostly image and video types, editing them to map to existing plugins where possible.

In addition, I updated the CURL plugin to a) install a set of built-in mime-type mappings, and b) use them to look up an extension in the event that the target filename does not have an extension.

Here is a test case. This URL pulls down a JPEG (without a file extension):
osgviewer --image "http://us.maps3.yimg.com/aerial.maps.yimg.com/ximg?v=1.8&s=256&t=a&r=1&x=0&y=0&z=2"
"
2009-04-09 14:00:16 +00:00
Robert Osfield
306ebea772 From James Killian, "refactored the management of the object cache enabling/disabling" 2009-04-08 14:06:29 +00:00
Cedric Pinson
4738d8ea24 From Serge Lages, Elastic added to EaseMotion 2009-04-07 08:40:49 +00:00
Robert Osfield
20ad246896 Added new virtual reseveElements, setElement, getElment and addElement methods to DrawElements
to make is easier to write code that can work on DrawElementUByte, UShort or UInt.

Changed the osgTerrain::GeometryTechnique so that it automatically chooses 
the use of DrawElementUShort or DrawElementsUInt accordining to the size of the tile.
2009-03-25 11:17:21 +00:00
Robert Osfield
988c69bba3 From Csaba Halasz, "here is another division by zero fix, this should be simpler ;)
It caused problem if the stats display was popped up before the pager
had anything to do."
2009-03-23 15:47:01 +00:00
Robert Osfield
00ee3b0a20 Cleaned up interface 2009-03-23 15:38:30 +00:00
Robert Osfield
38ee2f924d Bumped version numbers in prep for 2.7.2 dev release 2009-03-23 15:21:31 +00:00
Robert Osfield
1fd5eefbcf From Maciej Krol, "As promised to Roland I assembled simple shader generator. ShaderGenVisitor converts accumulated fixed function pipeline state sets to ones with shader programs. Generated state sets are attached to geometries and stored in ShaderGenCache for reuse.
Very simple cases of state configuration are supported (all the ones I really need):
- single per pixel not attenuated non spot light source ON/OFF
- exp2 fog ON/OFF
- diffuse texture in rgb + optional specular gloss in alpha (Texture unit 0) ON/OFF
- normal map texture (Texture unit 1 and Tangent in VertexAttribArray 6) ON/OFF
- blending and alpha testing (not in shader pipeline)

To view fixed function pipeline files and paged databases simply run >osgshadergen myfile.osg"
2009-03-23 11:53:06 +00:00
Robert Osfield
e60db47c1b Inroduced simple PrintVisitor class for helping debug scene graph structures 2009-03-19 11:11:51 +00:00
Robert Osfield
7b5f3ec92a Moved IncrementalCompileOperation out of include-src/osgUtil/GLObjectVisitor into their own files.
Added support to IncrementCompileOperation for controlling how much time is alloted to compilation and flush
2009-03-12 15:21:04 +00:00
Robert Osfield
c3fc21fa82 Added support for tracking the time since the last clear() call to enable other
classes to be able to find out how long the current graphics frame has been running.
2009-03-12 15:18:51 +00:00
Robert Osfield
5a537261a6 From Michael Platings, "I've been looking at the discussion from 2006 ("[osg-users] osgDB/Reentrant Mutex not threadsafe ?") about this, and having looked closely at OpenThreads::ReentrantMutex it's still not thread safe in the following situation:
In my example case, there are 2 threads - one is a worker thread created by OpenThreads::Thread. The other thread is the main thread i.e. the thread that is intrinsically created when you execute the application. The crucial problem is that for the main thread, OpenThreads::Thread::CurrentThread() will return null.
 
I'll demonstrate this by breaking ReentrantMutex::lock() into sub-statements:
 
1.) if (_threadHoldingMutex==OpenThreads::Thread::CurrentThread())
 
2.) if (_lockCount>0){
 
3.)
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_lockCountMutex);
++_lockCount;
return 0;
 
4.)
int result = Mutex::lock();
if (result==0)
{
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_lockCountMutex);
 
5.)
_threadHoldingMutex = OpenThreads::Thread::CurrentThread();
_lockCount = 1;
return result;
 
 
An error will occur in the following case:
1) The worker thread calls lock(), it gets to the start of statement 5.
2) The main thread calls lock(). Statement 1 is evaluated as true as _threadHoldingMutex is null, and OpenThreads::Thread::CurrentThread() returns null.
3) The worker thread executes statement 5.
4) The main thread executes statement 2 and evaluates it as true, because the worker thread has set _lockCount to 1. The main thread executes statement 3, and now can access the mutexed-data at the same time as the worker thread!
 
The simple solution to this is to always protect access to _lockCount and _threadHoldingMutex using _lockCountMutex. I have done this in the file I am submitting."
2009-03-12 10:12:42 +00:00
Robert Osfield
73cffacf09 Added docs on getPixelAspectRatio and corrected usage of getPixelAspection in osgmovie.cpp 2009-03-11 17:57:33 +00:00
Robert Osfield
b6bffdd02f From Tanguy Fautre,
Clean up of the FFmpeg plugin's class API/AudioStream API. 
Implementation of isImageTransparent().
Implementation of Image:g/setPixelAspectRatio()
2009-03-11 15:12:46 +00:00
Robert Osfield
998cfec137 Added View::removeEventHandler(..) method and added check into addEventHandler() to prevent handlers being added twice. 2009-03-11 14:18:30 +00:00
Robert Osfield
ec63cfd930 From Mathias Froehlich, "small addition to osg::Texture to include all possible depth test variants for
the shadow depth comparison."
2009-03-11 13:08:12 +00:00
Robert Osfield
771f3a3238 From Stephan Huber, files were are missed by Robert in check in of changes to GraphicsWindowCarbon.cpp 2009-03-11 12:55:20 +00:00
Robert Osfield
31608b2559 From David Callu, "osgManipulator Object have not META_Object macro call in class definition.
> I add META_OSGMANIPULATOR_Object macro which define className, libraryName,
> isSameKindAs methods.
> Clone method is not appropriate for osgManipulator Object."
2009-03-11 11:29:00 +00:00
Robert Osfield
06ef559d91 From Martin Beckett, added get/setScrollWheelZoomDelta() support for controlling the mouse scroll wheel zoom delta. 2009-03-11 10:50:03 +00:00
Robert Osfield
a0a06c8b2a Completed support for automatic detection of plugin features.
Cleaned up debug out of various plugins to ensure a clean osgconv --formats.
2009-03-10 17:27:39 +00:00
Robert Osfield
c0863e96ca Made bool isImageTranslucent() const virtual to allow subclasses to provide their own implementation 2009-03-10 16:52:18 +00:00
Robert Osfield
287ff37b34 From Ralf Habacker, "The appended patch fixes this issue by adding a virtual method named supportedFeatures() to the class ReaderWriter, which could be overriden by a specific plugin to adjust the set of features.
Single features are implemented as bits asother enums in ReaderWriter class already does, so that combinations are possible and fast comparison operations are possible

By default all features are enabled.

I have added this virtual method to the dot plugin to get an idea how to use these features.

With this patch osgconv --formats shows an additional line 'features' for each plugin"
2009-03-10 15:00:39 +00:00
Robert Osfield
0669107287 From Roland Smeenk, "While working on the Collada plugin I noticed that all geometry created by the dae reader result in slow path geometry.
Because there already exists the option to convert slow path geometry to the fast path by computing an internal fast path alternative, I added a new optimizer option that automatically does this. To check the results I also made some changes to the statistics gathering and rendering.

Somewhat unrelated, but also part of the optimizer I disabled removal of CameraView nodes during RemoveRedundantNodes optimization.
As discussed on the ML, CameraViews were removed from the scenegraph. This solves that issue.

Summary:
-Geometry::areFastPathsUsed now also looks at internalOptimizedGeometry
-Added Optimize option to make all slow path geometry compute their internal fast path alternative
-Added fast geometry counter to the statistics
-Disabled removel of CameraViews in optimizer
"
2009-03-10 14:15:59 +00:00
Robert Osfield
b5a15fb5b4 From Stephan Huber,
"Attached you'll find a proposal for using different
protocols. The idea behind the new code is:

1.) plugins/apps register protocols which they can handle. This is done
via osgDB::Registry::registerProtocol(aProtocolName). Plugins register
supported protocols as usual via ReaderWriter::supportsProtocol(..), the
Registry is updated accordingly.

2.) osgDB::containsServerAddress checks first for an appearance of "://"
in the filename and then checks the protocol against the set of
registered protocols via Registry::isProtocolRegistered(aProtocollName)

3.) the other getServer*-functions changed as well, there's even a
getServerProtocol-function


With these changes filenames/Urls get routed to loaded plugins even with
different protocols than 'http'."
2009-03-10 12:21:13 +00:00
Robert Osfield
199067d150 From Martin Spott, compile fixes for IBM AIX. 2009-03-10 11:14:56 +00:00
Robert Osfield
9643c15346 From David Callu, "Problem:
osgText::Text and osgText::Text3D use the same font file.
     The first really load the file and obtain an osgText::Font object,
     the second use the cache created during the first load of the
     font file, and so obtain an osgText::Font object instead of
     osgText::Font3D object. To obtain an osgText::Font3D object,
     osgText::Text3D call osgDB::readObjectFile(...) with an option
     to specify the plugin we want an osgText::Font3D instead of
     osgText::Font.

Generalised Problem:
    In osgDB::Registry, loaded file cache is referenced by the name
    of this file, so if I load a file with some options, and the cache
    already contain object for this filename, I obtain an object
    potentially not loaded with my options.

Behaviours:
    Cache management is delegate to osgDB::Registry, but cache
    coherence (load a file with option then reuse it, deactivate the
    cache when load a specific file or don't cached the loaded file)
    is user's responsibility.

Text3D solution:
    Postfix the font file name by .text3d or something similar and then have the freetype plugin return
    osgText::Font3D when it detects this.
    This operation is done by osgText::readFont3DFile() which unsure the filename have .text3d as extension.
    This is totaly transparent for user, and backward compatible.


BTW, I fix the bug about the Normal of 3D text. Currently, the front and wall face have
the same normal (0,0,1) in the Text3D object coordinate. Now the wall face have its own
normal array computed by the plugin.

BTW 2, I implement
- void Text3D::accept(osg::Drawable::ConstAttributeFunctor& af) const
- void Text3D::accept(osg::PrimitiveFunctor& pf) const
so now statistics are well reported.
"
2009-03-10 10:56:00 +00:00
Robert Osfield
5059aa808b From Stephan Huber, support for Cocoa windowing under OSX. 2009-03-10 10:13:20 +00:00
Robert Osfield
22c7ff353b Fixed osgWrappers for osgAnimation library 2009-03-09 23:11:23 +00:00
Robert Osfield
ae50d8d956 From Roland Smeenk & Cedric Pinson,
"Summary of changes:
From Roland
-Added MorphGeometry
-Bone Bindmatrix is only calculated if needed
-osgAnimation plugin now supports all available channel types (before only linear vec3 or quat channels)
-osgAnimation plugin now supports MorphGeometry
-osgAnimation plugin now supports animation and channel weights, animation playmode, duration and starttime
-removed osgAnimationManager.cpp from CMakeList

From Cedric
-fixed the last_update field (it was only updated at the first update) in BasicAnimationManager.cpp
- Refactore some part of MorphGeometry minor changes
- Add osganimationmorph as example
"
2009-03-09 17:38:39 +00:00
Robert Osfield
99477fa422 Tweaked API to get wrappers to build 2009-03-09 16:53:57 +00:00
Robert Osfield
173357252b Further work on IncrementalCompileOperation 2009-03-09 14:56:20 +00:00
Robert Osfield
7473b06275 Preliminary work on general purpose incremental compile support in osgViewer. 2009-03-08 12:00:36 +00:00
Robert Osfield
43a081ee98 Updated wrappers and dev release version numbers 2009-03-05 15:31:03 +00:00
Robert Osfield
d2099da5cb Fixed indentation 2009-03-04 16:15:05 +00:00
Robert Osfield
e035decd95 Introduce FFmpegAudioStream implementation 2009-03-03 16:51:01 +00:00
Robert Osfield
4ebd316130 Introduced osg::AudioStream class to help manage audio streams coming in from movie reading plugins 2009-02-27 20:16:08 +00:00
Robert Osfield
979d1e6be7 Merged in various changes from the OSG-2.8 to being svn/trunk up to date. 2009-02-19 14:24:10 +00:00
Robert Osfield
f8636d8006 Fixes for doxgen warnings 2009-02-11 10:41:55 +00:00
Robert Osfield
51f6fa249f Merged fixes to osgVolume's handling of ImageSequence animated volumes, merge command:
svn merge -r 9746:9747 http://www.openscenegraph.org/svn/osg/OpenSceneGraph/branches/OpenSceneGraph-2.8
2009-02-10 18:51:43 +00:00
Robert Osfield
e15383fd7a From Fabien Lavignotte, "Here is some various small fixes i have done while playing with
osgAnimation.
 - Animation : removed the _name attribute that is never used.
 - BasicAnimationManager : fix a crash on Windows with the example
osganimationviewer. The _lastUpdate attribute was not initialized when
using copy constructor.
 - CMakeLists.txt : add RigGeometry to the headers list"
2009-02-09 22:56:21 +00:00
Robert Osfield
0adcfda07a Merged from OSG-2.8 branch changes to the use of ReadWriteMutex to Mutex in osgParticle::ParticleSystem.
svn command:

   svn merge -r 9725:9726 http://www.openscenegraph.org/svn/osg/OpenSceneGraph/branches/OpenSceneGraph-2.8
2009-02-09 21:38:06 +00:00
Robert Osfield
684c7bc8fc From Cedric Pinson, removed virtual inheritance from osgAnimation::Animation 2009-02-09 09:41:56 +00:00
Robert Osfield
1a28f0105d Bumped version number of svn/trunk to 2.9.0 2009-02-06 15:49:21 +00:00
Robert Osfield
b19b2f820b Added a couple more pragma's to resolve final Windows warnings 2009-02-06 15:39:44 +00:00
Robert Osfield
3fdc0b4cfd From Fabian Lavignotte, "Here is some various small fixes i have done while playing with
osgAnimation.
 - Animation : removed the _name attribute that is never used.
 - BasicAnimationManager : fix a crash on Windows with the example
osganimationviewer. The _lastUpdate attribute was not initialized when
using copy constructor.
 - CMakeLists.txt : add RigGeometry to the headers list"
2009-02-05 15:22:42 +00:00
Robert Osfield
2e58416826 Added exports, and moved constructors into .cpp. 2009-02-05 14:54:42 +00:00
Robert Osfield
087d6390fa Added VS and gcc warning suppression to clean up a few last stubborn warnings 2009-02-05 11:10:32 +00:00
Robert Osfield
c1fa3e0f6c Form Paul Melis, spelling fixes 2009-02-04 13:51:12 +00:00
Robert Osfield
3c6b26c970 Fixed the constness of osg::Image* pointer 2009-02-04 11:35:24 +00:00
Robert Osfield
ff66ca022e Clean up warning disable code 2009-02-03 20:26:26 +00:00
Robert Osfield
734463fcc7 Warning fixes 2009-02-03 15:28:53 +00:00
Robert Osfield
c5733fef14 Added local disabling the the VS C4121 "alignment of a member was sensitive to packing" warning 2009-02-03 11:54:46 +00:00
Robert Osfield
17241da4e5 Added explict initialization of osg::Object contstructor to fix warning 2009-02-03 11:04:37 +00:00
Robert Osfield
1153ea5feb Warnings fixes for VS. 2009-02-02 20:35:19 +00:00
Robert Osfield
81b336756b Added explict intializiers of base classes 2009-02-02 17:32:34 +00:00
Robert Osfield
e1bdee5338 Improved handling of stats projection size 2009-02-02 17:15:40 +00:00
Robert Osfield
b1a5228972 Fixed version 2009-02-02 15:04:53 +00:00
Robert Osfield
33d158e290 Updated OpenThreads and OpenSceneGraph version ready for OSG-2.8 branch. 2009-02-02 14:55:51 +00:00
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
Robert Osfield
cedffd3adb Introduced osgVolume::Layer and Locator classes mirrroring similar classes in osgTerrain. 2009-01-05 11:26:26 +00:00
Robert Osfield
f4c26f9cc8 Changed VolumeTile::setImage(Image*) to setImage(uint i, Image*) to allow multiple images to be attached to single tile 2008-12-21 20:42:29 +00:00
Robert Osfield
adb7a49c10 Renamed osgVolume::Brick to osgVolume::VolumeTile 2008-12-20 20:55:21 +00:00
Robert Osfield
2cc53e2256 Moved main setSceneData methods in osgViewer::View::setSceneData() 2008-12-19 17:50:58 +00:00
Robert Osfield
502eced994 From Jean-Sebastein Guay, I recently had to reimplement screen capture functionality into our framework (which was broken since the switch from OSG 1.2 to 2.2 over a year and a half ago). I used the ScreenCaptureHandler which I had contributed right before OSG 2.6 shipped, bit I had to trigger the screen capture programatically instead of by a key press in some cases, so I added a convenience method to do that.
It's a minimal change, it just calls an already existing protected method. It was trivial to subclass the handler to do it in our code, but pushing the change into OSG makes sense as it's generally useful to have it in the handler itself.

I also noticed that the handle() method was overridden from osgGA::GUIEventHandler but wasn't marked virtual. It wasn't intended that subclasses not be able to override it in turn, so I've added the keyword.""
2008-12-19 17:15:10 +00:00
Robert Osfield
0ea6cdeb96 Added ClipNode::set/getReferenceFrame(); 2008-12-19 15:29:59 +00:00
Robert Osfield
8951acabb7 Fixed warning & error 2008-12-19 12:58:50 +00:00
Robert Osfield
c862344929 Fixed warning 2008-12-19 12:46:21 +00:00
Robert Osfield
4c6511fd50 Updated wrappers 2008-12-19 10:20:23 +00:00
Robert Osfield
4ad20a413a Fixed warnings 2008-12-18 11:06:57 +00:00
Robert Osfield
2225339208 Fixed warnings 2008-12-17 16:13:23 +00:00
Robert Osfield
c85437e967 Fixed warnings 2008-12-17 15:32:35 +00:00
Robert Osfield
26c57f125d Warning fixes 2008-12-17 13:14:17 +00:00
Robert Osfield
8a6e04b84d Introduce NodeVisitor::className and libraryName() 2008-12-17 12:13:15 +00:00
Robert Osfield
a5c32da4ff Warning fixes 2008-12-17 11:00:16 +00:00
Robert Osfield
d01fc6ab1b From Jean-Sebastien Guay, added missing export 2008-12-17 10:01:52 +00:00
Robert Osfield
e7d8a2cfe6 Updated wrappers 2008-12-16 21:16:06 +00:00
Robert Osfield
60fc821764 From Cedric Pinson and Jeremey Moles, Changes to OpenSceneGraph-osgWidget-dev branch.
Notes from Robert Osfield, Merged changes to OpenSceneGraph-osgWidget-dev r9367 (prior to my botched attempt at merged svn/trunk into the branch).
2008-12-16 20:29:00 +00:00
Robert Osfield
bd4b6e9b8c Updated version numbers for 2.8.8 dev release 2008-12-16 16:36:33 +00:00
Robert Osfield
4511281f04 From Sukender and Robert Osfield, introduced GraphicsContext::ScreenSettings & WindowingSystemInterface::enumerateScreenSettings. 2008-12-16 15:08:04 +00:00
Robert Osfield
3ce53b56c7 Added support for a Terrain::s/getTerrainTechniquePrototype() 2008-12-15 22:18:40 +00:00