Commit Graph

6637 Commits

Author SHA1 Message Date
Robert Osfield
d59477c8f7 Updated ChangeLog, wrappers and Contributors lists 2009-10-10 11:28:42 +00:00
Robert Osfield
3fce07e5e5 From Cesar L.B. Silveira, "I have written these few lines of code which allow setting the label
of an osgWidget::Label with an osgText::String. I had to do this on a
project I'm working on, because I needed UTF-8 strings on my labels,
and using setLabel with std::string was not working.
"
2009-10-10 11:06:30 +00:00
Robert Osfield
058d31d7b5 From Mathias Froehlich, "Tha attached change adapt previous attemps to get our application using osg
through microsofts application verifier. The current change should work a
little better ...
The change is based on rev 10605."
2009-10-10 11:00:35 +00:00
Robert Osfield
972e68113d From Mathias Froehlich, "This change eliminate an orphan stats block that sticks somewhere in the
screen stats display."
2009-10-10 10:58:39 +00:00
Robert Osfield
2c4b60cafc Updated wrappers 2009-10-10 10:54:33 +00:00
Robert Osfield
ef1c9d9e3c From David Fries, "The Extensions object was calling _gl_get_query_objectui64v but
checking _gl_get_query_objectuiv_arb which is a different function
pointer.  Changed to check the function being called.

This is against the subversion trunk."
2009-10-10 10:07:40 +00:00
Robert Osfield
a601754450 From Chris Denham, "I discovered a memory leak in the ZIP plugin, which was caused by a missing call to CloseZip.
I attach a modified ReaderWriterZIP.cpp  (based on version 2.9.5 revision 10374).
This includes a little bit of code tidying, but the only functional change is a test of the return value of OpenZip and the addition of a call to CloseZip."
2009-10-10 10:00:13 +00:00
Robert Osfield
590aabb4fa From Stephane Lamoliatte, "Here is a patch wich add two missing GL modes in the osg plug'in." 2009-10-10 09:45:47 +00:00
Robert Osfield
10deffdc41 From Stephane Lamoliatte, "Here is a patch wich improves the support for geometry shaders in OpenSceneGraph.
It adds new PrimitiveSet constants for the specific geometry shader primitive types :
  - LINES_ADJACENCY
  - LINE_STRIP_ADJACENCY
  - TRIANGLES_ADJACENCY
  - TRIANGLE_STRIP_ADJACENCY
