Commit Graph

2639 Commits

Author SHA1 Message Date
Robert Osfield
b4f3818949 Removed now redundent Font3D files 2010-09-03 09:10:27 +00:00
Robert Osfield
ba10f56f86 Refactored to use a typedef of Font to Font3D rather than have a separate Font3D class 2010-09-03 09:08:19 +00:00
Robert Osfield
8c3e3055e7 Refactored osgText::Font so that it now supports both 2D and 3D glyphs.
Added TextNode.h and TextNode.cpp to examples/osgtext3D in prep for introducing the new node to osgText library
2010-09-03 08:26:46 +00:00
Robert Osfield
fd1493e14b Added support for controlling the number of curves samples to generate on Glyph3D's. Set via Font3D::setNumberCurveSamples(num). 2010-08-25 11:06:10 +00:00
Michael PLATINGS
5b603191b3 From Donn Mielcarek:
The fbx plugin won't compile using gcc 4.3.2.  I made the following
minor changes:

1. WriterNodeVisitor.cpp needed limits.h added to the headers.

2. gcc does not allow structures to be defined inside of functions, so
  I moved the definition of PolygonRef out of the function to a global
  scope (right above the function readMesh).

  I also removed a bunch of embedded carriage returns
2010-08-17 13:25:46 +00:00
Robert Osfield
4d1df397e2 From Guillaume Taze, "Here are some bugs fix :
- missing copy attribute _referenceFrame in ClipNode in copy constructor
- checked iterators against the end in osgText
- close codec context in ffmpeg plugin to avoid memory leak

"
2010-08-16 15:02:04 +00:00
Robert Osfield
4e967ef3c3 From Maria Ten, "Importing 3ds files with a texture for the diffuse component and other one for opacity does not work with the osg 3ds plugin. In the attached file, there is a fix to solve this issue but it does not support textures without alpha channel in the opacity component (like black and white textures used in 3ds max to achieve the transparency). There is attached a test 3ds file too.
"
2010-08-16 14:54:16 +00:00
Robert Osfield
6849bb8e3b From Wang Rui, "Attachment is the implementation of the writing operation of the TGA
format. I wrote it just for one of my client. At present it only
outputs uncompressed RGBA images, but the OSG community can go deeper
at any time."
2010-08-16 14:39:53 +00:00
Robert Osfield
a1ad09bba9 Added material setName. 2010-08-16 14:24:12 +00:00
Robert Osfield
a171c88cf1 From Lukasz Izdebski, "Texture: added support for GL_EXT_texture_compression_rgtc, I added support (read and write ) for BC4 BC5 Block Compression to dds file format." 2010-08-16 14:11:49 +00:00
Robert Osfield
74a9ccb49d From David Fries, merge from a series of related submission emails:
"enable thread locking in libavcodec

This is required for a multithreaded application using ffmpeg from
another thread."

"Prevent the audio from videos from hanging on exit if they are paused.
The video decoder already has similar logic."

"Add a way to retrieve the creation time for MPEG-4 files."

"fmpeg, improve wait for close logic

Both audio and video destructors have been succesfully using the logic,
if(isRunning())
{
  m_exit = true;
  join();
}
since it was introduced,

but the close routines are using,
m_exit = true;
if(isRunning() && waitForThreadToExit)
{
  while(isRunning()) { OpenThreads::Thread::YieldCurrentThread(); }
}
which not only is it doing an unnecessary busy wait, but it doesn't
guaranteed that the other thread has terminated, just that it has
progressed far enough that OpenThreads has set the thread status as
not running.  Like the destructor set the m_exit after checking
isRunning() to avoid the race condition of not getting to join()
because the thread was running, but isRunning() returns false.

Now that FFmpeg*close is fixed, call it from the destructor as well
to have that code in only one location."
2010-08-09 17:02:31 +00:00
Robert Osfield
83d56b52b5 From Jan Peciva, "I am sending pov plugin for exporting scene to POV-Ray format.
POV-Ray is photorealistic ray tracer."
2010-07-31 10:33:20 +00:00
Robert Osfield
c06f34fe32 From Warren Macchi, "While tracing texture artifacts with the 2.9.8 dev release we
uncovered what looks like a type in the "src\osgPlugins\dae\
daeRMaterials.cpp" file. Line 1094 reads:

                   ^^^
 parameters.filter_min = getFilterMode(sampler->getMagfilter()->
    getValue(), false);

whereas it should read

                   ^^^
 parameters.filter_mag = getFilterMode(sampler->getMagfilter()->
    getValue(), false);
"
2010-07-31 10:18:41 +00:00
Robert Osfield
1379a91fc9 Fixed build 2010-07-31 09:21:50 +00:00
Robert Osfield
34e611a64c From Ryan Kawicki, "I found a memory leak within the Terrex plugin.
Out application has the ability to switch to different types of terrains on the fly.  This problem only exists in this type of situation.

The TXPArchive is held by the ReadWriterTXP class.  When the TXPNode, which is the top level node, is released from memory, the archive associated to that TXPNode is also released.  The issue is that the reference count on the TXPArchive never gets to zero.

The reason why the reference count never gets to zero is because the TXPParse, which is owned by the TXPArchive, stores a ref_ptr to the TXPArchive.  You can then see why this becomes a problem.  The TXPParser's ref_ptr cannot be unreferenced since the TXPArchive has not released the TXPParser.

Since the TXPParser is fully contained within the TXPArchive, I don't see the reason to have the TXPParser have a ref_ptr to the TXPArchive.  I've made this change locally and have had no problems and our memory leak has been fixed.
"
2010-07-31 09:04:18 +00:00
Robert Osfield
4e7d6cab81 From Ryan Kawicki, fixed indentation 2010-07-31 09:03:04 +00:00
Robert Osfield
de955d2ed8 From Wang Rui, fixes to handling of indentation. 2010-07-29 16:09:49 +00:00
Michael PLATINGS
90ec036c0e From Sukender: polygon tessellation 2010-07-21 17:34:28 +00:00
Robert Osfield
18ad93b7cd Fixed duplicate vertices in Font3D outline generation 2010-07-15 11:31:07 +00:00
Robert Osfield
777763bc55 Added raw primitive and vertex data into the osgText::Font3D and FreeTypePlugin to aid development of new 3D text functionality.
Added new test for original 3D text support and new experimental code for exploring approaches to new 3D text support.
2010-07-14 18:50:41 +00:00
Robert Osfield
42a2f2dcf9 Added skipping of newlines in AsciiStreamOperator.h 2010-06-28 09:52:18 +00:00
Robert Osfield
0816d4f9cd From Magnus Kessler, "FFmpeg headers need __STDC_CONSTANT_MACROS defined before stdint.h is loaded.
The file FFmpegHeaders.hpp sets this definition. However, if stdint.h is
already included through other files, it won't take any effect.

Include FFmpeg headers as early as possible in order to avoid stdint.h being
included on other paths.
"
2010-06-23 14:38:49 +00:00
Robert Osfield
98203252dc Build fixes for when OSG_USE_REF_PTR_IMPLICIT_OUTPUT is set to OFF 2010-06-18 09:07:17 +00:00
Robert Osfield
5c2abfe062 From Jim Vaughan, "The attached file fixes a bug in the Inventor loader that causes texture images to have r with a value of zero.
The bug caused the image data to not get copied, size the size was calculated to be zero.  This caused crashes during rendering."
2010-06-17 11:01:40 +00:00
Robert Osfield
d9bd6c977e From Michael Platings, "Hi Bob, thanks for the CMake fixes. I'm not sure what the purpose of the capitalisation changes was so I've reverted that (a) to make diff-ing easier and (b) because all-caps is consistent with all the other OSG CMake files. Aside from that the changes seem fine.
I don't understand the changes to ReaderWriterFBX.cpp - (i) strings.h isn't a standard header, (ii) the ISO-conformant form is _strnicmp (with the underscore). Does the existing code not compile for you? If not we'll have to do some #ifdef nastiness."
2010-06-15 09:14:20 +00:00
Michael PLATINGS
0c7a4fdedc Changed _strnicmp to strncasecmp for non-Windows builds 2010-06-15 09:09:38 +00:00
Robert Osfield
d58d417159 From Tan Dunning and Jan Peciva, Jan's email : "I created a new submission, based on Tan's two changes, including further naming functionality that includes:
- geode and geometry naming
- shaders and osg::Program name

