Commit Graph

6637 Commits

Author SHA1 Message Date
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
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
7530915985 Updated wrappers 2009-05-19 15:10:41 +00:00
Robert Osfield
94c629b972 Attempt to fix Cygwin build failure 2009-05-19 12:25:54 +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
d85a2e2836 From Stephan Huber, "when using windownames and switching between fullscreen and windowed
mode GraphicsWindowCocoa crashes. Attached you'll find a fix for that bug.
"
2009-05-19 10:45:57 +00:00
Robert Osfield
ef14ed46f4 From Stephan Huber, replaced #include <malloc.h> with #include <stdlib.h> to fix build under OSX 2009-05-19 10:42:49 +00:00
Robert Osfield
37e93880e9 From Neil Hughes, intergrated support for uncompressing zip files in memory and from istreams (enabling reading from http). 2009-05-19 09:26:22 +00:00
Robert Osfield
4dd7a87aaa Added enable of clear stencil and depth mask to ensure that stencil and depth buffers are always cleared when required 2009-05-18 15:46:02 +00:00
Robert Osfield
eab39329c5 From Roland Smeenk, "Attached you will find some changes to the dae plugin to improve light support.
-Changed the addition of lights to add the lightsource directly into the scenegraph (instead of below a switch node)
-All added lights are enabled in the root stateset and replace the head- or skylight.
 (if no lights are available the head- or skylight will remain active)
-Ambient in osg::LightModel is zeroed out. All ambient now comes from separate ambient only light sources.
-Lights can now be written properly
-Replaced strings by constants defined in the Collada DOM"
2009-05-18 15:21:57 +00:00
Robert Osfield
ceacbf3cbe Quietened down debug messages 2009-05-18 13:01:25 +00:00
Robert Osfield
9ea43a31c6 From Ross Anderson, "Symptom: The computation of TerrainTiles containing only image layers (no elevation layer) is incorrect. The resulting bounding sphere will always have a radius of zero.
The fix is to remove the call to bs.expandBy(v) and compute the radius directly. I believe this call was intended to be bs.expandRadiusBy(v), but it is superfluous when the radius is computed directly."
2009-05-18 12:54:23 +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
4aab969a73 Updated wrappers 2009-05-18 09:34:17 +00:00
Robert Osfield
545c52d4bb From Jean-Sebastien Guay, build fixes form Windows 2009-05-15 15:49:10 +00:00
Robert Osfield
ea7721d542 Added checks against libcurl version to decide what features are used or not 2009-05-15 15:10:59 +00:00
Robert Osfield
e94f874e54 Removed debugging code block 2009-05-15 12:31:23 +00:00
Robert Osfield
a4cc72d4fb Removed redundant errno declaration that was cause build problems under RedHat 3.2.
Removed redundant version declarations.
2009-05-15 12:22:53 +00:00
Robert Osfield
a0272d6665 From Martin Beckett, "n bool ReaderWriter::fileExists(const std::string& filename, const Options* /*options*/) const
Windows doesn't define F_OK and access() is in io.h, rather than stdio.h
These are fixed in FileUtils.cpp, so I copied the fix from there - might be better to move this to FileUtils header and include it here and in FileUtils.cpp?"
2009-05-15 07:50:20 +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
5432430fa6 Added setting of full filename to options as "filename" entry. 2009-05-14 16:06:34 +00:00
Robert Osfield
2cefc5f71a 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 15:45:54 +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
2dad77a102 Replaced tabs with spaces 2009-05-14 13:30:25 +00:00
Robert Osfield
fcfb8468cf Changed tabs to spaces 2009-05-14 13:16:05 +00:00
Robert Osfield
af7e47a79b Changed debug message to INFO notication level 2009-05-14 13:10:18 +00:00
Robert Osfield
c72124e449 Added support for read the various animaton materials/paths from http 2009-05-14 13:05:32 +00:00
Robert Osfield
cbd07774f0 Updated wrappers 2009-05-14 09:44:55 +00:00
Robert Osfield
3c88e59496 Added support for reading presentations and content via http, with support of the FileCache when available. 2009-05-13 19:48:02 +00:00
Robert Osfield
59ddcd08f4 Added intial cut at fileExists() implement using libcurl. Note, current implement loads the whole file and then discards it so is very in-efficient. This implementation will soon be replaced. 2009-05-13 19:47:26 +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
0cf92badba From Thibault Genessay, "On Windows, when a process tries to spawn one too many thread,
_beginthreadex() fails but OpenThreads still waits on the startup
Block before returning to the caller of OpenThreads::Thread::start().
This causes a deadlock. The return value of _beginthreadex() is
actually checked, but after the call to OpenThreads::Block::block() so
it is basically useless.

Attached is a fix to move the check for the return value of
_beginthreadex() before the call to block(), so that start() can
return to the caller with a non-zero error code. This solves the
problem for me."
2009-05-13 08:33:55 +00:00
Cedric Pinson
c98466d401 from Maciej Krol:\nFixes for OSG_USE_PTR_IMPLICIT_OUTPUT_CONVERSION = OFF 2009-05-12 11:54:50 +00:00
Robert Osfield
bdaead21bf From Fajran Iman Rusadi, fixed error in window index management when children add insert or removed. 2009-05-12 10:45:44 +00:00
Robert Osfield
de6b571ac8 Added return to end of file to prevent warning 2009-05-12 05:58:31 +00:00
Robert Osfield
3ca952f35b Updated wrappers 2009-05-11 16:38:59 +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
ee1f5da3b6 Commented out debug messages 2009-05-11 14:11:35 +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
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
a4ff2c4af7 Removed redudent check against frustum.getCurrentMask() 2009-05-08 12:53:11 +00:00
Robert Osfield
0442237ec1 Changed 0 initializer to InheritCursor 2009-05-08 12:38:05 +00:00
Robert Osfield
426c5d4e44 Added osgGA and osgText to dependency list 2009-05-08 12:34:06 +00:00
Robert Osfield
c97d88b59c Added osgText dependency 2009-05-08 12:32:00 +00:00
Robert Osfield
1729648038 Added support for pushing handling relative paths set internally in the presentation file.
Added setting of env vars defined in presentation file.
2009-05-08 08:34:32 +00:00
Robert Osfield
fafb7028f8 Fixed unitialized variable 2009-05-08 07:50:09 +00:00
Robert Osfield
0ab285a3ef From Jean-Sebastien Guay, changed the timing control for when no audio layer is supplied. 2009-05-08 07:46:46 +00:00
Robert Osfield
622e7a6611 Moved property code from ImageLayer into Layer where it belongs 2009-05-07 18:32:36 +00:00
Robert Osfield
4a28b2ed4b Fixed handling of resize of ABSOLUTE_RF slave cameras 2009-05-07 14:53:21 +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
d62721c029 From Stephan Huber, "while debugging a problem in finding plugins on OS X I discovered, that
the conditional directives for setting the prepend-string in
createLibraryNameForExtension were not in effect, because of the mixture
of different #ifdef styles.