It also adds some missing features to the glsl reader plug'in.
"
2009-10-10 09:41:28 +00:00
Robert Osfield
0aed782a47 From Jean-Sebastien Guay, "osgWidget::Window::setWindow() calls parented() (which does an addChild()) on the new window, but it does not call unparented() (which does a removeChild()) on the old window before. So it works fine if there was no window previously, but if an app creates new windows and calls setWindow() to replace the previous one, they will all add up instead and be on top of each other...
This is fixed in the file attached."
2009-10-10 09:26:06 +00:00
Robert Osfield
61544f51b6 From Bob Kuehne, "imageio plugin fix, mac os x : remove double-qualified ctor - illegal syntax under gcc 4.2.1" 2009-10-10 09:23:03 +00:00
Robert Osfield
01b5bf97f4 From Bob Kuehne, "fix for 10.6/darwin: this fix changes what i believe to be a typo in the os x darwinutils file from ID to id, the proper objective-c name for a type." 2009-10-10 09:20:39 +00:00
Robert Osfield
f6166d1119 Introduced new uniforms for tracking the modelview and project matrices in shaders using non built-ins. 2009-10-09 13:39:11 +00:00
Robert Osfield
4ba7a58c85 Fixed vertex attribute access bug 2009-10-08 13:33:41 +00:00
Robert Osfield
2f3c1d0ff8 Quitened down debug messages 2009-10-08 10:44:01 +00:00
Robert Osfield
b9f42413a1 Fixed warning 2009-10-08 07:54:37 +00:00
Robert Osfield
2d26cbe7ab Introduced optional build against the GLU library, using optional compile paths to enable/disable GLU related function.
To toggle the use of the GLU library adjust the OSG_GLU_AVAILABLE variable via ccmake . or CMakeSetup.
2009-10-07 19:42:32 +00:00
Robert Osfield
6992e8eedf Fixed handling of rescale of image 2009-10-07 18:50:01 +00:00
Robert Osfield
284f75a111 Fixed setUsage typo in PixelDataBufferObject, and fixed data pointer management in Texture::applyTexImage2D_subload(). 2009-10-07 13:02:51 +00:00
Robert Osfield
dff56a15c6 From J.P. Delport, fixed bug caused by a typo in PixelBufferObject constructor 2009-10-07 12:54:14 +00:00
Robert Osfield
ae7dfc5796 Fixed warnigns 2009-10-07 09:39:45 +00:00
Robert Osfield
69557c060b Fixed the TextureObject's + GLBufferObject reassignment to a new set.
Disabled the unref after apply for a Texture classes when the texture pool is enabled
2009-10-06 13:42:12 +00:00
Robert Osfield
e6a1429335 Refactored the ::getOrCreate*Object() methods to clean them up and fix a bug in the getOrCreateElementsBuffers method. 2009-10-06 09:28:41 +00:00
Robert Osfield
98c79e4918 From Andreas Goebel, fix to bug in ShapeDrawable::accept(PrimitiveFunctor) implementation for cylinder 2009-10-05 13:41:16 +00:00
Robert Osfield
de88eb197c Removed erroneous inclusion of extra GLBufferObjectManager qualifier that broke Windows build 2009-10-03 15:10:13 +00:00
Robert Osfield
32b21dbb89 Introduced new GLBufferObject pool for managing the memory footprint taken up by VertexBufferObejct, ElementBufferObject and PixelBufferObject. 2009-10-03 09:25:23 +00:00
Robert Osfield
f75013d534 Introduced new BufferObject design + implementation in preperation of implementing a pool system for buffer objects 2009-10-01 20:19:42 +00:00
Cedric Pinson
cfac6a7809 From Michael Platings, In Target, the default constructor is explicitly called on _target. This is necessary for FloatTarget and DoubleTarget so that _target is initialised to 0, otherwise you get a junk value. In MorphGeometry.cpp, UpdateMorph::link now links channels of the same index to the same target. Previously a new FloatTarget was created for each channel, so multiple animations didn't work. 2009-10-01 17:08:16 +00:00
Robert Osfield
2eff3daaab Fixed warning about max texture size being smaller than the currently used texture pool size 2009-09-27 15:21:05 +00:00
Robert Osfield
1fce3c0ad1 Added handling of resetting of the texture object format 2009-09-27 15:14:57 +00:00
Robert Osfield
e59f654290 Added status collection to full range of texture classes 2009-09-27 14:38:38 +00:00
Robert Osfield
9a1cd7072f Improved the computation of the TextureProfile _size value, fixed the computation up of the miplevels 2009-09-26 16:28:42 +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
a74af20b54 Added return at end of to fix warning 2009-09-24 10:11:32 +00:00
Robert Osfield
0c0f96ac3d Moved setting of TexturePoolSize into State. 2009-09-23 14:54:13 +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
Robert Osfield
26925be4f4 Change win32 external library to wsock32.lib 2009-09-20 09:26:26 +00:00
Robert Osfield
c1d67b7e17 Added Ws2_32.lib to link of dicom plugin under Win32 2009-09-19 09:18:42 +00:00
Robert Osfield
b59556e2e6 Updated wrappers 2009-09-14 16:07:27 +00:00
Robert Osfield
e53876bae9 Fixed bug in interpolation of colour values 2009-09-11 13:08:49 +00:00
Robert Osfield
16312a4aa0 Added tf-255 option to volume tag 2009-09-10 16:39:05 +00:00
Robert Osfield
1e768c0631 Added reset of the ImageDetails values of TexelOffset and TexelScale. 2009-09-09 15:22:04 +00:00
Robert Osfield
251ec3c4f0 Added support for using the ImageDetails to fill in the Locator and TexelScale/Offset values in the ImageLayer 2009-09-09 13:31:32 +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
a851b0b412 Tweaked debugging info 2009-09-08 15:36:44 +00:00
Robert Osfield
5c2e89ac28 Fixed the set up of osgVolume::ImageLayer scale and offset. 2009-09-08 15:36:28 +00:00
Robert Osfield
b2a3d84d08 Added filter for .filename files 2009-09-07 12:51:00 +00:00
Robert Osfield
7201ce1960 Updated volume setup code to use the new ImageDetails structure. 2009-09-07 10:54:08 +00:00
Robert Osfield
0b3284072d Added check for null masterLocator 2009-09-07 10:50:48 +00:00
Robert Osfield
b9e4313029 Fixed assingment of layerLocator 2009-09-07 08:30:54 +00:00
Robert Osfield
288dd85af4 Added scaling of shader transfer function input values to honour original dicom input values 2009-09-03 14:39:29 +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
Robert Osfield
ea43bc7d52 Updated wrappers 2009-08-31 15:10:38 +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
79f780d4b8 Fixed the compute of the extents/bounding sphere 2009-08-27 19:25:23 +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
a63dbc225e Fixed osgAnimation wrappers 2009-08-21 13:55:03 +00:00
Robert Osfield
5d7d7137d2 Updated wrappers 2009-08-21 12:53:23 +00:00
Robert Osfield
8f0322d9d1 Fixed handling of double precision bounding sphere type. 2009-08-21 10:18:46 +00:00
Robert Osfield
e8eeaa0c8b From Wojciech Lewandowski, part of the FBO attachment submission 2009-08-21 09:43:41 +00:00
Robert Osfield
613c59ad3b Updated wrappers 2009-08-21 09:42:54 +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
564ae70d45 From Tom Moore, "Parens were being returned when the bracket keys were typed. The fix
is easy and the original code looks like a typo"
2009-08-20 16:05:06 +00:00
Robert Osfield
9347fc1ddb From Colin McDonald, "This file didn't build when OSG_USE_UTF8_FILENAME was on" 2009-08-20 15:32:02 +00:00
Robert Osfield
60253d164d From Colin McDonald, "There is a duplicate class definition in the obj & dxf plugins trunk,
causing static builds to fail."
2009-08-20 15:20:55 +00:00
Robert Osfield
9f454c1714 From Colin McDonald, "The bsp & mdl plugins have calls to atof() without including the
associated <stdlib.h> header.  This breaks the build on my Solaris setup.

