Commit Graph

6492 Commits

Author SHA1 Message Date
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
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
e1b7de4b3d Martin Beckett, "Here's a first attempt at a DXF writer plugin
At the moment it outputs DXF for whatever geometry is contained in the node it would be nice to draw the model as it is rendered (points/lines/surface)

If people could also test against other apps that need to read DXF, the format is a bit of a black art and not all importers support all features so it might need some options to tweak the output.

It has some rather clever colour lookup stuff to match real colours against the limited DXF palette. I cracked the code of the Autocad indexed colours!"
2009-06-08 14:06:58 +00:00
Robert Osfield
148bd9f232 From Mathias Froehlich, "Without this change packed depth stencil attachments are only supported if the
GL_EXT_framebuffer_blit extension is available. This is due to the early
return from the constructor if this is missing.
As far as I read the standard extension documents, this blit call is not
required to have packed depth stencil fbos.
The change fixes this and allows packed stencil attachments on machines
without the multisample blit command."
2009-06-08 13:51:24 +00:00
Robert Osfield
3ec6c6a4d9 Addded .ive and .osg support for new GL_EXT_blend_equation_separate properties in osg::BlendEquation 2009-06-08 13:47:25 +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
24a8b2acd7 From Lionel Lagarde, "this correction makes the intensity interpolated in the correct direction when the angle is between _cosFadeAngle and _cosAngle." 2009-06-08 11:12:34 +00:00
Robert Osfield
60f29aeb37 Fixed warning 2009-06-08 10:54:16 +00:00
Robert Osfield
9dfcb2530b Changed the file search path so it returns an empty string when the filename contains a server address. 2009-06-08 10:27:21 +00:00
Robert Osfield
0fe8084499 From Johan Nouvel, fix to handling of transparent textured objects.
Tweak from Robert Osfield, commented out disabling of depth write as this is not appropriate by default.
2009-06-08 09:47:27 +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
647d54bda8 Fixed warning 2009-06-05 10:42:53 +00:00
Robert Osfield
4b1686a50a Updated wrappers 2009-06-04 14:37:02 +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
55ae7c05bc Refactored the adaption of X11 key symbols into OSG key events to fix problems with handling wide range of locales. 2009-06-02 08:56:32 +00:00
Robert Osfield
83e47c0de6 Moved assigned of texture object to _textureObjectBuffer to earlier in Texture2D::apply() to prevent problems with non power of two texture mipmap generation. 2009-06-02 08:53:21 +00:00
Robert Osfield
d849574a93 From Wojciech Lewandowski, Fixed handling of empty Program. 2009-06-01 11:22:42 +00:00
Robert Osfield
4b769494cb From Emmanuel Roche, "I've also updated the computeBound() method from the osg::Transform class : this method was using float based temporary variables and thus the double precision is lost here. I've changed that to use the generic types osg::BoundingSphere::vec_type and osg::BoundingSphere::value_type instead." 2009-06-01 11:08:34 +00:00
Robert Osfield
378ceebf84 From Emmanuel Roche, "I'm joining an updated version of the file daeWritter.cpp and daeWriter.h for the collada plugin compatible with the usage of double precision BoundingSphere & BoundingBox. The only change is the addition of the template specialization for osg::Vec3d object (until now only the specialization for osg::Vec3 was defined, I replaced that with osg::Vec3f to be more "precise")." 2009-06-01 11:07:07 +00:00
Robert Osfield
aa97f1d86a Updated wrappers 2009-05-30 07:39:59 +00:00
Robert Osfield
986fc05ac1 Added revisions plugin in support of paged database revisions. 2009-05-29 18:24:47 +00:00
Robert Osfield
58b37caecb Updated wrappers 2009-05-29 08:46:58 +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
2c9b4834af Fixed warning 2009-05-28 16:46:11 +00:00
Robert Osfield
4f0d658ce9 From Mathias Froehlich, "This frees some memory that is allocated by the X11 functions." 2009-05-28 14:15:36 +00:00
Robert Osfield
bf69b168b4 Fixed unitialized variable 2009-05-28 14:12:03 +00:00
Robert Osfield
f80033d892 From Stephan Huber, "attached you'll find a small fix for GrphicsWindowCocoa. There was a bug
with certain key-strokes, which led to a crash."
2009-05-28 14:09:16 +00:00
Robert Osfield
07cf3ecd11 From Gregory Jaegy and Robert Osfield, added support for static linking of OpenFlight plugin 2009-05-28 13:29:20 +00:00
Robert Osfield
8e2b2031e2 From Neil Hughes, "Two changes here...
1. I've implemented an option controlled route by which users can still access the old method of extracting the zip content to the local filesystem. This is in response to Ulrich's comments about zip files encorporating files other than those that OSG knows about, but which an application may require.