as these nodes did not receive names before. Some code cleaning included as well."
2010-06-14 16:41:32 +00:00
Robert Osfield
8828d31c2e Removed debug messages 2010-06-09 15:05:34 +00:00
Robert Osfield
ae88d9467c Fixed reading of wrapped strings that contain multiple " within the string 2010-06-09 13:54:08 +00:00
Robert Osfield
9262015d11 Added missing loadWrappers 2010-06-09 11:24:22 +00:00
Michael PLATINGS
5ea4a8c0f3 From Alessandro Terenzi: previously the plugin ignored UV scaling values eventually stored in the FBX file, now they are read and set for each supported texture map (not considering reflection maps).
From Michael Platings: fixed UVs for files that don't explicitly reference the name of a UV channel.
2010-06-09 09:12:20 +00:00
Michael PLATINGS
82ea9597e5 Added support for Euler angles and step/linear/cubic-bezier interpolation. 2010-06-08 17:32:36 +00:00
Robert Osfield
b81b167131 Added ref_ptr<> to avoid memory leak 2010-06-08 11:53:28 +00:00
Michael PLATINGS
4e42d9e89a Added more NURBS types to triangulate. 2010-06-07 15:25:18 +00:00
Michael PLATINGS
359b6b480d From Alessandro Terenzi: modifications for supporting opacity, reflective and emissive maps beyond the already supported diffuse map in the FBX plugin.
A problem with transparency has also been fixed: objects were transparent wrt themselves but were opaque wrt to other objects.
Finally I added the support for "mixing factors" of diffuse, reflective and opacity textures/values.

From Michael Platings: added "LightmapTextures" plugin option that changes the way textures are interpreted so Alessandro's models appear correctly. Also refactored to put many functions in one class to avoid passing around too many arguments to functions.
2010-06-04 19:50:32 +00:00
Robert Osfield
634e55eee3 Fixed permissions 2010-06-03 16:02:01 +00:00
Robert Osfield
c05330089d From Mathias Froehlich, "While tracking some valgrind problems in flightgear, I found a remaining off by
one error in the rgb loader.

Previously we limited the current line to the image with + 1. With that change
it is correctly limited to the width of the image.
Also flightgear seems to run nice with that change.
"
2010-06-01 11:51:37 +00:00
Robert Osfield
6369210dc0 Converted osg::notify to OSG_INFO etc. 2010-05-28 17:17:09 +00:00
Robert Osfield
f0e499adfe Converted osg::notify to OSG_INFO etc. 2010-05-28 17:16:49 +00:00
Robert Osfield
3593bad3f3 Converted osg::notify to OSG_INFO etc. 2010-05-28 17:15:47 +00:00
Robert Osfield
02266d0af3 Converted osg::notify to OSG_INFO etc. 2010-05-28 17:14:58 +00:00
Robert Osfield
5d5b6c0e8e Converted osg::notify to OSG_INFO etc. 2010-05-28 17:14:29 +00:00
Robert Osfield
afa735d83a Converted osg::notify to OSG_INFO etc. 2010-05-28 17:14:11 +00:00
Robert Osfield
005b2cdb86 Converted osg::notify to OSG_INFO etc. 2010-05-28 17:13:41 +00:00
Robert Osfield
666f8edce0 Converted osg::notify to OSG_INFO etc. 2010-05-28 17:13:20 +00:00
Robert Osfield
d413714dd0 Converted osg::notify to OSG_INFO etc. 2010-05-28 17:12:55 +00:00
Robert Osfield
1f17cae284 Converted osg::notify to OSG_INFO etc. 2010-05-28 17:12:14 +00:00
Robert Osfield
959dfbf874 Converted osg::notify to OSG_INFO etc. 2010-05-28 17:11:35 +00:00
Robert Osfield
56ec2bbabf Converted osg::notify to OSG_INFO etc. 2010-05-28 17:11:14 +00:00
Robert Osfield
cb80a312e1 Converted osg::notify to OSG_INFO etc. 2010-05-28 17:10:57 +00:00
Robert Osfield
08e6d2e3c1 Converted osg::notify to OSG_INFO etc. 2010-05-28 17:10:27 +00:00
Robert Osfield
9a9b4d1d2c Converted osg::notify to OSG_INFO etc. 2010-05-28 17:10:06 +00:00
Robert Osfield
9cb35ad08a Converted osg::notify to OSG_INFO etc. 2010-05-28 17:09:36 +00:00
Robert Osfield
0ce9d11fba Converted osg::notify to OSG_INFO etc. 2010-05-28 17:09:15 +00:00
Robert Osfield
93a174bb26 Converted osg::notify to OSG_INFO etc. 2010-05-28 17:08:30 +00:00
Robert Osfield
72c9b2543e Converted osg::notify to OSG_INFO etc. 2010-05-28 17:08:10 +00:00
Robert Osfield
f90ca548ee Converted osg::notify to OSG_INFO etc. 2010-05-28 17:07:44 +00:00
Robert Osfield
c3d3a36af4 Converted osg::notify to OSG_INFO etc. 2010-05-28 17:07:24 +00:00
Robert Osfield
e16268ca76 Converted osg::notify to OSG_INFO etc. 2010-05-28 17:07:01 +00:00
Robert Osfield
480399fc28 Converted osg::notify to OSG_INFO etc. 2010-05-28 17:06:35 +00:00
Robert Osfield
f9dc2b9bdc Converted osg::notify to OSG_INFO etc. 2010-05-28 17:06:10 +00:00
Robert Osfield
e66ba6c64d Converted osg::notify to OSG_INFO etc. 2010-05-28 17:05:46 +00:00
Robert Osfield
1eab86a853 Converted osg::notify to OSG_INFO etc. 2010-05-28 16:54:45 +00:00
Robert Osfield
8c65ac1f18 Converted osg::notify to OSG_INFO etc. 2010-05-28 16:54:08 +00:00
Robert Osfield
c453d3ad93 Converted osg::notify to OSG_INFO etc. 2010-05-28 16:53:46 +00:00
Robert Osfield
e934dc80d0 Converted osg::notify to OSG_INFO etc. 2010-05-28 16:52:45 +00:00
Robert Osfield
8d1d543263 Converted osg::notify to OSG_INFO etc. 2010-05-28 16:51:18 +00:00
Robert Osfield
d4a00377b7 Converted osg::notify to OSG_INFO etc. 2010-05-28 16:50:45 +00:00
Robert Osfield
1853db4807 Converted osg::notify to OSG_INFO etc. 2010-05-28 16:50:29 +00:00
Robert Osfield
e2dfecfffc Converted osg::notify to OSG_INFO etc. 2010-05-28 16:49:45 +00:00
Robert Osfield
b9361a503f Converted osg::notify to OSG_INFO etc. 2010-05-28 16:49:23 +00:00
Robert Osfield
528e5eed45 Converted osg::notify to OSG_INFO etc. 2010-05-28 16:48:31 +00:00
Robert Osfield
5bf2b5cc90 Converted osg::notify to OSG_INFO etc. 2010-05-28 16:48:05 +00:00
Robert Osfield
c56b29b7fe Converted osg::notify to OSG_INFO etc. 2010-05-28 16:47:42 +00:00
Robert Osfield
37470070f2 Converted osg::notify to OSG_INFO etc. 2010-05-28 16:45:32 +00:00
Robert Osfield
f8a6978b1b Converted osg::notify to OSG_INFO etc. 2010-05-28 16:44:28 +00:00
Robert Osfield
006f639a52 Converted osg::notify to OSG_INFO etc. 2010-05-28 16:44:08 +00:00
Robert Osfield
1f249ddc13 Converted osg::notify to OSG_INFO etc. 2010-05-28 16:42:57 +00:00
Robert Osfield
18e4eb566a Converted osg::notify to OSG_INFO etc. 2010-05-28 16:42:24 +00:00
Robert Osfield
722bf6a18d Converted osg::notify to OSG_INFO etc. 2010-05-28 16:41:53 +00:00
Robert Osfield
abea896b20 Converted osg::notify to OSG_INFO etc. 2010-05-28 16:41:37 +00:00
Robert Osfield
9b9bde0d2a Converted osg::notify to OSG_INFO etc. 2010-05-28 16:39:42 +00:00
Robert Osfield
ecaa239288 Converted osg::notify to OSG_INFO etc. 2010-05-28 16:39:08 +00:00
Robert Osfield
bba4a1900d Converted osg::notify to OSG_INFO etc. 2010-05-28 16:38:19 +00:00
Robert Osfield
254556f7f1 Converted osg::notify to OSG_INFO etc. 2010-05-28 16:38:00 +00:00
Robert Osfield
04d7abed11 Converted osg::notify to OSG_INFO etc. 2010-05-28 16:37:40 +00:00
Robert Osfield
50465da06a Converted osg::notify to OSG_INFO etc. 2010-05-28 16:37:10 +00:00
Robert Osfield
58eef23ab5 Converted osg::notify to OSG_INFO etc. 2010-05-28 16:32:51 +00:00
Robert Osfield
6c8b561226 Converted osg::notify to OSG_INFO etc. 2010-05-28 16:32:06 +00:00
Robert Osfield
00b856501f Converted osg::notify to OSG_INFO etc. 2010-05-28 16:31:38 +00:00
Robert Osfield
35f0824f1e Converted osg::notify to OSG_INFO etc. 2010-05-28 16:31:17 +00:00
Robert Osfield
438c8e7dc4 Converted osg::notify to OSG_INFO etc. 2010-05-28 16:30:58 +00:00
Robert Osfield
50c577f602 Converted osg::notify to OSG_INFO etc. 2010-05-28 16:30:36 +00:00
Robert Osfield
0c212fefec Converted osg::notify to OSG_INFO etc. 2010-05-28 16:29:53 +00:00
Robert Osfield
fab6a14cb5 Converted osg::notify to OSG_INFO etc. 2010-05-28 16:28:58 +00:00
Robert Osfield
71c434371a Converted osg::notify to use info 2010-05-28 16:28:18 +00:00
Robert Osfield
805a78c3b5 Converted osg::notify to OSG_INFO 2010-05-28 16:27:37 +00:00
Robert Osfield
a7da775353 Converted osg::notify to OSG_INFO etc. 2010-05-28 16:27:02 +00:00
Robert Osfield
0fefe9a789 Converted osg::notify to OSG_INFO etc. 2010-05-28 16:26:24 +00:00
Robert Osfield
3db10859cd Converted osg::notify to OSG_INFO etc. 2010-05-28 16:25:41 +00:00
Robert Osfield
37dd1298f2 Converted osg::notify to OSG_INFO 2010-05-28 16:24:04 +00:00
Robert Osfield
eff8dc5d63 Converted osg::notify to OSG_INFO etc. 2010-05-28 16:22:02 +00:00
Robert Osfield
0165862701 From Wojciech Lewandowski, "Reading and Writing of Texture2DArrays for IVE format." 2010-05-21 09:56:59 +00:00
Robert Osfield
f5587bad3d Fixed typos in method names 2010-05-18 10:12:30 +00:00
Robert Osfield
4e8f0561ad From Farshid Lashkari, "I modified some plugins to use the osgDB file stream functions in order to support UTF-8 encoded filenames." 2010-05-13 11:01:06 +00:00
Robert Osfield
42527fe859 From Wang Rui, "I'd like to submit my inbuilt schema data support of
the OutputStream/InputStream implementations, which was just finished
last weekend with a few tests on Windows and Ubuntu. Hope it could
work and get more feedbacks soon.