Rather than adding the missing <stdlib.h> include, I have changed the
atof() calls to osg::asciiToDouble().  This is the same as was done
throughout the other plugins recently, for locale independance.

I've attached updates to the svn trunk, the fix is also appropriate for
the 2.8.* branch."
2009-08-20 14:59:29 +00:00
Robert Osfield
fe8822e496 Added check against a minimual video size of 10x10 to prevent problems with swscale reporting errors and crashing on small video dimensionsline, and those below, will be ignored--
M    ffmpeg/FFmpegImageStream.cpp
2009-08-20 14:59:00 +00:00
Robert Osfield
850ea3de9f Added support for trimming the contents of parsed Xml graph 2009-08-19 15:36:23 +00:00
Robert Osfield
f3c20310d6 Added tabs to treatment as white space to skyWhiteSpace() 2009-08-18 13:38:17 +00:00
Robert Osfield
1241f8a0d6 Added check for space in option name parsing 2009-08-17 16:07:04 +00:00
Robert Osfield
2d77db3627 Added support for the TabBoxTrackballDragger 2009-08-17 15:46:22 +00:00
Robert Osfield
a1709abbee Changed the autorun keys to 'g' for go, and 'h' for halt. 2009-08-17 15:45:43 +00:00
Robert Osfield
321a404f05 Updated wrappers 2009-08-17 15:24:15 +00:00
Robert Osfield
804f7622cc Moved static string initialization into singleton method 2009-08-17 15:22:01 +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
c24e9330a0 Added support for selecting the TabBoxTrackballDragger using dragger="trackball-box" 2009-08-05 17:01:50 +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
5b81e1e76f Updated wrappers 2009-08-05 12:51:10 +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
91f53369a3 From Terry Welsh, .osg and .ive support for new Text boxes 2009-07-28 06:00:03 +00:00
Robert Osfield
fcaec80dc9 Fixed bug in handling of stereo image pairs 2009-07-27 15:39:27 +00:00
Robert Osfield
e078aad61f Updated wrappers 2009-07-24 15:55:50 +00:00
Robert Osfield
6af1859bc4 From Jason Daly, "This set of changes reworks the BSP plugin to use TexEnvCombine instead of a GLSL program for doing the texture blending on displaced terrain geometry. After working with it a while, I found this method to be more scene graph friendly (at least until Wojtek gets his VirtualProgram scheme working ;-) )
Note that this technique will require ARB_texture_env_crossbar (or NV_texture_env_combine4), as it mixes two textures in the first texture unit, and just does the lighting in the second.  I doubt this will be a problem for any card that can already handle GLSL programs, though."
2009-07-24 15:09:37 +00:00
Robert Osfield
de9ce8a3c0 From Cory Riddell, "The spherical manipulator uses a middle drag event for panning. It was
panning for left-right drags, but was zooming for up-down drags. I
changed it to pan both directions as I believe that is the correct
behaviour. If the original combination pan-zoom behaviour was
intentional, please let me know."
2009-07-24 15:04:46 +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
68c459ea30 Updated wrappers 2009-07-24 14:45:09 +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
48a1934ca8 From J.P. Delport, "attached a modified jpeg plugin that allows writing of grayscale images." 2009-07-17 07:47:48 +00:00
Robert Osfield
484d8e328a From Fabien Lavignotte,"When exporting some models to OpenFlight, i found a crash if the texture
unit does not contain a TexEnv object.
Here's the small fix, just a test on the pointer."
2009-07-16 12:09:47 +00:00
Robert Osfield
9d04b4d566 From Stephan Lamoliatte, "The vertical anchor is inverted in the osgWidget::Window::update function.
Here is a small patch to fix that."
2009-07-16 12:04:35 +00:00
Robert Osfield
c2c5a82b92 Fixed build. 2009-07-16 11:35:59 +00:00
Robert Osfield
7f1b0055bd Added .get() to fix build 2009-07-16 11:26:14 +00:00
Robert Osfield
9eb03d450d From Jason Daly, "These are some fixes to the mdl and bsp plugins to handle transparency and lighting better, plus a few other tweaks." 2009-07-16 11:21:02 +00:00
Robert Osfield
a232770161 From Colin MacDonald,"The Optimizer Merge Geometry visitor is always merging geometries,
even if they have had DataVariance DYNAMIC explicitly specified.  Then
when an application attempts to dynamically update the geometry in the
frame loop the primitive sets and data arrays are no longer as
expected, leading to display and/or memory corruption.

