Commit Graph

11736 Commits

Author SHA1 Message Date
Robert Osfield
884f480202 Fixed compile error 2012-01-24 15:44:58 +00:00
Robert Osfield
6d66e1abaa Added support for using GL_UNPACK_ROW_LENGTH in conjunction with texture's + osg::Image via new RowLength
parameter in osg::Image.  To support this Image::setData(..) now has a new optional rowLength parameter which
defaults to 0, which provides the original behaviour, Image::setRowLength(int) and int Image::getRowLength() are also provided.

With the introduction of RowLength support in osg::Image it is now possible to create a sub image where
the t size of the image are smaller than the row length, useful for when you have a large image on the CPU
and which to use a small portion of it on the GPU.  However, when these sub images are created the data
within the image is no longer contiguous so data access can no longer assume that all the data is in
one block.  The new method Image::isDataContiguous() enables the user to check whether the data is contiguous,
and if not one can either access the data row by row using Image::data(column,row,image) accessor, or use the
new Image::DataIterator for stepping through each block on memory assocatied with the image.

To support the possibility of non contiguous osg::Image usage of image objects has had to be updated to
check DataContiguous and handle the case or use access via the DataIerator or by row by row.  To achieve
this a relatively large number of files has had to be modified, in particular the texture classes and
image plugins that doing writing.
2012-01-24 14:34:02 +00:00
Robert Osfield
6aa6e9a38c Refactored the click_to_run implementation to avoid bug associated with running the first click_to_run entry in a layer when
subsequent click to run's are called.
2012-01-24 14:27:17 +00:00
Robert Osfield
76b1c8e20e Changed float QuicktimeImageStream::getCurrentTime() to double QuicktimeImageStream::getCurrentTime() to keep it consistent with
the type of the virtual function ImageStream::getCurrentTime(), and with this fixing a compile and runtime error.

Changed time variables all to use doubles rather than float to be consist with the change to getCurrentTime().
2012-01-23 18:48:18 +00:00
Robert Osfield
fa5100cc2c From Alberto Luacus, "The ffmpeg plugin fails to compile with the upcoming libav 0.8 because
the required header mathematics.h is not being included explicitly.

I have just included it, and verified that this also works with current
version 0.7, since the header is also available there."
2012-01-05 14:07:56 +00:00
Robert Osfield
329f98c83b Fixed the return value of SlideEventHandler::selectLayer() so that the 'n' now works correctly. 2012-01-03 15:59:19 +00:00
Robert Osfield
b828f5c083 From Farshid Lashkari, "Attached is a simple fix to osg::Sequence that allows it to load properly with the serializer formats (osgt/osgb). The problem was that the internal _nrepsRemain member was not being initialized properly if the number of repeats was equal to the default value of -1. When the number of repeats is explicitly set using setNumRepeats(), _nrepsRemain is set to the same value. However, in the constructor of osg::Sequence, it was not being initialized to the same value as _nreps. This fix simply changes the initial value of _nrepsRemain to the same as _nreps." 2012-01-02 16:54:05 +00:00
Robert Osfield
d9fd29d996 From Chris Denham, Implementation of write functions in CURL plugin 2012-01-02 16:38:01 +00:00
Robert Osfield
3aab31f198 From Paul Martz and David Glenn,
"From David Glenn and Paul Martz. This change adds support for the NO_COLOR bit in the Vertex records' flags field. If NO_COLOR is set, and PACKED_COLOR is not set, the code will now properly default to using the face color at those vertices. See the osg-users thread "Open Flight characteristic not reflected in the current OSG" for more info."

and

"In consultation with David Glenn, it appears we needed to change a second file to correct how OpenFlight handles transparency when vertices have NO_COLOR. "
2011-12-23 17:40:31 +00:00
Robert Osfield
a53308f7e8 Gunnar Holm, "After upgrading from 2.8.3 to 3.0.1 we experienced a lock in the Mutex
functionality when using Terrain::setVerticalScale. This was caused by
the following call sequence resulting in a lockup:

void Terrain::setVerticalScale(float scale)
  CALLS    dirtyRegisteredTiles();