I removed the conditional part for __APPLE__ completely to be more
standard-conform with other platforms (plugins should be located in
osgPlugins-X.X.X/). Because of the wrong syntax of the conditional
compile the old code was not used anyway -- so no functional change.
"
2009-05-07 13:23:35 +00:00
Robert Osfield
870b1919c8 From MAthias Froehlich, "Attached is a compile fix I need on Suse 11.1 for a successful compile.
Just avoid uint8_t typed values in src/osgPlugins/ply/vertexData.cpp
if they are not needed for a particular reason ..."
2009-05-07 13:21:05 +00:00
Robert Osfield
255243ea0c From Chris Denham, "For me, on Windows, I also get a slew of these warnings when I move the window off screen.
So, might be a bit fiddly to try and prevent frame update in all situations that SwapBuffers retuns false.
I wondered if we could address this issue by only reporting the error if GetLastError is also non zero. Works for me!
The value returned by GetLastError is zero when SwapBuffers is called for a minimized or off screen window, so we could just add a check for this.
Just say the word, and I'll post my modified GraphicsWindowWin32.cpp to the submissions list. ;-)
Cheers.
Chris.

e.g.

//------------- OSG- 2..8 ----------
void GraphicsWindowWin32::swapBuffersImplementation()
{
   if (!_realized) return;
   if (!::SwapBuffers(_hdc))
  {
      reportErrorForScreen("GraphicsWindowWin32::swapBuffersImplementation() - Unable to swap display buffers", _traits->screenNum, ::GetLastError());
  }
}
//------------- Modification to remove redundant warnings ----------
void GraphicsWindowWin32::swapBuffersImplementation()
{
   if (!_realized) return;
   if (!::SwapBuffers(_hdc) && ::GetLastError() != 0)
  {
      reportErrorForScreen("GraphicsWindowWin32::swapBuffersImplementation() - Unable to swap display buffers", _traits->screenNum, ::GetLastError());
  }
}
"
2009-05-07 13:15:19 +00:00
Robert Osfield
ab5641e04e Fixed typo of POPPLER_LIBRARY_DIRS 2009-05-07 09:40:43 +00:00
Robert Osfield
c99c8826e8 Added support for osgVolume::TransferFunctionProperty 2009-05-07 09:07:34 +00:00
Robert Osfield
92afb370e8 Added .ive reading/writing support for osgVolume::Property classes 2009-05-06 13:47:08 +00:00
Robert Osfield
2b09b0dffa Added initial cut at support for osgVolume in .ive format. 2009-05-05 18:34:44 +00:00
Robert Osfield
1515b8d357 Changed debug message from NOTICE to INFO 2009-05-05 12:46:06 +00:00
Robert Osfield
9da4bb1387 Fixed support for reading imagery relative to the .osg being loaded 2009-05-05 12:18:24 +00:00
Robert Osfield
e2f4e96416 Added checks to prevent crash when no imagery is applied 2009-05-05 11:05:17 +00:00
Robert Osfield
ee3bfe94a3 Added checks to prevent crashes when no imagery is assigend to volume 2009-05-05 11:03:57 +00:00
Robert Osfield
602d83a486 Warning fixes 2009-05-03 18:51:13 +00:00
Robert Osfield
948f271730 From Michael Platings, compile fix for the following problem report on osg-users:
"the latest SVN revision cannot be build under Windows if ?OSG_USE_UTF8_FILENAME? config option is enabled. The error occurs in ?FileUtils.cpp? file, line 663, since there is no UNICODE-capable version of the ?GetProcAddress? function. The ?OSGDB_WINDOWS_FUNCT_STRING? makro is defined as follows in that case



#define OSGDB_WINDOWS_FUNCT_STRING(x) L ## #x L"W"



Thus the second parameter cannot be converted from wchar_t to LPCSTR. Should we convert the second parameter from wchar_t* to LPCSTR or use the same definition for the ?OSGDB_WINDOWS_FUNCT_STRING? makro in both cases?