Attached is a simple fix. "

Note from Robert Osfield, tweaked Colin's changes to that it use != DYNAMIC as the the test rather than == STATIC.
2009-07-16 11:06:31 +00:00
Robert Osfield
3a93bd3fb5 Updated wrappers 2009-07-16 10:56:16 +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
Robert Osfield
137605eba8 Added support for using PagedLOD to managing loading of presentation preview and then the main presentation in the background paging thread 2009-07-16 10:12:33 +00:00
Robert Osfield
956bf3e395 Quitened down debug info. 2009-07-15 15:28:19 +00:00
Robert Osfield
c491373698 Cleaned up indenting 2009-07-14 13:32:06 +00:00
Robert Osfield
adc68d79af Converted code to use osg::asciiToFloat() instead of relying upong the C libraries sscanf to read floats as the C library is locale sensitive. 2009-07-14 13:30:28 +00:00
Robert Osfield
65c8357f76 From Alexandre Amalric, "I'm using osg svn version 2.9.5 and I've apparently found a bug in osgPlugin logo.
When using more than one view logosCullCallback function is called without checking context ID from the cull visitor is equal to logo _contextID variable. It involves updating logo's viewport with different sizes.
So I made a fix well working, at least the way I use the plugin."

Note, from Robert Osfield, changed code to return true to signal culling of logo when being applied to a window that it wasn't assigned to.
2009-07-14 12:22:47 +00:00
Robert Osfield
cc37d7f439 Moved the getting of the ReaderWriter to do the actual model loading to later so that it only gets invoked when required. 2009-07-14 11:19:22 +00:00
Robert Osfield
424e892f99 Quietened down debug messages, and added early return when filename contains server address. 2009-07-14 11:18:11 +00:00
Robert Osfield
f9517fde6a Refactored the setup of the reading of the wrl file by allow reading from istreams, as well as nesting of filepaths using a local osgDB::Options to prevent threading issues.
Also fixed crash in parsing of the vrml data structures that occurred when no vrml material was assigned.
2009-07-14 10:37:31 +00:00
Robert Osfield
c690dfec50 Quitened down debug messages 2009-07-14 10:35:53 +00:00
Robert Osfield
148798137c Fixed the handling of compressed files 2009-07-14 10:04:18 +00:00
Robert Osfield
bedd22de23 From Cory Riddel based on suggestion from Robert Osfield, "I've been running with your suggested changes for a few days now and it
has been working perfectly. I'm still not entirely clear why adding a
slave/subgraph causes the problem."
2009-07-13 16:39:51 +00:00
Robert Osfield
9aa6d33980 From David Fries, "Comparing the win32 barrier to the pthread barrier, win32 puts the
while in an else clause.  When if is true the phase changes and the
while condition will always by false, so might as well put the while
in the else to skip the check.  There's also a benefit to having the
code logic similar between platforms.
"
2009-07-13 16:14:43 +00:00
Robert Osfield
3983f38f18 From David Fries, "Here is a fix for a deadlock seen under Windows using OpenThreads
Barrier operations.  The error is with atomic operations in the
win32 condition implementation.  The attached sample program will
reliably trigger with as few as three threads and a dual core system,
though sometimes it will take 65,000 iterations.