I've added a new option "SchemaData" to the osg2 plugin. Developers
may test the new feature with the command line:

# osgconv cow.osg cow.osgb -O SchemaData

It will record all serializer properties used in the scene graph, at
the beginning of the generated file. And when osgviewer and user
applications is going to read the osgb file, the inbuilt data will be
automatically read and applied first, to keep backwards compatibility
partly. This will not affect osgb files generated with older versions.
"
2010-05-12 20:02:31 +00:00
Robert Osfield
cfd4c514cb Improved the indentation/replaced tabs 2010-05-12 11:58:01 +00:00
Robert Osfield
688323fbed From Sukender, "Here is a tiny fix about texture wrap mode not being written correctly in 3DS files." 2010-05-12 11:44:30 +00:00
Robert Osfield
68a1ed2dcf Fixes for building OSG with OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION set to OFF.
Fixed copy and paste error in Camera::getImplicitBufferAttachmentResolveMask().
2010-05-12 11:37:27 +00:00
Michael PLATINGS
e91557fe1d From Martins Innus: The current fbx writer doesn't seem to support BIND_PER_VERTEX for normals. If you have this type of geometry it, exports the the first normal in the array over the whole primitive set. I don't know that the attached change should be applied as is, since I don't know enough about DrawArrays and Draw Elements to know if the indices for the vertices and normals are guaranteed to be the same. I tried it on a couple models and that seemed to be the case. The alternative is to have the logic down in setControlPointAndNormalsAndUV and set the normals there with the "vertexIndex" if the binding type is per vertex. Not sure what is cleaner. 2010-05-12 08:54:22 +00:00
Michael PLATINGS
047b70c265 From Martins Innus: allow the fbx exporter to reference textures correctly if the stateset is applied to the Geode instead of Geometry 2010-05-11 17:02:18 +00:00
Michael PLATINGS
c51e94725b Fix from Martins Innus for error: extra qualification 'FbxMaterialToOsgStateSet::' on member 'FbxMaterialToOsgStateSet' 2010-05-11 09:08:55 +00:00
Robert Osfield
22dfe6f8d1 From John Ivar Haugland and Michael Platings,
JIV:"I deleted a line from the ReaderWriterDAE.cpp file that was introduced in rev 11341. I got a crash on this line when the options pointer was NULL."
MP:"Good spot John. The next line is also unnecessary and can be removed as well (attached, plus some minor code beautifying)"
2010-04-28 20:10:53 +00:00
Robert Osfield
b459fb4a25 Added support for passing in an options string to control the orientation of the generated graph 2010-04-28 18:52:58 +00:00
Robert Osfield
dbbe73304a Added support for using graphviz dot for graphics visualization via <graph>filename</graph> token. 2010-04-28 14:56:38 +00:00
Robert Osfield
4143f2f839 Fixed typo 2010-04-28 14:55:42 +00:00
Robert Osfield
b86431fdf7 Added colours and different style to drawable and statesets 2010-04-28 14:55:07 +00:00
Michael PLATINGS
324ddd0ca3 No longer removes redundant nodes because node structure may be important. 2010-04-28 14:05:47 +00:00
Robert Osfield
dfda4ce35f Replaced afprintf usage with std::string to fix memory leak and improve portability of code. 2010-04-28 10:15:16 +00:00
Robert Osfield
3bef6f9eae Implemented Colin MacDonald's recommended change of "unsigned short" to "unsigned" to solve big endian problem under Solaris.
Also added comment to highlight the oddity of the mixing of types in the associated lib3ds code.
2010-04-20 13:34:57 +00:00
Robert Osfield
2c64536a09 Replaced tabs with four spaces 2010-04-20 11:38:38 +00:00
Robert Osfield
31e8e37dbd From Jason Beverage, "Here is a fix to the curl plugin CMake to allow it to link against the
CURL_LIBRARY_DEBUG and ZLIB_LIBRARY_DEBUG.  Previously it linked the
debug version against the release libs, which was causing a hang when
running in debug mode on Windows."
2010-04-20 11:23:08 +00:00
Robert Osfield
a8c4fd8761 From Wang Rui, "The new osgShadow and osgFX serializers are attached, and some
modifications of the osgShadow header naming styles as well. The
osgDB::Serializer header is also changed to add new Vec2 serializer
macros because of the needs of osgShadow classes. It should compile
fine on both Windows and Linux. But I have only done a few tests to
generate .osgb, .osgt and .osgx formats with these new wrappers."
2010-04-20 10:29:04 +00:00
Robert Osfield
a0781cba6c From Mourad Boufarguine, "This submission fixes osgDAE::toString(*) unresolved external symbols compile errors (on VS)." 2010-04-20 09:48:45 +00:00
Robert Osfield
c091b5c2d1 From Stephan Huber and Mathieu Marache, "attached you'll find framework support for os x via cmake. Please credit
Mathieu Marache, he added the last missing piece to this puzzle.