The second error occurs in the same file, line 669. The second parameter for the ?pGetModuleHandleEx? function should be defined as wchar_t, but it?s defined as ?static char static_variable? in the line 667."
2009-05-01 08:49:19 +00:00
Robert Osfield
2d97593560 Fixed warning + bug 2009-05-01 08:20:26 +00:00
Robert Osfield
e938b6352b Added check against the validity of ViewerBase to make sure that a null pointer isn't dereferenced. 2009-04-30 13:13:19 +00:00
Robert Osfield
bc29eab0b7 Added support for reading from streams 2009-04-30 08:50:43 +00:00
Robert Osfield
d2f3615833 Build fixes 2009-04-30 08:27:07 +00:00
Robert Osfield
7cf721d1b5 Re-instated the code to allow event handler to run in standard viewers like osgviewer 2009-04-29 20:55:48 +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
b42706f034 Added osgFX to dependencies 2009-04-28 15:50:05 +00:00
Robert Osfield
ea65ea83a7 Added osgViewer as a dependency 2009-04-28 15:48:56 +00:00
Robert Osfield
b037fdb14a Enabled blending to all but iso surface shader.
Changed the alpha value of the iso surface colour to 1.0
2009-04-28 14:26:13 +00:00
Robert Osfield
ff93371cbd Fixed typo 2009-04-27 16:32:24 +00:00
Robert Osfield
7893293e0e Added detection of active alpha channel. 2009-04-27 15:45:52 +00:00
Robert Osfield
f0ff4afebc Further improvements in p3d plugin 2009-04-27 13:54:22 +00:00
Robert Osfield
200c9e82f3 Introduced first cut of Present3D integration with the core OSG with the introduction of a .p3d plugin. 2009-04-27 11:02:18 +00:00
Robert Osfield
5f26d6ec99 Attempt to fix mingw warnings 2009-04-27 06:26:41 +00:00
Robert Osfield
04238d128d Fixed warning 2009-04-25 21:44:38 +00:00
Robert Osfield
219f48fdbe Updated wrappers 2009-04-24 20:14:42 +00:00
Robert Osfield
2d621cb58a Added checking of need to update. 2009-04-24 18:37:36 +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
5a43bc12bb Updated wrappers 2009-04-24 11:23:33 +00:00
Robert Osfield
4eeb85fd0b From Mathias Froehlich, "change adds some code to also print the NodePath when a NaN is
detected in the CullVisitor.
May be this gives a bit more of a hint when this happens."
2009-04-24 11:01:00 +00:00
Robert Osfield
d91e9db152 From Jason Daly, "Currently, the .mdl plugin loads vertices in the native DirectX order, which is the reverse of OpenGL order. This means that the back faces are currently rendered as front faces, and vice versa.
This fix reverses the vertex order and sets up proper OpenGL facing.  I didn't notice this problem until I started using the plug-in in my own code (osgviewer seems to not enable backface culling)."
2009-04-24 10:54: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
b496d220c6 Warning fixes 2009-04-23 13:42:24 +00:00
Robert Osfield
9a072a4dc6 Refactored the subsurface PolygonOffset code so that it uses sensible values and also moves management of the PolygonOffset and Depth attribute objects into the Document object rather than using static vars. 2009-04-23 10:24:27 +00:00
Robert Osfield
194b7a32e7 Removed specific ATI path in PolygonOffset as it doesn't look to be neccessary with present ATI hardware/drivers 2009-04-23 10:23:20 +00:00
Robert Osfield
4938d5687e Quitened down warnings generated by ffmpeg headers by remove -pedantic from CMAKE_CXX_FLAGS 2009-04-22 18:22:22 +00:00
Robert Osfield
009409695d Fixed warning 2009-04-22 16:50:50 +00:00
Robert Osfield
7e2b022ead Warning fixes 2009-04-22 16:47:07 +00:00
Robert Osfield
ddd3c39a17 Warning fixes 2009-04-22 16:42:16 +00:00
Robert Osfield
3efb69b0c6 Warning fix 2009-04-22 16:41:58 +00:00
Robert Osfield
e8d9dd142d From Neil Hughes, converted across to use istream for reading data from file to enable reading .3ds files over http (use OSG's libcurl plugin).
From Robert Osfield, ammendments of the above to better support reading of files from local directories.
2009-04-22 15:46:24 +00:00
Robert Osfield
0c8cb4e6c9 From Bob Kuehne, "fix for failing collada builds on osx due to not being able to stringstreamify osg::Vec3 without io_utils included." 2009-04-22 13:09:33 +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
70771cf6ce Added hand cursor implementation 2009-04-22 11:22:08 +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
8d6a35dbfb From Eric Sokolowsky, "src/osg/Image.cpp is missing the GL_RGBA8 image type when calculating the number of components in an image. It is added here." 2009-04-22 10:47:44 +00:00
Robert Osfield
f5d532e54b From Neil Hughes, "here is an update to ReaderWriterCurl that makes use of the amended ReaderWriter definition to pass some plugin string data via the options object." 2009-04-21 14:15:03 +00:00
Robert Osfield
425cb87487 Updated wrappers 2009-04-21 12:02:15 +00:00
Robert Osfield
c6a4fc6680 Fixed handling of case of no graphics contexts being assigned 2009-04-21 10:13:19 +00:00
Robert Osfield
147486f57a Removed #ifdef WIN32 around #include <errno.h> to fix build under Mandrake build. 2009-04-20 19:05:59 +00:00
Robert Osfield
3fd9c6c1de Replaced #idef WIN32 with _MSC_VER to try and fix build errors under mingw 2009-04-13 09:41:22 +00:00
Robert Osfield
390be829af From Santosh Gaikwad, "I have added the exception handling in ply loader. All exceptions I am catching in VertexData::readPlyFile() and made sure that application will not crash or exit if any exception occurred. I am returning NULL from VertexData::readPlyFile() if any exception occurred.
"
2009-04-13 09:35:52 +00:00
Robert Osfield
a240da2535 updated wrappers 2009-04-11 06:25:28 +00:00
Robert Osfield
562f84668f From Jean Sebastien Guay, added error reporting handling of wider range of video formats. 2009-04-11 06:16:37 +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
5d512b44c9 Added VS checks around code block from Mark Sciabica that broke the mingw build 2009-04-10 14:11:38 +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
faa50c0962 From Santosh Gaikwad, warning fixes 2009-04-10 09:16:37 +00:00
Robert Osfield
cb3d43a575 Added ply entry 2009-04-09 18:27:11 +00:00
Robert Osfield
9a42888bdc From Santosh Gaikwad, ply plugin, based on Equalizer and other LGPL compatible sources.
"Attached is the osg-plugin for reading ply ( Stanford Triangle Format )  file. I have written  the plugin according to OSG standard and  have also added cmake build system. The plugin is working fine on both Linux and Windows and should behave similarly on other OS as well."

"I developed this plugin while working on a project based on Equalizer. So VertexData which I am using is taken from equalizer and modified to make them work as separate OSG plugin.
Before contributing this plugin to OSG community, I asked project manager of Equalizer project Stefen regarding potential licensing issues and this is what he has said

"The kd-Tree (VertexBuffer*) is LGPL-licensed, and the base ply loader (ply*) is BSD. As long as you leave the copyright notices intact, there is no issue."

so I think using these files in OSG should not be a problem.

As far as author of ReaderWriterPLY.cpp  is concerned I am the author. I am working for Darshan3d which is a subsidiary of VizExperts thats why I have put VizExperts copyright."
2009-04-09 18:26:04 +00:00
Robert Osfield
4efd7a558d From Martin Beckett, "I have fixed up the 3DC reader to handle any field separator so it can read x,y,z files and added ability to write a 3DC file."
From Robert Osfield, refactor of the above code to retain a bit more of the original funcionality, and to avoid the need to hand maintained XCode projects from being updated.
2009-04-09 16:31:31 +00:00
Robert Osfield
68d80873a0 Updated wrappers 2009-04-09 15:55:18 +00:00
Robert Osfield
7bfca5e760 From Stephan Huber, "attached you'll find a small fix for PixelBufferCarbon preventing it to
be compiled for 64bit. This is the easiest solution for the old
deprecated xcode project."
2009-04-09 15:34:06 +00:00
Robert Osfield
3a5509b2f9 Converted tabs to four spaces 2009-04-09 15:33:28 +00:00
Robert Osfield
4d2e1d6594 From Paul Martz, typo fix 2009-04-09 14:41:11 +00:00
Robert Osfield
61a3977a4c From Jean-Sebastien Guay, "When creating a cylinder without a bottom or a top (in the traits, createBottom=false and createTop=false), the cylinder could still be picked by picking its (non-existent) bottom or top. This is because the PrimitiveShapeFunctor does not consider the traits when returning the cylinder's geometry for the picking test, and always returns geometry for the whole cylinder, with bottom, top and body.
I have attached a fixed file where the traits are checked in the PrimitiveShapeFunctor where appropriate. They are checked for Box, Cone Capsule and Cylinder. These just mirror the checks that were already done in the DrawShapeVisitor.

(another instance where if the ShapeDrawable had just been osg::Geometry, there wouldn't have been a problem... :-) )

I also fixed a small typo in the file in two places ("implementated" --> "implemented")."
2009-04-09 14:38:29 +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
ee4e2afa76 From Philip Lowman, clean up of CMake files 2009-04-09 09:23:45 +00:00
Robert Osfield
caee4f4d1b From Eric Sokolowsky, "
The osgViewer::CompositeViewer had partial support for Producer Camera
config files, but it was not working completely. Here is the completed
implementation. File: src/osgViewer/CompositeViewer.cpp.
"
2009-04-08 14:16:09 +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
Robert Osfield
b233174133 From Eric Sokolowsky,"libosgViewerd.so was not being built properly because it was being
linked with system libraries using LINK_INTERNAL instead of
LINK_EXTERNAL. This caused it to try to link with libXrandrd instead of
libXrandr, which failed. Attached is the fixed CMakeLists.txt."
2009-04-08 13:40:40 +00:00
Robert Osfield
fa27223fcd From Mike Connell, "Here are some small fixes that allow you to specify the allowable deviation when creating polylines from arcs and circles in DXF files. Changes are against 2.8.0
It adds two options:

Accuracy(x) - ensures the polyline will be within x units from the ideal arc/curve
ImproveAccuracyOnly - do not use the given accuracy 'x', if it would result in a worse curve than with the previous (2.8.0) implementation for a particular arc/curve.

As an added bonus there was a small bug in the existing implementation whereby the primitives were line strips but the vertices generated were actually suitable for GL_LINES, so the improved accuracy doesn't even have to come at a performance cost :-)"
2009-04-08 13:21:59 +00:00
Robert Osfield
69181e1697 From Eric Sokolowky, ""Running" was spelled "Ruinning", which is hardly the same." 2009-04-08 13:16:44 +00:00
Robert Osfield
8597636c93 From Marc Sciabica, made searching of the install path for plugins option, and added the dll path to the search path under Windows 2009-04-08 13:11:27 +00:00
Robert Osfield
beb711a2ec Reduced the default live video feed size to accomodate reading from the Minoru stereo wecam. 2009-04-08 13:03:34 +00:00
Robert Osfield
6e780bfa62 From Simon Carmody, "Patches for compare and copy of Programs and related state
-Added copying of shaders and attributes in osg::Program copy constructor.
-Changed StateSet::compare function to compare Uniforms and their
override values.  Previously it compared a RefUniformPair."
2009-04-08 12:32:52 +00:00
Robert Osfield
009ddf1b1e From Glenn Waldron, "Attached is a patch for osgUtil::Optimizer. If you run the SpatializeGroupsVisitor on a scene graph containing Geodes, StateSets attached to Geodes can be lost.
The problem is in SpatializeGroupsVisitor::divide(osg::Geode*, unsigned int) where the code creates a new Group and divides up the input Geode into one Geode per Drawable.

I fixed the problem by assigning the Geode's stateset to the new parent group.

To replicate the bug, see attached osg/dds files:

osgviewer b.osg -- model renders correctly
set OSG_OPTIMIZER="SPATIALIZE_GROUPS"
osgviewer b.osg -- textures are missing."
2009-04-08 10:48:22 +00:00
Robert Osfield
d2a0e7884d From Aric Aumann, added options for controlling the swap of the left/right handed coordinate system 2009-04-08 10:44:37 +00:00
Robert Osfield
6238a31d5c Added better handling of use of VBO's in compileGLObjects() 2009-04-07 10:13:54 +00:00
Robert Osfield
62886a7b94 Updated wrappers 2009-04-07 10:12:59 +00:00
Robert Osfield
cff4e3437a Added disabling of mipmapping for non power of two textures 2009-04-06 12:28:02 +00:00
Robert Osfield
9852c299d5 Added check against null colour layer to prevent a crash when a null colour layer is assigned 2009-04-06 11:22:31 +00:00
Robert Osfield
c27729a3bd Displayed display lists to prevent frame drops when compiling large geometry tiles 2009-04-03 10:47:59 +00:00
Robert Osfield
9f8ab41556 Added OSG_MULTI_SAMPLES env var for setting the default DisplaySettings NumMultiSamples value 2009-04-02 08:44:08 +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
36b3907d79 Added support for adding .ffmpeg to filenames to force selection of ffmpeg plugin 2009-03-24 23:25:30 +00:00
Robert Osfield
3c4fc747ff From Ulrich Hertlein, "I got the following type error from gcc 4.0.1 on OS X 10.5.6:
/Users/uli/Projects/osg/OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp: In member function \u2018int osgFFmpeg::FFmpegDecoderVideo::convert(AVPicture*, int, AVPicture*, int, int, int)\u2019:
/Users/uli/Projects/osg/OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp:245: error: invalid conversion from \u2018int\u2019 to \u2018PixelFormat\u2019
/Users/uli/Projects/osg/OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp:245: error:   initializing argument 3 of \u2018SwsContext* sws_getContext(int, int, PixelFormat, int, int, PixelFormat, int, SwsFilter*, SwsFilter*, double*)\u2019

It expects 'src_pix_fmt' and 'dst_pix_fmt' to be of type 'PixelFormat' rather than int. The attached cast fixes this (for me).

I've also added Matroska video to the list of supported extensions"
2009-03-24 11:08:40 +00:00
Robert Osfield
fb83a47d78 From Aric Aumann, fixed handling of null texture coordinates 2009-03-23 20:25:51 +00:00
Robert Osfield
73bf2a7de9 From Luc Frauciel, You'll find attached a modification in ive plugin for POLYGONSTIPPLE read/write. 2009-03-23 17:08:58 +00:00
Robert Osfield
9727321afe From Wang Rui, "Attached is a very small fix for the ffmpeg plugin, to build it without compiling errors on MSVC. The ffmpeg win32 pre-built tarball is downloaded at http://ffmpeg.arrozcru.org/builds/. Tested on Windows XP SP3 and Visual Studio 9, but don't know if it still workable for Unix and Mac users. :)
Please look at the .diff files for details. I have already enjoyed the latest Chinese *big* movie "Red Cliff" with the fixed ffmpeg plugin and osgmovie. :D"
2009-03-23 16:45:10 +00:00
Robert Osfield
1f251b4df5 From Csaba Halasz, "I have modified FltExportVisitor to use _MSC_VER instead of _WIN32 in
the condition around a #pragma warning that is specific to visual
studio as _WIN32 is also defined for mingw compile but the #pragma is
not applicable there."
2009-03-23 16:31:50 +00:00
Robert Osfield
e89deb0f79 From Csaba Halasz, "IIRC the C++ standard says members will be initialized in declaration
order, and not in the order they are listed in the constructor. To
avoid possible trouble, gcc warns about this. Attached modification
fixes the initializer order to silence this warning."
2009-03-23 16:28:48 +00:00
Robert Osfield
33cdeec757 From Michael Platings, "Changed some pointers to ref_ptr which fixed the leak
"
2009-03-23 16:25:37 +00:00
Robert Osfield
3dbda7e9bc From Csaba Halasz, "I have removed some unnecessary semicolons that mingw build warns about." 2009-03-23 16:21:51 +00:00
Robert Osfield
765b45224d From Eric Sokolowsky, "The attached Registry.cpp fixes OSG under OSX when a library suffix string is used, as is selected by default with cmake.
"
2009-03-23 16:15:55 +00:00
Robert Osfield
f34116fa36 From Michale Platings, "Minor change to include ReaderWriterDAE.h" 2009-03-23 16:13:42 +00:00
Robert Osfield
39cecd2a72 From Philip Lowman, "Here's the promised cleanup of the OSG's CMakeLists.txt files for the src/ folder. I'll submit the others separately.
Also, there was also a small bug in osgDB's CMakeLists.txt that was causing an error when I tested with CMake 2.4.4.

IF(${OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX} STREQUAL "quicktime")
was changed to
IF(OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX STREQUAL "quicktime")
"
2009-03-23 16:01:02 +00:00
Robert Osfield
51964a2b79 From David Callu, clean up of FindFFmpeg include paths 2009-03-23 15:48:19 +00:00
Robert Osfield
037f0ea5b3 Updated wrapper conf to avoid generating wrappers for PrintVisitor 2009-03-23 15:38:03 +00:00
Robert Osfield
77370910e2 Added ShaderGen wrapper 2009-03-23 15:10:36 +00:00
Robert Osfield
6b9cd89912 Removed PrintVisitor as it was causing problems with wrapper building. 2009-03-23 15:04:33 +00:00
Robert Osfield
3965bf8dd6 From Eric Sokolowsky, "osgviewer (and all other OSG-based utilities) fails to provide help for the OSG_NOTIFY_LEVEL environment variable. This submission fixes that problem." 2009-03-23 13:51:46 +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
ffbed2b222 UPdated wrappers 2009-03-19 11:36:54 +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
26b55acf68 Fixed spacing 2009-03-19 10:56:38 +00:00
Robert Osfield
3626979bfa Added compressed to list of supported options 2009-03-19 10:55:51 +00:00
Robert Osfield
32ace364a0 Added debug message (commented out for now.) 2009-03-19 10:55:29 +00:00
Robert Osfield
1b3b69721f Added osgTerrain::Terrain support to the .osg format 2009-03-19 10:27:24 +00:00
Robert Osfield
e9d4f99409 From Adrian Egli, build fix for Win32 FFmpeg 2009-03-14 15:40:41 +00:00
Robert Osfield
628990e0a4 From Stephan Huber, clean up of Quicktime plugin 2009-03-13 15:56:19 +00:00
Robert Osfield
a8aad71d03 Fixed for division by zero issue. 2009-03-13 11:01:11 +00:00
Robert Osfield
9a4e17b766 From Bryan Thrall, "The attached ReaderWriterGLSL.cpp conveniently sets the shader type when
the filename extension is "vert" or "frag" but still lets this be
overridden by the Options (for those crazy people who store their
fragment shaders in .vert files :) )."
2009-03-13 10:40:00 +00:00
Robert Osfield
f2fb93aeec From Frank Midgley, "I tried running osgconv --formats yesterday on OS X and got no results. Turns out the changes discussed in the "osgDB::listAllAvailablePlugins win32 fix" thread back in Sep '08 broke this. The OSG_PLUGIN_EXTENSION macro is being defined in src/osgDB/CMakeLists.txt from CMAKE_SHARED_LIBRARY_SUFFIX which is "dylib" on OS X. The problem is that all of the plug-ins are setup in OsgMacroUtils.cmake with:
ADD_LIBRARY(${TARGET_TARGETNAME} MODULE ${TARGET_SRC} ${TARGET_H})

which gives them .so extensions.  Since ".so" != ".dylib" osgDB::listAllAvailablePlugins finds no plug-ins.  I believe the correct solution is to use CMAKE_SHARED_MODULE_SUFFIX instead.  This builds and runs correctly on OS X but I have not tested on other platforms.

Attached is an updated src/osgDB/CMakeLists.txt based on rev 9915.  The change is at line 108.  To validate: build and then run bin/osgconv --formats.  You should get many screenfuls of plug-in features, extensions and options."
2009-03-12 17:54:58 +00:00
Robert Osfield
8194246ba3 From Konstantin Sinitsyn, "At this moment, I just introducing to OSG. When I reviewing optimizer code, I find a mistake in Optimizer::RemoveLoadedProxyNodesVisitor, as it seems. This optimizer removes proxy nodes that fully loaded and in some cases attach their childs to parrents directly (without creating of group). I dont understand how this works, because if proxy node doesn't have any attributes such as name, description, node mask and any callbacks, then new group does not created to hold proxy node childs. And code below trying to attach their children to all parents but seems like only first child beeing attached to all parents correctly.
"
2009-03-12 17:47:50 +00:00
Robert Osfield
f3ba8c8707 Introduced a releaseAllOperation after completeion of OperationThread::run() to enable CUDA integration (in osgCuda) to be able to free up its resources. Code drawn from a submission from Mick. 2009-03-12 17:26:21 +00:00
Robert Osfield
f6eae8dc3e Updated wrappers 2009-03-12 17:12:48 +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
7994ed1eb7 changed debug info to output to INFO instaed of NOTICE. 2009-03-11 17:39:08 +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
6791f65add From Neil Hughes, "I've spent the past four days playing with PNG files on 3DS objects, and I think I may have come across a small issue with the 3DS loader.
At the company where I work we model literally thousands of 3DS models for all types of objects. Most don't have transparent textures applied to them, but a few do. The issue is that a texture may have an alpha channel defined, yet its 3DS material definition is not marked as being an alpha source, or transparent. This can happen for any number of modelling reasons (so I'm told) but the net effect is that when a 3DS object is loaded with such a material applied, the stateset creation for the 3DS geometry omits to add the GL_BLEND attribute as neither of the conditions that it currently tests for are satisfied under this scenario.