2.8.1 was the base for these changes

Win32ConditionPrivateData.h
Win32ConditionPrivateData::wait does two operations to decrement
waiters_ then read, when InterlockedDecrement decrements and returns
the value in one operation.  The two operations allows another thread
to also decrement with both getting 0 for an answer.

Win32ConditionPrivateData::broadcast is using waiters_ directly
instead of using the w value read earlier, if it was safe to use
waiters_ directly there would be no need for InterlockedGet or w.

overview of deadlock in barrier with three threads
one thread in broadcast, 2 threads in wait,
release semaphore 2, waits on waiters_done_
both threads wake, decrement waiters_, get 0 for w,
       <logic error here>
one calls set waiters_done_,
broadcast thread comes out of waiters_done_,
other thread calls waiters_done_, (which leaves waiters_done_ in the
signaled state)
       <sets the trap>
broadcast thread returns releases mutex, other threads get
mutex and also return,
next barrier, first two threads enter wait, one goes to broadcast, release
semaphore 2, skips waiters_done_ as it had been released last time
returns, processes, enters the barrier for the next barrier operation
and waits,
three threads are now in wait, two have the previous barrier phase,
one the current phase, there's one count left in the semaphore which a
thread gets, returns, enters the barrier as a waiter, sleeps, and the
deadlock is completed"
2009-07-13 16:05:57 +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
cb1b874167 From and incorported the addition from Paul Fotheringham, addition of define VCL_CAN_STATIC_CONST_INIT_FLOAT to be zero to solve build error under Linux
From Robert Osfield, general cleaned up ITK side to CMakeList.txt.
2009-07-03 19:07:02 +00:00
Robert Osfield
1d320d3ca1 To the ITK code path added support for handling a whole directory of dicom files. 2009-07-03 18:58:01 +00:00
Robert Osfield
48d28aaf1a Updated wrappers 2009-07-03 10:27:58 +00:00
Robert Osfield
48dddc37b8 Introduced a Locator callback and associated usage of this callback to provide interactive updating of the volume bounds 2009-07-03 05:25:08 +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
2232bd5ee5 From Byran Thrall, "The OpenFlight plugin doesn't handle unrecognized options or extra
whitespace in all cases, causing it to crash."
2009-07-01 15:39:06 +00:00
Robert Osfield
8107bd0540 Added osgGA to the dependency list 2009-07-01 14:04:46 +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
Cedric Pinson
4e305cf46b From Cedric Pinson, i miss to commit the file that contains the osgAnimation::StripAnimation::traverse 2009-07-01 09:30:44 +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
a73a403301 Updated wrappers 2009-06-30 07:33:16 +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
8aaedda982 Changed the definition of HAVE_CONFIG_H so that it's only defined when on a now windows system, so to allow the dcmtk/osconfig.h to include the correct header on unix vs widows. 2009-06-26 16:52:27 +00:00
Robert Osfield
063bc6e513 Added search in /usr/local/dicom for dcmtk. 2009-06-26 16:39:44 +00:00
Robert Osfield
85456b1ac1 Fixed warning 2009-06-26 08:16:03 +00:00
Robert Osfield
a58ea5c87c Fixed warning 2009-06-26 08:14:09 +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
44a8e850f4 Fixed library definition 2009-06-25 18:03:30 +00:00
Robert Osfield
3a65636893 From Stephan Huber, fixes to Cocoa support 2009-06-25 16:12:58 +00:00
Robert Osfield
06abd75198 From Mathias Froehlich, "We are currently getting issues with locale settings and some osg plugins.
Therefore I have changed all the occurances of atof by asciiToFloat or
asciiToDouble.