I think it is safe to commit these changes to trunk, as the traditional
way via dylibs should work as before.

Here's some more info how to get frameworks:

With these modifications it is possible to compile frameworks on OS X,
when you set the Cmake-option OSG_COMPILE_FRAMEWORKS to true. If you
want to embed the frameworks in your app-bundle make sure to set
OSG_COMPILE_FRAMEWORKS_INSTALL_NAME_DIR accordingly.

You'll have to build the install-target of the generated xcode-projects
as this sets the install_name_dirs of the frameworks and plugins."
2010-04-19 13:44:42 +00:00
Robert Osfield
488eac94f7 From Wang Rui, "Attached is the osgAnimation wrappers for serialize IO operations. A
few headers and the osgAnimation sources are also modified to make
everything goes well, including:

A new REGISTER_OBJECT_WRAPPER2 macro to wrap classes like
Skeleton::UpdateSkeleton.
A bug fix in the Seralizer header which avoids setting default values
to objects.
Naming style fixes in osgAnimation headers and sources, also in the
deprecated dotosg wrappers.
A bug fix for the XML support, to write char values correctly.
A small change in the osg::Geometry wrapper to ignore the
InternalGeometry property, which is used by the MorphGeometry and
should not be set by user applications.

The avatar.osg, nathan.osg and robot.osg data files all work fine with
serializers, with some 'unsupported wrapper' warnings when converting.
I'm thinking of removing these warnings by disabling related property
serializers (ComputeBoundingBoxCallback and Drawable::UpdateCallback),
which are seldom recorded by users.

By the way, I still wonder how would we handle the C4121 problem,
discussed some days before. The /Zp compile option is set to 16 in the
attached cmake script file. And is there a better solution now?"
2010-04-19 10:35:18 +00:00
Robert Osfield
6ec106b31a From Paul Martz, fixes for static build 2010-04-19 09:39:39 +00:00
Robert Osfield
70d78c0713 From Colin McDonald, "The new 3ds plugin isn't working at all on big-endian machines, due to
a byte order issue.

The problem is that osg::SwapBytes code has been copied from the old
plugin to the new one, but the latest lib3ds also incorporates code to
handle byte ordering in read & writing.  So the net result is that the
swap is done twice.