However, one thing that is apparently an indication of transparency/alpha information that we do make use of when modelling, but that the 3DS reader omits to test, is that we assign to the transparent texture to the opacity_map of the 3DS material structure.

Now, having discussed with our modellers the theory behind the opacity map, it seems that it is safe to say that if an opacity map is specified, then the reader should really apply the GL_BLEND attribute as it is an indication of some form of blending being required between materials.

With this in mind, I have made a minor change to the function createStateSet below, from the ReaderWriter3DS.cpp file, that checks for an opacity map having been specified, and in such a scenario the GL_BLEND attribute is applied to the geometry. This fixed our issue, and thought it might be helpful to others."
2009-03-11 13:27:51 +00:00
Robert Osfield
d040b9f9d6 From Lionel Lagarde, "the attachment contains a correction of the Optimizer::MergeGeometryVisitor.
When 2 geometries are merged, the primitive sets of the second geometry
are copied to the first geometry.

The primitive sets were copied with a std::insert into the first geometry
primitive set vector. It doesn't work when the geometry is using VBOs (because
the element buffer object of the primitive set is not updated).

The correction replaces

lhs.getPrimitiveSetList().insert( lhs.getPrimitiveSetList().end(),
                                rhs.getPrimitiveSetList().begin(),
                                rhs.getPrimitiveSetList().end() );