To access this the user makes the following call on their options object that they pass to the reader. Without it, the plugin will extract by default to memory.

local_opt->setPluginStrData("zipextract","filesystem");


2. The second change is that I've moved the declaration of one of the variables to within the numitems loop so that if loading of a specific file within the zip fails, subsequent files still load correctly. This was the issue that Ulrich raised."
2009-05-28 12:25:35 +00:00
Robert Osfield
f49c026803 Updated wrappers 2009-05-28 08:25:18 +00:00
Robert Osfield
b7db15bdad Fixed glStencilMask setting. 2009-05-27 12:11:41 +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
885a7893b8 From Jan Ciger, "I am attaching the updated VRML plugin, as promised. This version works
with OpenVRML 0.17.12 and Boost 1.38. Other versions may work too, but I
didn't test that."
2009-05-26 14:22:56 +00:00
Robert Osfield
e24dad3b71 From Ulrich Hertlein, "please find a patch for the DirectX loader to use std::istreams. This will make it usable with the zip plugin." 2009-05-26 11:00:26 +00:00
Robert Osfield
1f9ef36545 Refactored the GraphicsWindowX11::adaptKey() implementation so that it always uses the reampX11Key(ks) method, and for the mapping to handle case correctly. 2009-05-25 16:34:26 +00:00
Robert Osfield
b1170638c7 Updated wrappers 2009-05-25 12:07:34 +00:00
Robert Osfield
9644b25b9e Added initializer of ParticleSystemUpdater::_frameNumber 2009-05-25 11:16:54 +00:00
Robert Osfield
5944ddf255 From Wojciech Lewandowski, "Two fixes for LUMINANCE and ALPHA_LUMINACE pixel formats written into DDS file. Component masks were incorrect. I tested results with ultimate DDS compatibitlity tester ie Microsoft DirectX Texture tool ;-). I have also added comment with warning about possible problems when writing other than 8 bit component pixel formats.
"
2009-05-25 11:12:38 +00:00
Robert Osfield
e9422b4120 From Colin McDonald, "The latest osg::notify is crashing at initialisation on Solaris, due to
constructor issues:

Within the NullStream & NotifyStream classes the base class objects
(ostream) were being initialised before the class member _buffer objects
which they referenced, causing a crash.

I had to move the file scope g_NullStream & g_NotifyStream initialisation
into a function to get them to work.

Also there was a missing osg:: qualifier on getNotifyHandler."
2009-05-25 10:46:37 +00:00
Robert Osfield
cfdccbfed6 Fixed handling of case where the master and the slave camera are placed on the same GraphisContext, or when the master camera and slave camera are assigned to different Camers. Note normally one doesn't mix master with GraphicsContexts and slave cameras so neither case is common. 2009-05-21 16:33:38 +00:00
Robert Osfield
27ae00630d Added a default value to avoid warning 2009-05-21 08:37:04 +00:00
Robert Osfield
9db74b8623 Fixed warnings 2009-05-20 12:14:45 +00:00
Robert Osfield
86479b0a73 Fixed warnings 2009-05-20 12:06:57 +00:00
Robert Osfield
40bf035420 Updated wrappers 2009-05-20 11:14:27 +00:00