The solution is simply to remove the custom osg code, and use the
stock lib3ds code.  The attached files are against today's revision
11331.  I've tested on Sparc & Intel.
"
2010-04-15 18:40:40 +00:00
Robert Osfield
51d377c9f6 Ran dos2unix on header files 2010-04-15 18:38:32 +00:00
Robert Osfield
6b73cef997 Ran dos2unix on lib3ds files 2010-04-15 18:38:03 +00:00
Robert Osfield
3700263e08 From Sukender, "After discussion with Paul Martz, here is a fix for 3DS reader/writer (on rev. 11315) + some changes. Changelog:
- Fixed handling of MatrixTransforms (still doesn't support other Transforms types). Fixes things for OSG, DeepExploration, 3DSMax...
- Added support for writing double precision vertices by converting them.
- Added base code for future compatibility option (3rd-party apps that don't read animation data). See "DISABLE_3DS_ANIMATION" compile flag."
2010-04-15 11:49:33 +00:00
Robert Osfield
72e6867679 Changed std::pair declaration to ListTriangle::value_type to avoid Solaris compile errors 2010-04-15 11:40:49 +00:00
Michael PLATINGS
d5fafcecbd Updated the plugin to be compatible with version 2011.2 of the FBX SDK 2010-04-14 16:43:50 +00:00
Michael PLATINGS
8e53cfe6fc Added support for double precision geometry 2010-04-13 14:50:31 +00:00
Michael PLATINGS
25cd2970c5 osgAnimation now stores times as doubles 2010-04-12 16:35:15 +00:00
Michael PLATINGS
5d64318597 From Sukender: Fixed FBX writer: now handles double precision arrays (vertices, normals, texcoords) 2010-04-12 15:04:25 +00:00
Robert Osfield
c6c26d5d44 Change Terrain so that it subclassed from CoordinateSystemNode.
Implemented new update scheme of GeometryTechnique to avoid potential threading issues.

Added Terrain support to .ive.
2010-04-03 16:21:34 +00:00
Robert Osfield
fe5527f332 From Mathias Froehlich, "I added some features to the vrml plugin.
The plugin can now handle embeded PixelTexture fields in addition to the
already implemented ImageTexture fields.

Fixed a bug with texture repeat being applied to the wrong texture dimension.

Added handling for IndexedLineSet geometries."
2010-03-25 14:19:01 +00:00
Robert Osfield
99b6b268bc From Michael Platings, "the attached files fix the DAE importer for animations that don't contain channels for all X, Y and Z components, as exported by SoftImage." 2010-03-22 17:55:14 +00:00
Robert Osfield
8a39ece376 From Chuck Seberino, "have a fix for the reading code in trunk/src/osgPlugins/gz/ReaderWriterGZ.cpp. It seems that the std::istream::readsome method on windows is a no-op (for files. After much head scratching and research I was able to figure out what was going on. I am submitting a fix to replace readsome with read() and gcount(). This change is for all platforms. The previous implementation works fine under linux and OSX, so if you would rather keep things the way they are you can just #ifdef for non-WIN32.
I also added openmode flags to the ifstream constructor, since they were needed to get proper reading as well as a typo fix."
2010-03-22 13:13:22 +00:00
Michael PLATINGS
03d5b81a6f Workaround for files exported from SoftImage that don't tag skeleton nodes correctly. 2010-03-19 20:12:19 +00:00
Michael PLATINGS
f053c6c567 From Paul Martz: This is a fix to get the FBX plugin to compile on OS X 2010-03-19 18:28:20 +00:00
Michael PLATINGS
328c19dad9 Fixed an infinite loop when loading a malformed file. 2010-03-19 10:19:41 +00:00
Michael PLATINGS
660cb74877 Workaround for models with inverted transparency 2010-03-18 19:02:12 +00:00
Robert Osfield
28105bacc1 From Glenn Waldron, "The PLY plugin only works for a file that includes both vertices and faces. This patch adds support for PLY files that include only vertices (a point cloud)." 2010-03-17 14:32:32 +00:00
Robert Osfield
d5aea9c0f2 Updated various serialization support for .osg, .osgt/b/x and .ive. 2010-03-16 18:44:27 +00:00
Robert Osfield
bc9b28a0c9 Added return into ReaderWriterOSG2::prepareReading(..) to prevent bug associated with result being discarded. 2010-03-14 08:56:21 +00:00
Robert Osfield
4dcf21d707 From Sukender, "I had some conflicts when updating but they seem resolved now. Attached files (four files) are against rev. 11200. Changelog:
- Replaced exceptions with assert() or OSG_NOTIFY
- Replaced osg::notify() with OSG_NOTIFY
- Changed braces and tabs to fit OSG coding convention
- Cleaned a few things in code (names, added deallocations upon error)"
2010-03-11 16:53:35 +00:00
Robert Osfield
dce80220e8 Cleaned up the registration of wrappers so that they are done on demand. 2010-03-11 10:24:20 +00:00
Robert Osfield
08612666fa From Roger James, "Here is a small stability fix to the dae reader which seems to have dropped out of the latest version." 2010-03-10 16:31:30 +00:00
Robert Osfield
e70c304533 From Sukender, "I've fixed positions for 3DS writer. Points in 3DS must be in world coordinates and I added what was missing.
And by refactoring a bit of code, I may have fixed some StateSets related bugs (was ignoring StateSets for osg::Groups).
I also added support for Billboard's points, so now "osgconv lz.osg lz.3ds" has an acceptable output. However, there is no rotation depending on billboards' axis, hence the notice "Warning: 3DS writer is incomplete for Billboards (rotation not implemented).". You may want to remove this notice (or lower the notify severity) if you feel 3DS doesn't have to handle such rotations.
The attached archive contains 3 files from 3DS plugin, against rev. 11162.

Please note there is still the textures issue for cow.osg. I guess it's because it's not a "flat, dummy and standard" texture in slot 0... That is to say the only thing the writer can handle at the moment. I guess I won't address this soon.
"
and

"I've detected and fixed another bug in 3DS writer: support for automatic splitting of meshes having >65k faces/points was buggy (was deleting faces).
Here is my four 3DS modified files (in a ZIP), against rev. 11193, including previous fixes AND Stephan's fix about relative filenames."
2010-03-10 16:05:52 +00:00
Robert Osfield
e082b01f26 From Wang Rui, "I've initially added the XML support of the new native osg format,
using osgDB::XmlParser. The extension for XML-formatted scenes is
.osgx, corresponding to .osgb for binary and .osgt for ascii. It could
either be rendered in osgviewer or edited by common web browsers and
xml editors because of a range of changes to fit the XML syntax. For
example, the recorded class names are slight modified, from
'osg::Geode' to 'osg--Geode'.

To quickly get an XML file:
# ./osgconv cow.osg cow.osgx

The StreamOperator header, InputStreram and OutputStream classes are
modified to be more portable for triple ascii/binary/XML formats. I
also fixed a bug in readImage()/writeImage() to share image objects if
needed.

The ReaderWriterOSG2 class now supports all three formats and
reading/writing scene objects (not nodes or images), thanks to
Torben's advice before.
"
2010-03-10 13:48:41 +00:00
Robert Osfield
6dc1ec6c4e From Stephan Huber, "attached you'll find a small bugfix for the 3ds-reader. It allows
reading files with relative paths again. (Hard to explain, easy to see
in the diff)"
2010-03-10 10:10:57 +00:00
Robert Osfield
4bc287cedb Added extra ffmpeg version check 2010-03-08 10:20:14 +00:00
Robert Osfield
8743e5d925 From Mathias Froehlich, "Not so long time ago, there was a complaint about the ac3d plugin not honoring
absolute filenames for the texture images.

The attached change should fix this by at first looking at the absolute file
name to load a texture and then, if that fails, strip away any paths to try
that again with the bare file name.
The change also fixes a possible exception that could be triggered by an out
of bounds std::string access which is now avoided by using functions from
osgDB/FileUtils.

The change is based on rev 11161."
2010-03-05 16:08:34 +00:00
Robert Osfield
84c0ecadd8 Fixed usage of osg::swapBytes to properly pass in pointer to data that needs swapping. 2010-03-05 16:04:30 +00:00
Robert Osfield
10a2f389d7 From Mathias Froehlich, "If you want to have that qfont plugin loader, this is the updated
implementation which uses osgQt and includes the changes to make fonts load
without a file on disk."
2010-03-05 15:46:17 +00:00
Robert Osfield
f497cd3c24 Fixed warnings 2010-03-05 15:04:36 +00:00
Robert Osfield
c40a4ff9cb Changed Options::setDatabasePath(..) usage to getDatabasePathList().push_front() to paths set by Options to be picked up. 2010-03-05 11:19:34 +00:00
Robert Osfield
e01832763d Fixed warning 2010-03-05 10:58:47 +00:00
Robert Osfield
d52910ff67 Fixed warning 2010-03-05 10:50:50 +00:00
Robert Osfield
7e56f2d258 Fixed warning 2010-03-05 10:48:34 +00:00
Michael PLATINGS
0f58cc2628 Added BlendFunc for transparent materials 2010-03-04 17:01:33 +00:00
Michael PLATINGS
65489693d9 Fix for some FBX files with multiple meshes bound to a bone. 2010-03-04 16:27:19 +00:00
Robert Osfield
ace8dad2c3 Fixed warnings 2010-03-04 13:03:18 +00:00
Robert Osfield
f1dd820a4e From Michael Platings, "Here are a couple more fixes on top of what you've already done." (in reply to fixes submission from Roland Smeenk). 2010-03-04 12:59:53 +00:00
Robert Osfield
225d99c5f1 From Roland Smeenk, "I took a quick look at the warnings and they contain nothing serious.
Attached you will find updates of the files to hopefully solve the warnings (in VS2005 only one warning occured). In addition I fixed a tiny bug that caused a crash with one of my test files."
2010-03-04 12:57:24 +00:00
Robert Osfield
5a47744e0d Removed old net plugin that is nolonger used. This plugin can be found in the deprecated/src/osgPlugins/net respository 2010-03-04 11:45:44 +00:00
Robert Osfield
7e5dd8ce17 Ran dos2unix of files to fix issues with file endings 2010-03-03 17:24:04 +00:00
Michael PLATINGS
fd6f3edf15 2010-03-03 16:14:04 +00:00
Michael PLATINGS
2609c4aa02 2010-03-02 18:18:06 +00:00
Robert Osfield
dbe854e9b0 From Raymon de Vries, "I've made a small change to DirectShowTexture.cpp: in the options for the directshow plugin it is possible to specify the capture device by number. For instance:
options->setPluginStringData("captureVideoDevice", "0");

Lines added in getDevice() are:
      int deviceId = atoi(name.c_str());
      if(deviceId >= 0 && deviceId < (int)_listDevice.size())
        return _listDevice[deviceId];

This makes it easy to use a capture device without knowing it's name. Attached is the whole file against rev 11044"
2010-02-26 15:01:00 +00:00
Robert Osfield
bbca791251 From Michael Platings, "Here's the all-new, all-dancing DAE plugin, with support for reading
osgAnimation. It's been tested with the majority of the samples in the
COLLADA test repository and works with all of them either as well as, or
better than, the version of the plugin currently in SVN.

Known issue: vertex animation (AKA morphing) doesn't work at present,
but that's a relatively unpopular method of animating so it's not high
on my priority list."

Follow up email:
"I've been informed that the previous DAE submission didn't build on
unix, so here's the submission again with the fixes.  Thanks to Gregory Potdevin and Benjamin Bozou.
Also, my apologies to Roland for not crediting his part in making DAE
animation happen, my work was indeed built on top of his work. Thanks
also to Marius Heise and of course Cedric Pinson."

Changes by Robert Osfield, fixed compile issues when compile without C* automatic conversion enabled in ref_ptr<>
and constructor initialization fixes to address some warnings under gcc.
2010-02-26 14:41:50 +00:00
Robert Osfield
eb23514478 From Sukender, "I tried a tiny change in is83() function and had no crash (under Windows). "osgconv cow.osg cow.3ds" exports a black cow and "osgconv lz.osg lz.3ds" exports tree(s) at (0,0,0)... I guess there are still things to do about non-zero-index textures and multiple instanciation of a node, but at least it doesn't crash." 2010-02-26 09:33:48 +00:00
Robert Osfield
2e154d5976 From Ryan Kawicki, "I guess I missed these during my testing, but if the database pager has outstanding requests while the application is shutting down, the archive can become invalidated through unsafe calls to ReaderWriterTXP::getArchive. I've made this function return a ref_ptr and change other locations to as needed to conform to the change. I've tested this and no more crashes.
Following files from revision 11057 have been attached."
2010-02-26 09:23:28 +00:00
Robert Osfield
8c4da68338 From Philip Lownman, "The libpng project decided to rename png_set_gray_1_2_4_to_8() to
png_set_expand_gray_1_2_4_to_8() with the 1.2.9 release.  This
submission fixes builds of the OSG against versions of libpng < 1.2.9
that don't have the new symbol available.  This affects platforms like
Red Hat Enterprise Linux 4 which come with libpng 1.2.7."
2010-02-26 08:55:50 +00:00
Robert Osfield
444361272f From Trajce Nikolov, "attached is some fix for the directshow plugin. Cleans up the build warnings as well makes the code a bit safer" 2010-02-25 18:01:25 +00:00
Robert Osfield
e3ad12c4f2 From Simon Buckley, "Attached is a small change to the file src\osgPlugins\dxf\dxfFile.cpp that allows the dxf reader to skip comments in a dxf file. I found with the existing version and a test file I had that the loader failed when comments were present. I made a very minor change to allow "999" comment codes to be skipped rather than causing load failure." 2010-02-25 17:13:15 +00:00
Michael PLATINGS
440bd7c3e3 2010-02-24 10:52:51 +00:00
Michael PLATINGS
6ec0e11b2a 2010-02-24 10:25:50 +00:00
Michael PLATINGS
4f72d66cbe 2010-02-24 10:12:11 +00:00
Michael PLATINGS
14ef0fa930 2010-02-24 10:02:14 +00:00
Robert Osfield
46f9e760ee Added include of osg/FrameBufferObject to fix GLES1/GLES2 build issue 2010-02-19 20:43:58 +00:00
Robert Osfield
9434b764a8 From Sukender, "- Added support for extended filenames (=not 8.3) for images: reads without crashing, optionnally write extended filenames (correctly truncate names if option is OFF). Write option is OFF by default.
- Improved identifiers generation in duplicate name handling (was limited to 1000 name collisions, which can be very short for some usages).
- Set all read/write operations use a custom log function that will redirect lib3DS log to osg::notify() (was only used for streams)
- Removed custom code (now uses osgDB::getFilePath())
- Added missing supportsOption() calls
- Cleaned a few minor things"
2010-02-11 11:56:43 +00:00
Robert Osfield
f17e401347 Convert NOTIFY to OSG_NOTIFY to avoid problems with polution of users apps with the NOTIFY macro 2010-02-10 12:44:59 +00:00
Robert Osfield
8d8037ee12 Converted osg::notify usage to NOTIFY 2010-02-09 18:24:37 +00:00
Robert Osfield
3a2cd32ea5 From Ryan Kawicki, added removal of TXPArchive from ReaderWriterTXP when the TXPNode destructs to fix memory consumption issue relating to leaving unused archives in memory. 2010-02-02 11:16:10 +00:00
Robert Osfield
2d91b15489 Fixed indentation. 2010-02-02 11:02:42 +00:00
Robert Osfield
a492e2b631 From Serge Lages, build fix 2010-02-01 10:04:56 +00:00
Robert Osfield
380fb17fa9 Build fixes for build without ref_ptr<> automatic type conversion 2010-01-31 18:24:01 +00:00
Robert Osfield
b2270e7f38 From Jan Peciva, "I am sending improved version of Inventor plugin. Attaching just
modified files, while GroupSoLOD.h and .cpp was deleted. Please, delete
it from repository, it is not used any longer and I doubt if it is
probably not used for anything meaningful for a while. In the new code,
there is no GroupSoLOD. Please, delete it.

I am using new plugin version for about 1.5 month so I consider it
stable by myself.

List of changes:
- rewritten Inventor state stack
- shaders support
- light attenuation support
- support for reading from stream (readNode(std::istream& fin, options))
- improved grouping node handling (SoSeparator, SoGroup,...)
- fixed transformation bug when two SoShapes/Drawables with different transformations are placed bellow one grouping node
- introduced preprocessing to handle more advanced usage schemes of SoLOD and SoSwitch nodes
- unused code clean up
- improved notify messages
- animation callbacks fixes
- FindInventor.cmake improved finding routines, support for Coin3 and Coin4"
2010-01-31 12:55:29 +00:00
Robert Osfield
a5f3d0c661 From Martin Lambers, "Fix static linking with EXR plugin on MinGW" 2010-01-28 10:59:00 +00:00
Robert Osfield
13531757c4 From Serge Lages, "Here is a fix for the Quicktime plugin, with the previous version, the size for some videos was not correct, using GetMovieBoundsRgn instead of GetMovieBox returns the real movie size.
"
2010-01-27 17:12:40 +00:00
Robert Osfield
0a9263d50e From Wang Rui, "Changes:
1. Rewrite the reading/writing exception handlers to work like the ive
plugin exceptions.
2. Write a header writing/checking function in ReaderWriterOSG2.cpp,
which may help decide if the stream is ascii or binary. The
readInputIterator() function will return null pointer if the input
file is nither osgb nor osgt format, which indicates that the old .osg
format could be used here, in case we've merged the two plugins
together.
3. Add a new ForceReadingImage option in the InputStream, which will
allocate an empty image object with the filename if specifed external
image file is missed. It may be useful for format converting in some
cases.
4. Add new osgParticle wrappers, as well as some modification to the
osgParticle headers, for instance, change isEnabled() to getEnabled().
5. Some fixes to the osg serialization wrappers."
2010-01-27 17:09:05 +00:00
Robert Osfield
db4d58b01d From Cedric Pinson, "Here a list of changes:
Bone now inherit from MatrixTransform. It simplify a lot the update of
Bone matrix. It helps to have the bone system more generic. eg it's now
possible to have animation data with precomputed bind matrix. The other
benefit, is now the collada plugin will be able to use osgAnimation to
display skinned mesh. Michael Plating did a great work to improve this
aspect, he is working on the collada plugin and should be able to submit
a new version soon.
The RigGeometry has been refactored so now it works when you save and
reload RigGeometry because the source is not touched anymore. The
benefit with this update is that it should be now possible to use a
MorphGeometry as source for a RigGeometry.

The bad news is that the format has changed, so i have rebuild osg-data
related to osgAnimation data, updated the blender exporter to export to
the new format.
The fbx plugin could be touched about this commit, i dont compile it so
i can't give more information about it.
The bvh plugin has been updated by Wang rui so this one is fixed with
the new code of osgAnimation.
The examples has been updated to work with the new code too...

The example osg-data/example.osg should be remove, it's an old example
that does not work.

For people using blender the blender exporter up to date is here:
http://hg.plopbyte.net/osgexport2/
it will be merge to http://hg.plopbyte.net/osgexport/ as soon as the
modification will be push in the trunk.
"
2010-01-27 12:24:55 +00:00
Robert Osfield
a520e8b6bd From Wang Rui, refactored the InputStream/OutputStream operations so that the binar/ascii foramts are implemented via subclasses. 2010-01-25 11:03:21 +00:00
Robert Osfield
16e48d1724 Reverted fixes for Mingw as they break OSX build 2010-01-22 16:13:28 +00:00
Robert Osfield
219696f1ee From Wang Rui, new native binary/ascii format infrastructure and wrappers.
From Robert Osfield, refactor of Wang Rui's original osg2 into 3 parts - parts placed into osgDB, the ReaderWriter placed into src/osg/Plugin/osg and wrappers into src/osgWrappers/serializers/osg
2010-01-20 20:13:33 +00:00
Robert Osfield
995398441e Refactored the old style .osg plugin support so that the DotOsgWrappers are placed in their own dedicated plugins found in src/osgWrappers/deprecated_osg 2010-01-19 12:26:37 +00:00
Robert Osfield
0f7c0de714 Added #include <stdio.h> for Mingw build 2010-01-18 16:39:12 +00:00
Robert Osfield
9f58a20e0b Restructure the includes of freetype 2010-01-18 16:38:07 +00:00
Robert Osfield
2a6719b7d8 From Jean-Sebastien Guay, build fixes for Mingw 2010-01-18 14:27:20 +00:00
Robert Osfield
6f3966038f From Serge Lages, "Here is a patch to allow setting an audio volume with the AudioSink interface, I've also modified the ffmpeg plugin code to implement the ImageStream's setVolume method with its AudioSink." 2010-01-18 12:43:02 +00:00
Robert Osfield
8f6db66e59 Added setting of the charcode during construction of osgText::Font::Glyph() 2010-01-14 15:15:42 +00:00
Robert Osfield
327406df69 Updated wrappers and supported shadow texture formats 2010-01-13 18:50:17 +00:00
Robert Osfield
1202b98acc Changed get methods to new style ones. 2010-01-13 13:30:45 +00:00
Robert Osfield
80846a1b71 Convert dos line endings 2010-01-12 11:12:06 +00:00
Robert Osfield
8bef9c57a3 Added missing .get() 2010-01-11 17:27:09 +00:00
Robert Osfield
1f56509430 From Sukender, introduced usage of ref_ptr<> and local scoped_array to address more robust memory management. 2010-01-11 16:09:18 +00:00
Robert Osfield
5288f380c6 Added desctructor with jas_cleanup(). 2010-01-11 16:03:13 +00:00
Robert Osfield
5dad3a0afb From Laurens Voerman,"the current ReaderWriterJP2 has all the code for writing jp2 files (jpeg 2000), but the writing fails on my windows machine (jasper-1.900.1) because the ID for the "jp2" extention is requested before the jas_init() call. (bug introduced in svn 7645 - 10 dec 2007)" 2010-01-11 14:28:33 +00:00
Robert Osfield
22a63fa5b7 From Sukender, "a small fix about using non 3-charcacters long file extensions (such as "jpeg", to be converted to "jpg")." 2010-01-11 14:04:55 +00:00
Robert Osfield
a31aa512d7 From Rob Radtke, "I recently ran into some issues trying to save/load a scene graph as a .ive file. The problems came about because the scene graph contained depth textures in it. I have attached a patch (against the current revision: 10919) that fixes the issues that I encountered. Both attachments contain the same patch--one is a .zip file that contains the modified files and the other is a text patch file. Here is a summary of the changes I made:
1) Add getShadowComparison() accessor function to osg::Texture class
2) Modify ReaderWriterTiff::writeTifStream() and _readColor() (in Image.cpp) to handle pixelFormat==GL_DEPTH_COMPONENT as if it were GL_LUMINANCE
3) Modify the Texture classes of the ive and osg plug-ins so that they save/load the following Texture members: _use_shadow_comparison, _shadow_compare_func and _shadow_texture_mode
"
2010-01-08 11:32:55 +00:00
Robert Osfield
73921435e0 From Sukender, "ReaderWriter3DS.cpp fixes:
- Fixed creation of useless intermediate nodes