I believe that it is safe to do so at least for all the plugins.
Included here are also asciiToFloat conversion of environment variables. One
might argue that these should be locale dependent. But IMO these should be
set and interpreted by osg independent of the current locale.
"
2009-06-25 16:07:49 +00:00
Robert Osfield
d167142a59 Fixed warnings and refactored FindFFmpeg.cmake and ffmpeg plugin CMakeLists.txt scripts to better handle different instation combinations 2009-06-25 16:02:23 +00:00
Robert Osfield
d1eb4fd5de Converted tabs to spaces 2009-06-25 13:31:48 +00:00
Robert Osfield
294504cb58 From Mathias Froehlich, "put texturemanager into osg namespace." 2009-06-25 13:13:54 +00:00
Robert Osfield
c5c71f519c From Serge Lages, "Here is a little fix for the FFmpeg plugin. Previously the path computed by osgDB::findDataFile was not used, preventing loading files from directories inside the data path list." 2009-06-25 13:10:31 +00:00
Robert Osfield
0ad020bf16 From Ulrich Hertlein, "please find attached some typo fixes in DatabasePager and a tweak to only print the addLoadedDataToSceneGraph stats when some work was actually done." 2009-06-25 13:00:01 +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
d4b065de53 Added osgFX depedency 2009-06-25 08:53:28 +00:00
Robert Osfield
0b33bba514 Added osgVolume dependency 2009-06-25 08:52:23 +00:00
Robert Osfield
f043a4ec75 Added CMakeLists.txt for osgPresentation 2009-06-25 07:42:10 +00:00
Robert Osfield
02defea1b0 Added use of REGISTER_OGRPLUGIN to enable static linking of plugins 2009-06-24 17:37:59 +00:00
Robert Osfield
41dc916e77 Added support for static compilation of pdf plugin 2009-06-24 17:33:01 +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
Robert Osfield
5c0148106c Refactored the FFmpeg find script and the pdd CMakeLists.txt to improve the automatic detection of the required facilities 2009-06-24 10:26:48 +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
8955321dcc From Cedric Pinson, Fix clone operation for osgAnimation::Animation 2009-06-23 12:59:01 +00:00
Robert Osfield
085f2c19dd Fixed warning 2009-06-23 11:33:59 +00:00
Robert Osfield
719b6cf1bf Added explict search for stdint.h 2009-06-23 10:53:55 +00:00
Cedric Pinson
bf20382acc From Cedric Pinson, fix clone for UpdateTransform 2009-06-22 18:04:36 +00:00
Robert Osfield
76de3e6a02 Fixed swap size 2009-06-22 16:02:38 +00:00
Cedric Pinson
658d96aa64 From Cedric Pinson, fix constructors for cloning osgAnimation objects 2009-06-22 14:24:59 +00:00
Robert Osfield
abc0b5b10d Added mutex lock to iniGLNames to prevent threading problems during initialization 2009-06-21 17:28:59 +00:00
Robert Osfield
771101d79b Added support for initial cut of static build of Present3D. 2009-06-20 17:03:38 +00:00
Robert Osfield
cc4cc7b403 From Farshid Lashkari, "I found a bug in the osgText library in version 1.2 that I believe still exists in the latest version.
I found that changing the alignment of a text object does not work properly if the text contains newline characters. I've attached a simple test case that shows the problem. If I set the text AFTER setting the alignment, everything works fine. But if I set the text BEFORE setting the alignment then the text is displayed incorrectly.