void Terrain::dirtyRegisteredTiles(int dirtyMask)
 SETS LOCK    OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_mutex);
 and CALLS (on every tile)   setDirtyMask(dirtyMask);


void TerrainTile::setDirtyMask(int dirtyMask)
 CALLS _terrain->updateTerrainTileOnNextFrame(this);


void Terrain::updateTerrainTileOnNextFrame(TerrainTile* terrainTile)
 SETS LOCK   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_mutex);
******* PROBLEM - since lock has already been set! ********


The suggested fix submitted changes from using Mutex to ReentrantMutex.
"
2011-12-23 17:34:07 +00:00
Robert Osfield
c7698c1334 From Aurelien Albert, "I made a modification in the Dragger class :
You can now set a "intersection mask" and it will be used when looking for intersections.

So you can now easily "hide" some objects from manipulators."
2011-12-23 17:21:59 +00:00
Robert Osfield
50c7a31d62 From Brad Christiansen, "I have added an implementation for set/getVolume in the direct show plug-in." 2011-12-23 17:16:06 +00:00
Robert Osfield
f3ce66aa8b From Glenn Waldron, "Attached is a change to ClusterCullingCallback to make it work properly under an RTT camera with an INHERIT_VIEWPOINT reference frame." 2011-12-23 17:15:06 +00:00
Robert Osfield
dc55068db1 From James Turner, "Testing FlightGear with Cocoa osgViewer, encountered some problems with hiding / re-showing the cursor. Attached version fixes this, by tracking the current cursor value, and ensuring we don't nest calls to [NSCursor hide] or [NSCursor unhide]." 2011-12-23 16:57:34 +00:00
Robert Osfield
fa2e8b22c5 From Ulrich Hertlein, "attached is a patch for osgPlugins/mdl/MDLReader.cpp that improves its functionality on
Unix filesystems.  It also includes code cleanups/refactoring."
2011-12-23 16:29:51 +00:00
Robert Osfield
4e834dfc73 From Brad Christiansen, "Attached are some small changes to the ImageStream interface and the DirectShow and FFMPEG plugins to provide the current time being displayed in the image stream.
I don’t have access to an OSX or Linux dev machine to make the changes required to the quick time plugin. This plugin will just default to returning 0."
2011-12-23 16:27:25 +00:00
Robert Osfield
f6ace4a7d0 From Ulrich Hertlein, typo fixes 2011-12-23 16:14:51 +00:00
Robert Osfield
c9d19d7bff Added handling of an empty filename when writing out an image file. 2011-12-23 12:42:18 +00:00
Robert Osfield
0af31eff5d Removed inappropriate static usage 2011-12-19 16:18:18 +00:00
Robert Osfield
c86e2361d2 Moved the createSpotLightImage function into include/osg/ImageUtils 2011-12-19 09:37:57 +00:00
Robert Osfield
c225f2758c Added --num-sm and --parallel-split and --cascaded command line options to set the appriopriate ViewDependentShadowMap settings. 2011-12-19 09:09:30 +00:00
Robert Osfield
74fb1f42d9 Moved osgshaders example across to use the new osgUtil::PerlinNoise example 2011-12-13 21:14:33 +00:00
Robert Osfield
22e309e8fb Created new PerlinNoise class from the Noise.h+Noise.cpp code in the osgshaders example. 2011-12-13 21:12:00 +00:00
Robert Osfield
22ef706e32 Fixed build under Tiny Core. 2011-11-30 19:14:14 +00:00
Robert Osfield
16c2bb5a2f To fix problems in tight bound computation of the shadow map made the ComputeLightSpaceBounds usage always used when the
CastShadowMask is active.  Changed the ComputeLightSpaceBounds to use just VIEW_FRUSTUM_CULLING.
2011-11-25 12:48:03 +00:00
Robert Osfield
2b2c1b5671 From Jean-Sebastien Guay, fix for handling texture unit >= 8 and negative LigthNum. 2011-11-25 09:24:50 +00:00
Robert Osfield
92ed903a7f Added prelimanary support for parallel split shadow maps into ViewDependentShadowMap. 2011-11-22 21:55:30 +00:00
Robert Osfield
116b9a978c From Trajce Nikolov, "Here is extended version of the osgforest example - technique with geometry shader added, was doing it for a project so I thought might be useful to update the example as well
"
2011-11-18 08:20:04 +00:00
Robert Osfield
c7542d5cd8 Fixed indentation 2011-11-18 08:15:36 +00:00
Robert Osfield
ce021df661 Added .get() to fix build 2011-11-17 18:45:18 +00:00
Robert Osfield
862c1c4af3 Updated built in volume shaders to honour the osg::Matierial setting 2011-11-11 10:36:17 +00:00
Robert Osfield
d13bfb522b Enabled blending for the iso surface rendering to enable fade in/fade out of volume. 2011-11-11 10:25:20 +00:00
Robert Osfield
85418bf7ba Added handling of osgGA::GUIEventAdapter::getMouseYOrientation() in the orientation of mouse y position.
Added updating of properties on both mouse move/drag and keydown.
2011-11-10 15:50:22 +00:00
Robert Osfield
a548daa4be Added a check against OSX 10.6 to enable better selection of when to provide custom cosf etc. definition.
This change has been introduced to address recurcsion problems in 10.7 in the ac3d plugin.
2011-11-07 14:36:50 +00:00
Robert Osfield
693d79c638 Implement presentation update feature that reloads the presentation on pressing 'u'. 2011-11-04 12:50:05 +00:00
Robert Osfield
e8bae33143 Improved the handling of setStartTick() being called mid app, such as when idirectly called when doing a Viewer::setSceneData().
Improved the setting the the initial event state.
2011-11-04 12:47:24 +00:00
Robert Osfield
0329ca5cea Improved handling of resetting of the EventQueue::startTick(). 2011-11-04 12:45:32 +00:00
Robert Osfield
747654fb6d Added removeFromObjectCache method. 2011-11-04 12:44:01 +00:00
Robert Osfield
3c461dd706 Add check to filter out the return of FILE_NOT_FOUND from archive results to prevent these from prematurely exiting the Registry::read(..) method
bofore it loads plugins to try and load requested file.
2011-11-02 10:57:17 +00:00
Robert Osfield
04f9341161 Replaced the use of PrtScrn with 'm' for taking screenshots, replaced the use of 'm' with 'M' for taking movies. 2011-11-01 16:13:24 +00:00
Robert Osfield
1bcd36f5ed From Stephan Huber, "A recent commit
(41e23f466d)
for GraphicWindowsIOS.mm broke the compilation for OpenGL ES 1.x as
GL_DEPTH_COMPONENT32_OES is not defined for 1.x. I added a #define-guard."
2011-11-01 13:41:48 +00:00
Robert Osfield
76396d0c12 Added screen capture handler to present3D, with the PrtScn button used for a single frame capture and 'm' for continuous frame capture.
The --screenshot filename command line option can be used to configure the name of the screen capture.
2011-11-01 13:36:07 +00:00
Robert Osfield
215512647c Added setting of the sampleDensityWhenMovingProperty at the same time as when setting the sampleDensityProperty 2011-11-01 11:08:48 +00:00
Robert Osfield
3cad9d0962 Fixed the use DCM_SeriesDescription 2011-11-01 10:30:18 +00:00
Robert Osfield
14a4aa9a19 Improved the handling of multiple datasets being read at once, with all the images in a series being group according to Series UID and SeriesDescription and orientation. 2011-11-01 10:27:12 +00:00
Robert Osfield
ca582c708d Adding missing checks against View's Camera and SceneData for any update callbacks that need calling. 2011-10-31 15:29:49 +00:00
Robert Osfield
d95801f6a8 Changed the notification level to INFO. 2011-10-28 11:00:55 +00:00
Robert Osfield
bbf081695b Changed the setting of Traits::sampleBuffers so that it's set to 1 when DisplaySettings::getMultiSamples() is set to a non zero value. 2011-10-28 11:00:08 +00:00
Robert Osfield
3e7900c39e Changed the default for SampleBuffers to be 1 when set. 2011-10-28 10:36:29 +00:00
Robert Osfield
20ffed1fa1 Removed OSX codepath for setting the depth value to 32 as this turned out to be unneccesary. 2011-10-28 09:45:51 +00:00