WriterNodeVisitor.cpp fixes:
- Fixed naming of textures (path and extension)
"

Note from Robert Osfield, this submission also came with changes to use of ref_ptr<> and removal of delete[]'s, but these were not merged as they didn't actually fix any memory leaks, and in once instance introduced one.
2010-01-08 10:52:03 +00:00
Robert Osfield
5d9bf9f4d5 Added virtual pause() method into osg::AudioSink to support pausing of a movie thread and it's associated audio.
Updated osgmovie plugin to use the pause support.
2010-01-07 14:35:17 +00:00
Robert Osfield
3d4169689d From Serge Lages, "Here is a modified fix. It doesn't break the other patch for this plugin as they are for different files. I've only added the file formats handled by default with DirectShow (based on its Wikipedia page)." 2010-01-07 09:45:34 +00:00
Robert Osfield
79ba6dace4 Fixed indentation 2010-01-05 11:10:21 +00:00
Robert Osfield
6cd8a23570 From Lilith Bryant, "This patch fixes a regression (introduced in @ rev 9228), where simple .dae files, that have no material assignments, will cause a crash on load.
In particular, the case when the "instance_geometry" element has no "bind_material" sub-element.   This is valid, according to the official collada 1.4.1 specification."
2009-12-16 15:05:14 +00:00
Robert Osfield
9d82266032 From Julen Garcia, "So here is the code with a proper audio sync (at least in my computer)" 2009-12-15 11:27:28 +00:00
Robert Osfield
ce2459a539 Changed GL_BGRA_EXT to GL_BGRA and added include of include/osg/Image to make sure define is declared 2009-12-15 09:16:20 +00:00
Robert Osfield
cac4da38bf From Stephan Huber, " I am getting a warning that the class DataOutputStream has virtual
methods but no virtual d'tor, so I added the keyword virtual to the destructor."
2009-12-10 11:30:09 +00:00
Robert Osfield
db7528386f From Ulrich Hertlein, .osg support for osgFX::Outline 2009-12-09 10:18:13 +00:00
Robert Osfield
8c11e7be48 From Tatsuhiro Nishioka, "> The workaround/solution was to add a block of code at the end of the
> loader to un-premultiply the alpha (now in the codebase).