The fix is very simple. Instead of calling computePositions() in TextBase::setAlignment(), it calls computeGlyphRepresentation(). I've attached the modified TextBase.cpp."
2009-06-20 11:35:22 +00:00
Robert Osfield
f79232495f Updated wrappers 2009-06-20 08:18:58 +00:00
Robert Osfield
6dbb6dc0ae From Gino van den Bergen, "AFAICS, OSG's OBJ loader correctly handles backslash-newlines that are used for continuation of lines. However, I recently ran into a problem with OBJs that where converted from another source using Right Hemisphere Deep Exploration. In these OBJs newlines are escaped in the following way:
f  15939/9999/16177 15941/10000/16178 15940/10001/16179\
15938/10002/16180

In the OBJ loader the newline would be interpreted as follows

f  15939/9999/16177 15941/10000/16178 15940/10001/1617915938/10002/16180

However, for correctly loading the model it should be interpreted as

f  15939/9999/16177 15941/10000/16178 15940/10001/16179 15938/10002/16180

Thus, the escaped newline should be interpreted as a space.

I tried to lookup what the correct interpretation for a backslash-newline was in the OBJ spec but did not find anything useful. Nevertheless, my suggestion would be to adopt replacing the escaped newline by a space in order to avoid problems as stated above. I cannot imagine a meaningful usage of a newline within a numerical literal so I do not foresee cases where replacing a backslash-newline by a space would be harmful. The fixed obj.cpp is zipped and attached to this mail."
2009-06-19 14:14:26 +00:00
Robert Osfield
4d19bed7f2 Changed the debug output so that the code path is not run unless it's needed 2009-06-19 13:53:35 +00:00
Robert Osfield
9559498db6 From Jean-Sebastian Guay and Robert Osfield, added line numbers to debug shader output 2009-06-19 13:50:14 +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
d0916e63c6 Updated wrappers 2009-06-19 11:16:24 +00:00
Robert Osfield
82b329b0a7 Added append() method 2009-06-19 11:04:48 +00:00
Robert Osfield
93a0391dc3 Added clears to various vectors being passed in to get*() methods. 2009-06-19 11:00:33 +00:00
Robert Osfield
677256c724 From Cory Riddell, "I added a line to clear the threads vector prior to populating it in
Viewer::getAllThreads(). This is consistent with what happens in
Viewer::getOperationThreads()."
2009-06-19 10:55:12 +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
1742810b59 Updated wrappers 2009-06-18 08:22:24 +00:00
Robert Osfield
17db679ff0 From Rene Molenaar, "The bug is as described above:
"The dragger's corner tabs are no longer in the corners."