by
 for( primItr=rhs.getPrimitiveSetList().begin();
   primItr!=rhs.getPrimitiveSetList().end();
   ++primItr )
{
  lhs.addPrimitiveSet(primItr->get());
}"
2009-03-11 12:08:24 +00:00
Robert Osfield
3e535d7456 Fixed crash due to Geometry::copyToAndOptimize(..) not handling cases where indices are present, but no arrays are assocaited with them. 2009-03-11 11:58:31 +00:00
Robert Osfield
c58ff9b656 From Lionel Lagarde, "The copy constructor of the nodes and the drawables do :
Node::Node(Node &node, copyop) :
  _stateSet(copyop(node.getStateSet()),

It doesn't call the setStateSet method of osg::Node (or osg::Drawable). So the parent
list of the state set is not updated with the new node (drawable)."
2009-03-11 11:00:24 +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
c3810e130b Converted tabs to four spaces 2009-03-11 10:34:29 +00:00
Robert Osfield
357d465d49 From Stephan Huber, "refactored the code and moved
some stuff out into DarwinUtils.h/.mm so both implementations can share
some of the code. There's even a bugfix for GraphicsWindowCarbon, which
fixes some issues with multiple windows on different screens."
2009-03-11 10:34:04 +00:00
Robert Osfield
529685c6b1 From Mathias Froehlich, "an other topic pointed out by some Microsoft verification tool:
On destruction of some static variables, the global referenced mutex is used
to lock access to the parent lists of state attributes, nodes and so on.
This even happens past the mutex is already destroyed.

This change to Referenced.cpp revision 9851 uses the same technique like the
DeleteHandlerPointer already in Referenced.cpp to return an zero pointer for
the global referenced lock if it is already destroyed."
2009-03-10 17:51:05 +00:00
Robert Osfield
5157f06bcd From Konstantin Matveyev, submitted by Valery Bickov:
"There is error in WoW shader, you can see it by this simple example:
osgviewer cessna.osg --wowvx-42 --clear-color 0,0,0

Clear color may be choosed any with at least one component equals to 0
or 1. In my case I see weird blinking between normal image and image
with depth map at right side on the screen."
2009-03-10 17:47:54 +00:00
Robert Osfield
9cccd087a8 From Martin Beckett, "Modified osgGA::TrackballManipulator so that osgGA::GUIEventAdapter::SCROLL performs a zoom.
Arbitrarily zooms 10% in/out for each click."

Note from Robert Osfield, flipped the orienation of the zoom to make the right mouse key zoom and the scroll wheel work in the same direction.
2009-03-10 17:39:46 +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
3ec2da76e8 quitened down debug info 2009-03-10 17:13:51 +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
9ddb8f65b6 Added copyright + fixed typo 2009-03-10 13:46:55 +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
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
e7c4cda108 From Eric Wing and Stephan Huber, ImageIO code originally wrote by Eric Wing, and then later conveted into an OSG plugin by Stephan Huber. 2009-03-10 10:30:34 +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
f4b7a5b274 Updated wrappers 2009-03-09 16:17:57 +00:00
Robert Osfield
173357252b Further work on IncrementalCompileOperation 2009-03-09 14:56:20 +00:00
Robert Osfield
73c2615d17 Fixed thread exit problems 2009-03-08 16:48:48 +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
fa14e7d5f2 Added quick proof of concept for live video streaming under linux 2009-03-05 10:57:54 +00:00
Robert Osfield
6fd4cd4933 Removed boost reference and cleaned up debug output 2009-03-04 16:03:28 +00:00
Robert Osfield
ab82553f97 Introduced double buffering of video stream to avoid tearing of image.
Removed swapBufers call and image y inversion.
2009-03-04 14:49:39 +00:00
Robert Osfield
df2964c315 Added handling of ImageStream Origin to make sure the movie always appears the correct way up. 2009-03-04 13:24:36 +00:00
Robert Osfield
ac8ee3792c Fixes to non swscale code path 2009-03-04 11:59:15 +00:00
Robert Osfield
d0dabd2665 Fixed img_convert usage 2009-03-04 11:46:34 +00:00
Robert Osfield
4ffef96874 Removed reference to OpenAL plugin 2009-03-04 11:06:34 +00:00
Robert Osfield
fb54fd0a69 Added support for using libswscale 2009-03-04 11:05:55 +00:00
Robert Osfield
ac49ca81ca Improved the clean up ordering 2009-03-03 20:49:46 +00:00
Robert Osfield
e035decd95 Introduce FFmpegAudioStream implementation 2009-03-03 16:51:01 +00:00
Robert Osfield
e0959ea804 Removed redudent export 2009-03-03 14:59:04 +00:00
Robert Osfield
8419ac6975 Added LINK_DIRECTORIES 2009-03-03 11:52:26 +00:00
Robert Osfield
79e65b48fe Fixed include list 2009-03-03 11:25:31 +00:00
Robert Osfield
8a8cee05c5 From Ulrich Hertlein, build fixes for OSX. 2009-03-03 10:53:26 +00:00
Robert Osfield
ae2e2c5075 Added ffmpeg to include search paths 2009-03-03 09:50:43 +00:00
Robert Osfield
439b240abc Added ogg to accepted formats 2009-03-03 09:49:53 +00:00
Robert Osfield
1a2e6aae8e Added extern for img_convert to get round disappeance of the declaration from headers. 2009-03-02 16:01:13 +00:00
Robert Osfield
48c8402c1c From Mathias Froehlich, "An other one:
The TLS Varialbe is accessed before it is initialized.
Attached is a change to rev 9791."
2009-03-02 10:49:29 +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
116655c7c5 Ported across from using boost pointers, and prepped for integration of audio interface into core OSG 2009-02-27 17:00:28 +00:00
Robert Osfield
eef4801ba7 From Roland Smeenk, "Attached is a small bug fix for the redundant messages that are created in OSG applications on windows. GraphicsWindowWin32::setCursor is called every frame from the WM_NCHITTEST message. This will result in a call to ::SetCursor(_currentCursor) every frame, which again causes a WM_MOUSEMOVE to occur. The fix exits GraphicsWindowWin32::setCursor if the requested cursor already is the current cursor.
"
2009-02-27 11:11:06 +00:00
Robert Osfield
898a313272 From Atr Tevs,
first email:
"in the current implementation of osgUtil::RenderStage::drawInner() method, there is some wrong assumptions made. The problem is, that whenever one does use multisampling functionality, the Blit operation (which suppose to copy the content of multisampled FBO into the usual one) doesn't perform well in some cases.

I've attached a corrected version of the RenderStage. It do just add one line, which enables the multisampled FBO as a readable just before the usual FBO is set as writable. With these corrections the Blit operation performs now correct and allows using of multisampled rendering results further."

second email:
"There was a problem when blitting the multisampled FBO with internal formats. The default internal format of color buffered multisample FBO was GL_RGBA. This has converted the color values whenever the FBO content was copied. I've added couple of lines, which do just enable the multisampled FBO internal format in respect to the attached color texture's internal format. This makes it possible to blit even float valued texture, so make HDR with multisampling possible ;)"
2009-02-27 10:47:33 +00:00
Robert Osfield
19ee0f011e Tweaks to handle more modern version of ffmpeg compiled form source. 2009-02-25 20:52:34 +00:00
Robert Osfield
1bad5770b6 Added Cmake support for new ffmpeg plugin 2009-02-25 16:05:12 +00:00
Robert Osfield
6680ee2b10 From Tanguy Fautre (Aris Technologies), ffmpeg plugin 2009-02-25 16:04:48 +00:00
Robert Osfield
4a0e9a6ad2 From Ralf Habacker & Robert Osfield, fixed handling of file name string of the form"PG:host=localhost user=postgres dbname=osm tables=public.planet_osm_line". The patch also routes gdal debug and error message to the related osg::notify debug port - this is usefull for debugging ogr plugin. 2009-02-23 09:54:25 +00:00
Robert Osfield
ca895c4ac6 From Bryan Thrall, "Attached files fix typos, from svn 9791:
DisplaySettings.cpp: OSG_COMPIlE_CONTEXTS -> OSG_COMPILE_CONTEXTS
AnimtkViewer.cpp: is a 3d poker game client -> is an example for viewing
osgAnimation animations"
2009-02-20 11:53:49 +00:00
Robert Osfield
ddddec2b2f From Martin Beckett, "I have added support for DXF POINTS to the dxf reader plugin
It's really just a cut-paste job from the existing LINE support.

The current dxf plugin architecture isn't very efficient, especially if you
are loading large point clouds (LIDAR)
eg. it makes multiple lookups of the layer name for each vertex.
I don't know if I can improve this for the general case or if I have to add a
special large point cloud dxf reader."
2009-02-20 11:51:47 +00:00
Robert Osfield
4a50d54d3e From Himar Carmona, "When reading a DXF file, the reader breaks at a debug assertion at vector (it breaks on release version). Inspecting the code show that the cause could be in dxfEntity.cpp.
It seems that the problem is an offending "short" used in a for loop, where it should be "int" or "long". It causes an index out of range error. "
2009-02-20 11:30:33 +00:00
Robert Osfield
3ede22216a From Bob Kuehne and Robert Osfield, email from Bob : "this fix quashes fbo warnings when the fbo status is 'complete', aka 'ok'.
", which was then ammended by Robert replacing crytic value 0x8CD5 with GL_FRAMEBUFFER_COMPLETE_EXT and added brackets to make code clearer.
2009-02-19 19:05:39 +00:00
Robert Osfield
e42c560223 Fixed bug in checking if numRead values. 2009-02-19 17:34:35 +00:00
Robert Osfield
296b859d37 From Tanguy Fautre, "This fixes the OSG crashes reported by http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2009-February/023499.html
It\u2019s a one line change against OSG 2.8.0 (see line 196). I\u2019ve already tested the change, and confirmed it\u2019s fixing the crashes described above."
2009-02-19 16:29:57 +00:00
Robert Osfield
e1b41a5e1c From Ruben Smelik, "I've found a (copy-paste?) error in PrimitiveSet.cpp regarding instanced drawing. For DrawElementsUInt and DrawElementsUShort the type argument of glDrawElementsInstanced was set as GL_BYTE instead of GL_UNSIGNED_INT and GL_UNSIGNED_SHORT. I've attached the fixed source file (based on the current SVN head version)." 2009-02-19 15:57:38 +00:00
Robert Osfield
055801d57c From Mattias Helsing, "Here is a fix for the "Unspecified" package. The openthreads pkgconfig
file is made part of libopenthreads-dev component.

Attached is the modded cmakelists.txt for src/OpenThreads/
"
2009-02-19 15:15:39 +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
957708b4be Updated wrappers 2009-02-11 20:02:45 +00:00
Robert Osfield
b4e0acc7b3 Updated wrappers to works with doxygen 1.5.8 output. 2009-02-11 19:55:11 +00:00
Robert Osfield
c385e11aff From Riccardo Corsi, "in attach you'll find a patch to cleanup a little bit the (de)initialization code of QuickTime environment from the quickTime pluging.
It basically removes the static init() and exit() functions,and move them inside the observer class (the one that cleans everything up when the last media is unloaded).

It also add an extra check to clean up on exit if the QuickTime env is initialized, but no media is succesfully loaded / written (it might happens with streaming resources).

I tested it under WinXP with zero, one and multiple videos.

Stephan reads in copy: could you kindly check if everything runs smooth under OSX as well? Also, have you got a chance to test it with streaming media?
"
2009-02-11 17:14:53 +00:00
Robert Osfield
04351b0af8 From Sukender, changed doxygen verbosity to quite 2009-02-11 13:33:40 +00:00
Robert Osfield
ed747fc789 Added brackets around (unsigned int) to avoid IRIX compile error. 2009-02-11 12:10:52 +00:00
Robert Osfield
c9b61a63b8 From Roland Smeenk, "Attached are two small fixes:
-I changed the SET of COLLADA_BOOST_INCLUDE_DIR to use findpath, so users may override this setting if they choose not to build against to precompiled boost libraries delivered with the Collada DOM.

-Changed daeRMaterials.cpp to prevent a compiler warning about a potentially uninitialized variable."
2009-02-11 09:14:12 +00:00
Robert Osfield
81043b1028 Merged warning fix from OSG-2.8 branch:
svn merge -r 9755:9756 http://www.openscenegraph.org/svn/osg/OpenSceneGraph/branches/OpenSceneGraph-2.8
2009-02-10 20:31:50 +00:00
Robert Osfield
92b4e6ea54 Changed notication level to INFO, merged changed from OSG-2.8 branch using:
svn merge -r 9751:9752 http://www.openscenegraph.org/svn/osg/OpenSceneGraph/branches/OpenSceneGraph-2.8
2009-02-10 20:09:18 +00:00
Robert Osfield
17da548343 From Roger James and Robert Osfield, fixes and reorganization to better support Windows dyanmic library build 2009-02-10 19:25:50 +00:00
Robert Osfield
a29b0a2f76 From Pierre Haritchabalet, "In IO_FluidProgram.cpp, FluidProgram_readLocalData() function is wrong. When density parameter is read, the function "setFluidViscosity()" is called instead of "setFluidDensity()".
This patch fixes osg plug'in FluidProgram_readLocalData. "
2009-02-10 18:56:53 +00:00