Applying the code brightens the semi-transparent portion, but the black edges are still there (same on both osgviewer and FlightGear).
Therefore I believe that the alpha channel is completely ignored (on png, gif, tiff, etc...). I tweaked and tweaked and finally got a workaround.

Please commit the enclosed file to fix these issues.

My workaround is a bit tricky (and some lines are even weird for me), but it resolves the black edges.
These workarounds also work on GIF, TIFF, TGA, and PSD as long as I've tested so far.

Please read this for more info on this issue:
http://macflightgear.sourceforge.net/home/development-notes/devnote-dec-02-2009
http://macflightgear.sourceforge.net/home/development-notes/devnote-dec-03-2009

I'm very happy if some of you guys find a better means of solving the black edges.

"
2009-12-04 17:25:23 +00:00
Robert Osfield
039455ef30 Converted tabs to four space 2009-12-04 17:24:27 +00:00
Robert Osfield
6773aca87a From Sukender,
"Here is our freshly baked 3DS reader/writer (named 'v0.5' to differentiate from previous one). Changes are against trunk rev. 10819.
Short changelog (from rev 10819):
- Added 3DS writer
- Sync'd with latest lib3DS
- Added options, especially "flattenMatrixTransforms" to get the "old" behaviour (else the reader correctly maps to OSG the transforms from the 3DS file).

What should be done:
- Check with pivot points, with and without "flattenMatrixTransforms" option.
- We ran tests on it, but we can never be 100% sure there is no bug. Testing from the community would of course be helpful."
2009-12-04 11:31:04 +00:00
Robert Osfield
8080f46444 From Julen Garcia,"I've been lately working also with the ffmpeg plugin and I implemented pause(), seek() and getReferenceTime(). I think that I have solved the internal clock issues (maybe not in the most elegant way :?" 2009-12-02 18:58:45 +00:00
Robert Osfield
11abf29c14 From Farshid Lashkari, "I had to make a few small changes to some cmake files to enable the OSG_MSVC_GENERATE_PLUGINS_AND_WRAPPERS_MANIFESTS option for Visual Studio 2008." 2009-12-02 14:58:47 +00:00
Robert Osfield
3a71cd80fa Attempted compile fix. 2009-11-27 18:14:27 +00:00
Robert Osfield
9b3e02f4e9 From Jason Daly, "The DDS reader test for DXT1 images with 1-bit alpha wasn't thorough enough. It performed the first check (color_0 <= color_1), but it didn't actually scan the texel block to see if the transparent color (0x03) was there. As a result, DXT1 files without any alpha were getting switched to RGBA format (instead of being left just RGB).
The attached code fixes this problem."
2009-11-27 15:48:57 +00:00
Robert Osfield
6ff21888f3 From Wang Rui, "I just successfully built the pdf plugin on Windows XP and MSVC and
fixed a small bug then:

ReaderWriterPDF.cpp, line 133, change:

std::string uri = std::string("file:") + foundFile;

to:

#if defined(WIN32) && !defined(__CYGWIN__)
           std::string uri = std::string("file:///") + foundFile;
#else
           std::string uri = std::string("file:") + foundFile;
#endif


That's because glib accepts "file:///C:\\data\\file.pdf" as URIs on
Windows, as well as "file:/home/data/file.pdf" on Unix, but
"file:C:\\data\\file.pdf" is not recognized.

Now I could read my Chinese translation of OSGQSG with osgpdf. :P"
2009-11-27 15:35:57 +00:00
Robert Osfield
5d6ce1a25f From Cory Riddell, "Small edit to ReaderWriterDOT.cpp. It wasn't checking the file extension
and so, if the .dot plugin was loaded, it would happily handle any file
name extension.

To reproduce the bug, first save a scene to a dot file (to load the dot
plugin), then try to write the scene to an osg file. If you look at the
osg file, you will see that it is a dot file."
2009-11-27 12:17:20 +00:00
Robert Osfield
b3abc0842f From Chris Hanson, " Add support for "OutputTextureFiles" option to IVE plugin to permit creation of external
.dds texture files from internally-embedded textures during IVE writes."

From Robert Osfield, fixed a bug in the above submission, and changed the way that the filename of the file is passed into DataOutputStream to avoid issues with the .ive's plugins ability to read from istreams.
2009-11-23 11:00:07 +00:00
Robert Osfield
3ef770a9ff From Rafa Gaitan, "Current ffmpeg plugin didn't support pause and seek, I have added this
functionality and I also modified osgmovie example to support "seek"."

Note from Robert Osfield, changes osgmovie to use '>' for the seek as '+' was already used in a separate submission that had been merged.
2009-11-20 14:31:11 +00:00
Robert Osfield
010411e535 From David Callu, "I have a Segfault with xine plugin, when I load a video, then delete the XineStreamImage,
then reload a video and finally delete the second XineStreamImage.

In src/osgPlugins/xine/video_out_rgb.c, many code is ASM code, and 'clear()' function is one of them.
If OSG is compiled without the flag COMPILE_ASSEMBLY (default behaviours) the clear() function is an empty
function and allocated memory is never initialized to 0. So a structure which contain pointer haven't its pointer set to NULL.
And when we need to delete this pointer, all go bad.

I join the fixed file."
2009-11-20 11:46:20 +00:00
Robert Osfield
d55f447188 From Colin McDonald, "Reading from a stream the 3ds plugin crashes if the options are null." 2009-11-20 11:43:53 +00:00
Robert Osfield
833e79a79a From Jeremy Moles, "Somehow, the SVG reader plugin has gone all this time without actually
being able to accurately provide the cool stuff that SVG is good for. :)
There is a one-line bug on line 68 in the
src/osgPlugins/svg/ReaderWriterSVG.cpp file where you can set the width
in the Options string, but not the height."
2009-11-20 10:56:54 +00:00
Robert Osfield
7552954ef3 From Cedric Pinson, "Here an update of the directshow plugin. It fixes issues with
synchronization, improve capture device support.

here how to use it to display a capture device:

osg::Options* options = new osg::Options;
options->setPluginStringData("captureWantedWidth", "800");
options->setPluginStringData("captureWantedHeight", "600");
options->setPluginStringData("captureWantedFps", "30");
options->setPluginStringData("captureVideoDevice", "USB Video Device" );
options->setPluginStringData("captureSoundDevice", "");
then
osgDB::readImageFile("capture.directshow", options)
you can use a graphedit application to list devices available in
directshow.


for classic avi file you just need to do a
osgDB::readImageFile("file.avi.directshow");
You will need of course to install the codec needed by directshow to
read the avi files.

I recommand this tool http://avicodec.duby.info/, that check which
video/sound codec is needed to play an avi file.


You can test it with the osgmovie example.
"
2009-11-20 10:48:51 +00:00
Robert Osfield
65d72d7873 Added #include <osg/MatrixTransform> 2009-11-20 09:05:06 +00:00
Robert Osfield
a1c2cc7b1b From Jan Ciger, removal of declaration of now undefined method. 2009-11-20 09:03:02 +00:00
Robert Osfield
d8ba406d99 From Nico Krulthof, remove double qualifier of ReaderWriterQT constructor/destructor. 2009-11-19 16:45:35 +00:00
Robert Osfield
6dc3f54786 From Jan Ciger, build fixes to work with OpenVRML 0.18.3.
Tweaks to this submission from Robert Osfield to fix missing elements in submission.
2009-11-19 16:06:30 +00:00
Robert Osfield
74f7ffcd32 From Ulrich Hertlein, "ttached are some tweaks to the Obj loader that allows a program supplied osgDB::Options object to be passed through the code. This allows for caching to be used with images.
The patched loader also complains more loudly if a material library file wasn't found or if a referenced material wasn't found in the material library."
2009-11-19 12:54:52 +00:00
Robert Osfield
2e11c49742 From Michael Platings, "This plugin adds support for the Autodesk FBX file format. It imports animations, including skeletal and morph animations, hence all my previous submissions to osgAnimation. The plugin won't build without the changes made in the "osgAnimation small additions" submission (14th August).
The plugin requires the FBX SDK to be installed, available from http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=6837478"
2009-11-19 11:44:44 +00:00
Robert Osfield
a3f141d4b5 From Lee Butler, "The attached ZIP file contains a modified OBJ file format reader which
makes smoothing optional for verticies which do not have a normal
associated with them in the OBJ input file.  The previous behavior was
to always smooth at all verticies which did not have surface normals.
In this new implementation smoothing is on by default to be compatible
with previous behavior.  The user can now specify the "generateFacetNormals"
option to the reader to use facet normals for verticies where the OBJ
file does not specify a normal."

Note from Robert Osfield, changed "noSmoothing" naming used by Lee to "generateFacetNormals".
2009-11-18 14:08:46 +00:00
Robert Osfield
b7cabac990 From Mathias Froechlich, "Attached the collected fixes I needed to compile with all of them.
Most notable the __hpux define stuff. The __hpux__ variant seems to be not
defined which resulted in a compile error at this time. Consequently I have
replaced all occurances of __hpux__ with __hpux. And huge surprise: now osg
plugins are found and loaded correctly ...
The next notable one is the MSVC_IDE fix which makes the nmake Makefiles cmake
generator target behave like the ide one. Showed up because I started to do
scripted builds with nmake instead of devenv...
The rest is the usual bunch of stuff that just happens during normal
coding ..."
2009-11-18 12:15:29 +00:00
Robert Osfield
370deba546 <iterator>, <stdlib.h> and <ctype.h> includes required for QNX compiler 2009-11-17 14:06:07 +00:00
Robert Osfield
79f766efab Added OSG_CPP_EXCEPTIONS_AVAILABLE cmake option to enable optional build of plugins and examples that required C++ exceptions 2009-11-17 12:55:52 +00:00
Robert Osfield
f417706b06 Converted .ive plugin from using C++ exceptions to using a local equivelant, enabling the build on embedded systems. 2009-11-17 12:54:55 +00:00
Robert Osfield
a8abfd64c4 Removed usage of throw 2009-11-17 11:36:32 +00:00
Robert Osfield
e5bdd460d4 Replaced catch usage 2009-11-16 16:09:50 +00:00