this fix places the cornertabs back in the corners.
(the manipulator does not make sense otherwise)."
2009-06-18 08:18:10 +00:00
Robert Osfield
73b423ad85 Replaced forward declarations 2009-06-17 16:54:39 +00:00
Robert Osfield
3a3a8567d4 Added ".added", ".modified" and ".removed" alias to .revisions plugin 2009-06-17 16:54:12 +00:00
Robert Osfield
ba5b79c220 Updated wrappers 2009-06-17 15:12:58 +00:00
Robert Osfield
acf07b5b22 Made method names consistent with each other 2009-06-17 15:12:50 +00:00
Robert Osfield
29502d8d23 From Alberto Luaces, "the new changes in osgAnimation showed some errors on the Cygwin
platform:

1 - osgAnimation/StatsHandler includes <cmath>, but on Cygwin only std::isnan
is defined that way. I changed it to <math.h> as it is done in the rest of
the OSG.

2 - Pulling some osgViewer headers from the same file in osgAnimation makes
the former a new dependency. Thus, I got errors at osgAnimation linking time.
I wonder why nobody noticed this on other platforms. I have updated the
CMakeLists.txt file in order to link to the needed libraries, and

3 - I have updated the openscenegraph-osgAnimation.pc.in file accordingly."
2009-06-17 11:00:14 +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
bf895e5c98 Updated wrappers 2009-06-16 13:02:33 +00:00
Cedric Pinson
93cafb2292 From Cedric Pinson, Fix osgAnimation warning and errors 2009-06-16 12:32:02 +00:00
Cedric Pinson
a6e57f6e46 From Cedric Pinson, Fix osgAnimation warning and errors for Bone.cpp 2009-06-16 12:22:36 +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
c78e41ede6 Updated wrappers 2009-06-12 10:37:42 +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
a921031034 From Stephan Huber, "here are some small fixes/enahncements for the cocoa backend to allow
proper functioning when running the osgViewer run-loop in a secondary
thread (e.g. when embedding GraphicsWindowCocoa-windows in a full blown
cocoa application).

OS X is picky when you want to change the user-interface from another
thread than the main thread, not all UI stuff is thread-safe. So now
window closes and showing / hiding the menu bar is done in the main
thread via Cocoa's performSelectorOnMainThread-mechanism.

These changes don't affect the normal osgViewer usage pattern."
2009-06-12 10:00:08 +00:00
Robert Osfield
4845fe23ae From Laurens Voerman, "there seems to be a bug in the proxynode writer introduced in svn rev 10330. It craches on a null pointer for options (on my windows system).
Fixed version of the file "src\osgPlugins\osg\ProxyNode.cpp" attached, based on svn rev 10332."
2009-06-12 09:57:45 +00:00
Robert Osfield
01c6d4f448 From Konstantin Sinitsyn, "I've fixed bug with loading of compressed texture to texture array!" 2009-06-12 09:48:59 +00:00
Robert Osfield
fac2ffecb3 From Roger James and Robert Osfield, clean up of COLLADA CMake support 2009-06-12 09:41:10 +00:00
Robert Osfield
19ebaaac00 Fixed copy constructor 2009-06-11 15:13:04 +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
e5a436b131 From Emmanuel Roche, "I've updated the CURL plugin to support the CURL_CONNECTTIMEOUT and CURL_TIMEOUT options.
Those two additional options can now be set using the Options::setOptionsString() function (just like the already existing OSG_CURL_PROXY & OSG_CURL_PROXYPORT options).

This is a convient solution to limit the freezing effect one may face in case the targeted server is down or too slow.

I successfully compiled and used this updated version on Windows in my application.

And by default those settings are not set (so no change in the behavior if you don't need them).
"
2009-06-10 09:24:12 +00:00
Robert Osfield
150c2e5fa1 From Gustav Happalahti, fixed filename usage 2009-06-09 08:43:13 +00:00