Commit Graph

2870 Commits

Author SHA1 Message Date
Robert Osfield
fac9992bca From Sukender, "- Lowered one notify level (it's now coherent with the "if" just above)" 2011-01-14 13:31:07 +00:00
Robert Osfield
a4f9c19440 From Sukender, "TIFF plugin now outputs messages coming from libtiff.
"
2011-01-14 12:03:37 +00:00
Robert Osfield
ad530c0fc7 From Sukender, "Small submission: - 3DS reader now takes care to not create Texture2D duplicates" 2011-01-14 11:49:55 +00:00
Robert Osfield
a1eabf18b5 Fixed for build with non autoatic ref_ptr<> to C pointer conversion 2011-01-14 11:46:43 +00:00
Robert Osfield
1b67e3ad1f Added ImageProcessor interface class and plugin mechnanism for ImageProcessor implementations to osgDB::Registry.
Add NVidiaTextureTools based plugin that provides an ImageProcessor implementation within an nvtt plugin.
2011-01-13 14:59:29 +00:00
Robert Osfield
f61a6aa4e7 Refactored the way that the DatabasePager passes the Terrain decorator node onto the TerrainTile.
The DatabasePager now passes the Terrain pointer into the ReaderWriter's via osgDB::Options object,
rather than pushing a NodePath containing the Terrain onto NodeVisitor.  This
change means that the DatabasePager nolonger needs to observer the whole NodePath and
will be lighter and quicker for it.

The change also means that ReadFileCallback can now run custom NodeVisitor's on the scene graph without
having to worry about TerrainTile's constructing scene graphs prior to the Terrain being assigned.

Also changed is the NodeVisitor::DatabaseRequestHandler which now requires a NodePath to the node that you wish
to add to rather than just the pointer to the node you wish to add to.  This is more robust when handling scenes
with multiple parental paths, whereas previously errors could have occurred due to the default of picking the first
available parental path.  This change means that subclasses of DatabasePager will need to be updated to use this new
function entry point.
2011-01-12 19:29:24 +00:00
Robert Osfield
534052f7cb From Sukender, "FBX plugin did not relay the osgDB::ReaderWriter::Options* when writing images (the writeImage() call). Now it does." 2011-01-11 17:29:47 +00:00
Robert Osfield
1f0a8aff32 Changed dos endings to unix line endings 2011-01-11 17:29:11 +00:00
Robert Osfield
88987d194a From Guy Volckaert, warning fixes 2011-01-11 16:18:49 +00:00
Robert Osfield
74cf034404 Unified more of the 2D and 3D text setup, fixed bugs in Text3D setup
which address the problems of black 3D text and the kerning causing problems with font positioning.
2011-01-11 11:39:31 +00:00
Robert Osfield
149200f0e9 Fixed warnings 2010-12-23 13:11:15 +00:00
Robert Osfield
410b4fd109 Converted FrameStamp::g/setFrameNumber from int to uint 2010-12-22 20:11:05 +00:00
Robert Osfield
c38a1eb56d Introduced a local reference to the appropriate EasyCurl object to avoid seperate getEasyCurl() incurring a mutex lock overhead. 2010-12-21 12:51:15 +00:00
Robert Osfield
fce0121d26 From Paul Martz, Fix for "in expGeometryRecords.cpp lines 813-820, we write the UV list data incorrectly. According to the FLT spec, the data should be grouped per-vertex, not per-layer.
We should have:
 UV for vertex 0, layer 1
 UV for vertex 0, layer 2
 UV for vertex 1, layer 1
 UV for vertex 1, layer 2
  ...etc...

Instead, we have this:
 UV for vertex 0, layer 1
 UV for vertex 1, layer 1
  ...etc...
 UV for vertex 0, layer 2
 UV for vertex 1, layer 2
  ...etc..."
2010-12-21 09:12:18 +00:00
Robert Osfield
716a00ec59 From Trajce Nikolov, Fixes to avoid cracks in older archives, tested with archives 2.0, 2.1, 2.2 . 2010-12-20 10:49:30 +00:00
Robert Osfield
758bf7c3d9 From Trajce Nicklov, "I went thru the TileMapper today very carefuly and I remove all the tileStack approach - it made everything simplier and I think more proper. Cleaned the code as well. It was tested on huge archive with many lods as well with variable lods. Fix attached." 2010-12-19 13:25:45 +00:00
Robert Osfield
d8e3225cd8 Fixed warnings 2010-12-17 11:46:42 +00:00
Robert Osfield
cc348f86cb Moved Performer and Inventor plugins into block protected to only compile when not using GLES. 2010-12-14 08:58:27 +00:00
Robert Osfield
bf6d45a531 Have moved gecko plugin to deprecated 2010-12-13 17:36:02 +00:00
Robert Osfield
c665fdc973 Form Richard Schmidt, "The following features were added:
* the glsl plugin now supports processing #includes. The file extension sets the shader type.

* the registry releases gl objects of the shared state manager
 "
2010-12-13 12:16:57 +00:00
Robert Osfield
c12b04368a From Trajce Nikolov, "attached is a fix for the txp loader (in TileMapper). The code was giving wrong parent tile ids using the stack - I implemented differnt approach for that" 2010-12-12 09:52:29 +00:00
Robert Osfield
244e751146 From David Fries, "The ffmpeg lockmanager was introduced in ffmpeg 52 30 1, but
later backported to 52 20 1, so add that to the version check
in ReaderWriterFFmpeg.cpp."
2010-12-12 09:40:16 +00:00
Robert Osfield
b4dad9bac3 From David Fries, "Avoid a terrapage crash with outstanding
requests to a removed archive file.  ReaderWriterTXP::getArchiveName
will create an archive if it doesn't exist.  This is causing a crash
if the terrain is removed and there are outstanding database requests
in the database pager.  The request will create a new archive, and as
the archive is newly create doesn't have the materials etc to support
the subtile that was just loaded.  To fix the problem getArchiveName
will only return existing archives.  createArchiveName was added to
create archives.
"
2010-12-12 09:37:14 +00:00
Robert Osfield
09ebb061c2 From Cedric Pinson, "Here a small fix about gdal plugin used to read dem file, if you dont
setup the log level to INFO it does not work. It's because of this line:
OSG_INFO << "   GetGeoTransform == "<<
dataset->GetGeoTransform(geoTransform)<<"

I have just put the function outside of an stream stuff, and it works.
It's possible we have other code like that in other plugins, I guess
it's a side effect of the MACRO stuff about notification."
2010-12-11 15:12:09 +00:00
Robert Osfield
c040b25699 Build fixes to keep up with changes in head inclusions/API in osgDB 2010-12-10 13:22:21 +00:00
Robert Osfield
0754a78ddb From Ulrich Hertlein, "Attached; here's a summary of the changes:
- CMakeLists.txt
-- don't look for GL when compiling for iOS (device or simulator), look for OGLES instead
-- use architecture i386 for simulator
-- removed iphoneos-version-min for simulator

- examples/osgviewerIPhone/CMakeLists.txt
-- added build dependencies for osgdb_osg, osgdb_freetype, osgdb_imageio
-- added framework QuartzCore link dependency

- src/osgDB/CMakeLists.txt
-- don't link against Carbon on iOS (device or simulator)

- src/osgPlugins/freetype/CMakeLists.txt
-- don't link against OpenGL on iOS device or simulator

- src/osgViewer/CMakeLists.txt
-- link against OpenGLES on iOS (device or simulator)

- src/osgPlugins/imageio/CMakeLists.txt
-- compile ReaderWriterImageIO_IOS.cpp as Objective-C++

"
2010-12-02 14:20:52 +00:00
Robert Osfield
65aee287e7 From Mathias Froehlich, "Attached are most of the fixes that are required to build osg on solaris and
hpux. I have skipped irix this time as irix is too dead to keep osg building
there.

As usual, solaris does not like member templates in stl containers.
Some headers missing and link problems due to missing libraries."
2010-12-02 14:13:54 +00:00
Robert Osfield
e9cd13f120 Fixed the readObject method so it could handle reading from a file contains any valid type of osg::Object 2010-11-30 14:36:37 +00:00
Robert Osfield
a7ff553925 From Stephan Huber, compile fix for iOS 2010-11-30 11:34:33 +00:00
Robert Osfield
b523cb15c1 From Tomas Holgarth and Stephan Huber, "
attached you'll find the second part of the IOS-submission. It contains

* GraphicsWindowIOS, which supports external and "retina" displays,
 multisample-buffers (for IOS > 4.0) and multi-touch-events
* an ios-specific implementation of the imageio-plugin
* an iphone-viewer example
* cMake support for creating a xcode-project
* an updated ReadMe-file describing the necessary steps to get a
 working xcode-project-file from CMake

Please credit Thomas Hogarth and Stephan Huber for these changes.

This brings the ios-support in line with the git-fork on github. It
needs some more testing and some more love, the cmake-process is still a
little complicated.

You'll need a special version of the freetype lib compiled for IOS,
there's one bundled in the OpenFrameworks-distribution, which can be used."

Notes, from Robert Osfield, modified CMakeLists.txt files so that the IOS specific paths are within IF(APPLE) blocks.
2010-11-26 18:19:28 +00:00
Robert Osfield
d8d47199f2 From Katharina Plugge, fix for regression in handling of multitexturing. 2010-11-26 17:37:42 +00:00
Robert Osfield
b9ae28d344 From Eduardo Poyart, OSG patch: made it read ancillary IndexedStrings into MultiSwitch 2010-11-26 17:35:06 +00:00
Robert Osfield
4820157fed From Martin Beck, "
recently we noticed a little mistake for 3DS files using instances of the same meshs: Every groupnode gets the same name instead of the (correct) instance name of the object. The fix only consists of two additional lines which check whether an instance_name is given for the object and then uses this one instead of the node name."
2010-11-26 12:44:53 +00:00
Robert Osfield
ca9771f7ba Fixed typo 2010-11-22 19:18:00 +00:00
Robert Osfield
0235448cd1 From Johan Nouvel, "I've attached ReaderWriterVRML2.h. It is the same as the previous one, I've just add supportsOption() calls." 2010-11-22 11:31:35 +00:00
Robert Osfield
9b70348ced Fixed typo of commercial 2010-11-22 11:22:03 +00:00
Robert Osfield
f103d02cf7 From Katherina Plugge, "if using multitexturing and converting osg files to OpenFlight texture coordinates get corrupted. The texture coordinates for slot 1 and following are not computed correctly (see thread http://forum.openscenegraph.org/viewtopic.php?t=6993).
The attached files solve the problem.
"
2010-11-19 18:26:02 +00:00
Robert Osfield
a5b83edc76 Added resetting of the freetype size when getting Glyph3D glyph's as otherwise use of 2D and 3D Text would cause incorrect text sizing. 2010-11-18 17:18:31 +00:00
Robert Osfield
4dd9de7f13 Fixed warnings 2010-11-12 11:04:53 +00:00
Robert Osfield
6cc7e109d3 Moved finding of RSVG, Poppler-glib and GtkGl out into their own Find*.cmake modules to enable easier specialization. 2010-11-11 16:51:46 +00:00
Robert Osfield
bda7ef8179 From Wang Rui, "I've finally completed the static build support for dotosg wrapper and
serialization libraries. My submission mainly includes:
1. Add two new macros USE_DOTOSGWRAPPER_LIBRARY and
USE_SERIALIZER_WRAPPER_LIBRARY. Applications using static OSG must
include corresponding static-link libraries and use these two macros
to predefine native format wrappers. Please see osgstaticviewer and
present3D in the attachment for details.

2. Add a LibraryWrapper.cpp file in each
osgWrappers/deprecated-dotosg/... and osgWrappers/serializers/...
subfolder, which calls all USE_...WRAPPERS macros inside. The
LibraryWrapper file is automatically generated by the
wrapper_includer.cpp (with some slight fixes), which is also attached
for your reference. The deprecated-dotosg/osgAnimation is not included
because it doesn't us REGISTER_DOTOSGWRAPPER to define its wrappers.

3. Modify the ReaderWriterOSG.cpp to prevent calling loadWrappers()
when static build.

4. An uncorrelated fix to Serializer and ObjectWrapper.cpp, which
ensures version variables of serialziers are initialized, and
serializers out-of-version are not written to model files.
"
2010-11-11 11:47:24 +00:00
Robert Osfield
a80c458285 From Mark Sciabica, "It's not Windows API calls that are causing the problem. It's a new
templated constructor of std::pair not being able to automatically
convert 0 to a pointer. Rather than use preprocessor checks and
#defines, I think a cleaner solution is to cast the std::pair arguments
to the appropriate types to help the compiler out. I attached an updated
version of the file implementing this."
2010-11-11 10:42:41 +00:00
Robert Osfield
ae27b4caaf From Wang Rui with small tweak from Robert Osfield, fix of memory leak in gif plugin when using GifImageStream 2010-11-09 15:48:46 +00:00
Robert Osfield
af22bd70db From Johan Nouvel, "Some times ago, I have coded an osg to vrml2 writer. Today, I have updated our writer to osg 2.9.9.
As it works (for our needs at least) I've done and attached a tar.gz file for the VRML2 plugin with a new part to write a VRML2 file from an osg one.

The read part is the same as in osg 2.9.9.

The write part code is in convertToVRML.cpp and .h  files. It works for some osg nodes (group, geode, matrixTransform, positionAttitudeTransform and geometry). Textures are converted to jpeg (if not translucent) or png (if translucent).
There are some options that could be given to the writer (with -O switch) :

convertTextures=0   to copy textures without converting them to jpeg or png
convertTextures=-1  do not copy textures, keep them in their original format and location
convertTextures=-2  do not use textures, parse only geometry
convertTextures=-3 (default) convert textures to jpeg or png ones.

textureUnit=X  in case of multiple textures, X= texture unit to use (default value=0)

directoryTexture=aPath  when texture will be copied, it will be in this directory, not in the current one."
2010-11-08 15:49:30 +00:00
Robert Osfield
5a0b2760b4 From Alexander Irion, "Please find another bugfix for the ReaderWriterGZ. This time, the writing did not work for me - the created output file could not be deflated by zip.
"
2010-11-05 17:09:58 +00:00
Robert Osfield
0f22d7bc3f From Ulrich Hertlein, "attached is a tiny cleanup for ReaderWriterFFmpeg that provides more accurate descriptions
for some extensions and also adds 'm2ts' for MPEG-2 transport streams.
"
2010-11-05 17:07:17 +00:00
Robert Osfield
95c7dc35d0 From Alaxandre Irion, "Trying to load the attached texture file "texture.dds.gz" fails and causes the following warning on the console:
ReadDDSFile warning: couldn't read mipmapData

The issue is caused, when the last block of data is read from the file (less than chunk size of 16384 bytes). The read operation in ReaderWriterGZ::read() then sets the eof and fail bit in the stream and the lines

if (fin.fail())
{
 (void)inflateEnd(&strm);
 return false;
}

causes the reading to be aborted with the last read data not beeing inflated.

Please find the attached fix for this problem."
2010-11-05 10:29:18 +00:00
Robert Osfield
1c6e33bc7e From Wang Rui, "Attached is a fix to the latest PVR plugin to make it compile under
MSVC. I've added definition to uint_32 and replaced std::max() with
osg::maximum(), because it is not supported by some VisualStudio
versions."
2010-11-05 09:12:28 +00:00
Robert Osfield
f7b33de6fc From Jason Beverage, "Here is a small change to the DirectShow plugin to support finding the
video and sound pins by type rather than searching for them by name
since the names of the pins can change based on what kind of file you
are opening.  This also removes the need for an explicit check to see
if the file is a .wmv file.

Also changes to the directshow plugin's CMakeLists.txt.
 It is not necessary to link against d3dx9 to build the plugin.
"
2010-11-04 13:53:31 +00:00
Robert Osfield
d2a9f48054 From Per Fahlberg, "I have added support for PowerVR texture compression. osg::Texture and osg::Image have been modified to support the texture formats and I have added a plugin to load pvr files. All modified files are in the attached zip. " 2010-11-04 11:02:37 +00:00
Robert Osfield
4ced7dffc4 From Wang Rui, "additional FFmpegParameters class in the ffmpeg plugin for setting parameters before opening the video file, which benefits from getPluginStringData() as shown in the ReaderWriter implementation.
Now we can use ffmpeg to render webcam video (using the vfwcap device) under Windows:

osgmovie 0 -e ffmpeg -O "format=vfwcap frame_rate=25"

The number 0 just indicates a default device number in ffmpeg.

I think this can work under Linux, too, and should be a bit better than comparing the filename with a '/dev/' string. Just type:

./osgmovie /dev/yourcam -e ffmpeg -O "format=video4linux2 frame_rate=30 size=320x240""
2010-11-03 10:37:32 +00:00
Robert Osfield
079b1c293e From Chuck Seberino, "Here is a minor fix for the vrml plugin when building with Visual Studio 2010. 2010 has updated STL/TR1 libraries that create a naming conflict with the current source. The fix is to remove the 'using boost::next' line and use the fully-qualified boost::next to get rid of the ambiguity. Here is the patch and attached changes." 2010-11-02 14:00:50 +00:00
Robert Osfield
170da45842 Fixed function name 2010-11-02 11:27:38 +00:00
Robert Osfield
7b0a500ffc From Sukender, fix for incorrect for loop test. 2010-11-01 17:02:48 +00:00
Robert Osfield
0328691f76 From Sherman Wilcox, "there's a bug in the cmake file for the tiff plugin. See
attached. The problem was that the output files were not properly
setting the debug/release libs due to this cmake bug. What occurred was
the release lib was set in all configurations."
2010-10-29 09:56:09 +00:00
Robert Osfield
ea98b1a9f8 Improved code style consistency 2010-10-28 14:01:10 +00:00
Robert Osfield
d23ce985a1 Introduced osg namespace to new local GLU functions 2010-10-07 11:53:28 +00:00
Robert Osfield
89f7726383 Copied libutil and libtess implementations in form Mesa 7.9/src/glu into the src/osg/glu,
changed extensions from .c to .cpp and got compiling as C files as part of the osg core library.

Updated and cleaned up the rest of the OSG to use the new internal GLU.
2010-10-06 14:44:52 +00:00
Robert Osfield
e5bc43f04c From Magnus Kessler, "After a closer look at this particular issue, I used some grep and sed magic
to fix all occurrences of "macro's" and "paramter".
"
2010-09-30 16:57:02 +00:00
Robert Osfield
17aaa4db94 From Craig Bosma, "Attached is an updated Image.cpp that fixes a very specific
compatability regression that was introduced almost 2 years ago in
r8834. The IVE version number was bumped to 32 because of the change
in binary layout, but the guard for reading/writing the new field was
checked against 31. Of course this only causes a problem (as for us)
when you've produced IVE files at version 31, which no longer load (or
crash) when loaded by newer OSG/IVE versions."
2010-09-30 16:31:22 +00:00
Robert Osfield
ff68236bad From Stephan Huber, fixed build under OSX 10.5. 2010-09-30 09:40:48 +00:00
Robert Osfield
ab1920c427 From Wang Rui, "I've fixed the problem that osgx format doesn't read the Font property and wrapped string correctly. The first problem happened because the matchString() made a mistake in comparing two strings with the same start but different size. The second just needs complete rewriting of writeWrappedString() and readWrappedString() in src/osgPlugins/osg/XmlStreamOperator.h
I also fixed a possible bug in osgDB::XmlParser that doesn't handle control characters (like &quot; to ") when reading node attributes, because the writeWrappedString() and readWrappedString() now depend heavily on control characters. An additional improvement is that osgx now supports comments."
2010-09-30 09:34:41 +00:00
Robert Osfield
e942cc770a Removed getScale() parameter from osgText::Font 2010-09-29 11:09:32 +00:00
Robert Osfield
f8b44c3b33 Added support for osgText::Style into osgText::Text3D.
Refactored Text3D implementation to use new GlyphGeometry class.
Implemented GlyphGeometry backend and cleaned up Glyph3D interface.
2010-09-27 16:18:20 +00:00
Robert Osfield
1224836664 From Eric Wing, QTKit plugin for reading movies under OSX using QTKit + CoreVideo 2010-09-24 12:59:37 +00:00
Robert Osfield
7e8ca5ccdf From Per Fahlberg, "imageio was not spelled correctly when registering the plugin, attached is a fixed version of ReaderWriterImageIO.cpp." 2010-09-20 16:04:22 +00:00
Robert Osfield
a8c8c70fb1 From Ulrich Hertlein, "attached is a fix that addresses these compiler warnings from the 64-bit OS X build:
/Users/uli/Projects/osg/OpenSceneGraph/src/osgPlugins/3ds/WriterNodeVisitor.cpp: In
function ?std::string getFileName(const std::string&)?:
/Users/uli/Projects/osg/OpenSceneGraph/src/osgPlugins/3ds/WriterNodeVisitor.cpp:88:
warning: comparison is always false due to limited range of data type

/Users/uli/Projects/osg/OpenSceneGraph/src/osgPlugins/3ds/WriterNodeVisitor.cpp: In
function ?bool is83(const std::string&)?:
/Users/uli/Projects/osg/OpenSceneGraph/src/osgPlugins/3ds/WriterNodeVisitor.cpp:102:
warning: comparison is always false due to limited range of data type

/Users/uli/Projects/osg/OpenSceneGraph/src/osgPlugins/3ds/WriterNodeVisitor.cpp: In
function ?bool is3DSpath(const std::string&, bool)?:
/Users/uli/Projects/osg/OpenSceneGraph/src/osgPlugins/3ds/WriterNodeVisitor.cpp:118:
warning: comparison is always false due to limited range of data type
/Users/uli/Projects/osg/OpenSceneGraph/src/osgPlugins/3ds/WriterNodeVisitor.cpp:121:
warning: comparison is always true due to limited range of data type

The code was using 'unsigned int' in places where it should've used 'size_t' for correct
comparison with 'std::string::npos' (which is size_t).
"
2010-09-20 11:02:40 +00:00
Robert Osfield
4daad70d17 Build fixes for when OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION is disabled 2010-09-17 13:33:09 +00:00
Robert Osfield
d74ffd57aa From Magnus Kessler, "Changes to the quicktime plugin to remove unused variables and an unused
static function."
2010-09-16 13:04:55 +00:00
Robert Osfield
94c86d495c From Paul de Repentigny, Commented out section of code that didn't work properly 2010-09-15 13:24:37 +00:00
Robert Osfield
65e49cf9db From Laura Cerritelli, "I modified TXPPagedLOD::traverse to prevent the terrain from inappropriately unloading the higher level of detail tiles. It wasn?t updating the frame number of the tile or the range it was traversing, causing PagedLOD::removeExpiredChildren to always consider the range expired." 2010-09-15 11:36:45 +00:00
Robert Osfield
d6fe337728 Renamed file3ds and options member variables to _file3ds and _options to avoid confusion and keep the code consistent with the rest of the class/OSG.
Added _option parameter to writeImageFile(..) call.
2010-09-15 11:10:10 +00:00
Robert Osfield
d96e57c0c3 Added https, ftp and ftps to list of supported server protocols, and add ability for curl plugin to ignore the need for a server address when .curl extension is used. 2010-09-15 10:24:59 +00:00
Robert Osfield
687fd9362f From Jean-Sebastien Guay, "osgWidget::WindowManager did nothing in its keyUp event, and in particular didn't call any callbacks. Since I wanted to have callbacks on keyUp, I copied what it does on keyDown, which works for me. I could have just used keyDown and saved myself the trouble, but you know me... :-)
osgWidget::Input:

[Functional changes]
- Previously, the field would be filled with spaces up to its max length, and typing would just replace the spaces. Also, there was a _textLength variable that kept track of the real length of text in the field, since the osgText::Text's length just reflected the length of spaces+text entered. This was not great, as you could still select the spaces with the mouse and it just feels hacky. So I changed it to only contain the text entered, no spaces, and _textLength was removed since it's now redundant (the osgText::Text's length is used instead).
- Fixed the selection size which (visually only) showed one more character selected than what was really selected.
- Fixed selection by dragging the mouse, it would sometimes not select the last character of the string.
- Cursor will now accurately reflect whether insert mode is activated (block cursor) or we're in normal mode (line cursor) like in most editors.
- Implemented Ctrl-X (cut)
- Added a new clear() method that allows the field to be emptied correctly. Useful for a command line interface, for example (hint, hint).
- Mouse and keyboard event handler methods would always return false, which meant selecting with the mouse would also rotate the trackball, and typing an 's' would turn on stats.

[Code cleanup]
- Renamed the (local) _selectionMin and _selectionMax variables which are used in a lot of places, as the underscores would lead to think they were members. Either I called them selection{Min|Max} or delete{Min|Max} where it made more sense.
- Fixed some indenting which was at 3 spaces (inconsistently), I'm sure I didn't catch all the lines where this was the case though.
- Put spaces between variable, operator and value where missing, especially in for()s. Again I only did this where I made changes, there are probably others left.

The result is that delete, backspace, Ctrl-X, Ctrl-C, Ctrl-V, and typing behaviour should now be consistent with text editor conventions, whether insert mode is enabled or not. I hope. :-)

Note, there's a nasty const_cast in there. Why isn't osgText::Font::getGlyph() declared const?

Also, as a note, the current implementation of cut, copy and paste (in addition to being Windows only, yuck) gets and puts the data into an std::string, thus if the osgText::String in the field contains unicode characters I think it won't work correctly. Perhaps someone could implement a proper clipboard class that would be cross-platform and support osgText::String (more precisely other languages like Chinese) correctly? Cut, copy and paste are not critical to what I'm doing so I won't invest the time to do that, but I just thought I'd mention it.
"
2010-09-09 16:49:10 +00:00
Robert Osfield
2f14255dd7 From Joachim Pouderoux, "Please find attached a very small fix for the DXF reader. The bug made OSG
crash with some files.
Actually, itr was incremented into the loop and after the test with
nlist.end().
Then, the unreferencing of itr when nlist is equals to nlist.end() caused
the crash."
2010-09-09 10:17:55 +00:00
Robert Osfield
a5a7bcf165 From Joachim Pouderoux, "I have added the support for wkbMultiPolygon & wkbMultiPolygon25D in the OGR
plugin (it was mysteriously missing and no prevent warning messages was
print)."
2010-09-09 10:14:54 +00:00
Robert Osfield
fa94700e5c From Tassilo Glander, "I want to submit a fix for the plugin to load .x model files (Direct X).
The current version crashes when encountering global materials, as also reported in the forum by the author of the plugin.

The problem in mesh.cpp (app. ln 247) is, that references to global materials that are given in curly brackets {} are not supported by the reader. However, curly brackets seem to be common, according to Bourke. Unfortunately, I found no specification. However, also the DirectX model viewer that comes with the DirectX-SDK (August 2009) expects curly brackets and refuses models without them.

My fix checks 2 more cases ("{ aMaterial }" -> 3 tokens and "{aMaterial}" -> 1 token), and extracts the material name for the lookup. I don't know if this is the most elegant solution, but the tokenizer seems to split based on white spaces.

You can reproduce the bug with the attached model (box.x), which loads fine in other tools, such as 3DSmax, DeepExploration or the DirectX model viewer. When I remove the curly brackets at the reference of "myGlobalMaterial", it loads in osgviewer, but is not standard conform.
"
2010-09-09 10:09:31 +00:00
Robert Osfield
60942d8e72 Added version check for av_lockmgr_register support. 2010-09-09 09:05:33 +00:00
Robert Osfield
6f49d85f88 Cleaned up debug info, and changed Text3D across to using GL_NORMALIZE instead of GL_RESCALE_NORMAL. 2010-09-08 11:02:39 +00:00
Robert Osfield
50be800787 Moved TextNode into osgText.
Cleaned up freetype plugin so it no longer does tesselation - instead Glyph and TextNode do this.
2010-09-07 18:18:35 +00:00
Robert Osfield
a6abbb545e Further work on new 3D text support 2010-09-06 15:43:59 +00:00
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
Robert Osfield
95cf62ec01 Removed catch 2009-11-16 15:47:32 +00:00
Robert Osfield
72ff1f40f9 From Paul Martz, changes for compiling against OpenGL 3.x 2009-11-03 16:34:54 +00:00
Robert Osfield
93d83010f8 Added EGL support into build system for GLES1 + GLES2.
Added EGL support into GraphicsWindowX11.
2009-10-30 15:17:38 +00:00
Robert Osfield
d17d7159a1 Ported osgUtil, osgDB, osgGA, NodeKits and plugins to compile against OpenGL ES 1.1 and OpenGL ES 2.0. 2009-10-28 20:31:57 +00:00
Robert Osfield
2d38e187fd From Cedric Pinson, "Here a patch to be able to clone stateattribute, in order to do that i
moved the StateAttribute::Callback structure to a file
StateAttributeCallback with the same behavior as NodeCallback.
"
2009-10-22 10:33:16 +00:00
Robert Osfield
a601754450 From Chris Denham, "I discovered a memory leak in the ZIP plugin, which was caused by a missing call to CloseZip.
I attach a modified ReaderWriterZIP.cpp  (based on version 2.9.5 revision 10374).
This includes a little bit of code tidying, but the only functional change is a test of the return value of OpenZip and the addition of a call to CloseZip."
2009-10-10 10:00:13 +00:00
Robert Osfield
590aabb4fa From Stephane Lamoliatte, "Here is a patch wich add two missing GL modes in the osg plug'in." 2009-10-10 09:45:47 +00:00
Robert Osfield
10deffdc41 From Stephane Lamoliatte, "Here is a patch wich improves the support for geometry shaders in OpenSceneGraph.
It adds new PrimitiveSet constants for the specific geometry shader primitive types :
  - LINES_ADJACENCY
  - LINE_STRIP_ADJACENCY
  - TRIANGLES_ADJACENCY
  - TRIANGLE_STRIP_ADJACENCY
It also adds some missing features to the glsl reader plug'in.
"
2009-10-10 09:41:28 +00:00
Robert Osfield
61544f51b6 From Bob Kuehne, "imageio plugin fix, mac os x : remove double-qualified ctor - illegal syntax under gcc 4.2.1" 2009-10-10 09:23:03 +00:00
Robert Osfield
2d26cbe7ab Introduced optional build against the GLU library, using optional compile paths to enable/disable GLU related function.
To toggle the use of the GLU library adjust the OSG_GLU_AVAILABLE variable via ccmake . or CMakeSetup.
2009-10-07 19:42:32 +00:00
Robert Osfield
f75013d534 Introduced new BufferObject design + implementation in preperation of implementing a pool system for buffer objects 2009-10-01 20:19:42 +00:00
Robert Osfield
26925be4f4 Change win32 external library to wsock32.lib 2009-09-20 09:26:26 +00:00
Robert Osfield
c1d67b7e17 Added Ws2_32.lib to link of dicom plugin under Win32 2009-09-19 09:18:42 +00:00
Robert Osfield
16312a4aa0 Added tf-255 option to volume tag 2009-09-10 16:39:05 +00:00
Robert Osfield
251ec3c4f0 Added support for using the ImageDetails to fill in the Locator and TexelScale/Offset values in the ImageLayer 2009-09-09 13:31:32 +00:00
Robert Osfield
a851b0b412 Tweaked debugging info 2009-09-08 15:36:44 +00:00
Robert Osfield
b2a3d84d08 Added filter for .filename files 2009-09-07 12:51:00 +00:00
Robert Osfield
fa84f280f6 Renamed the osgVolume::Layer/ImageDetails parameters RescaleIntercept and RescaleSlope to more general TexelOffset and TexelScale, and changed type to Vec4.
Refactored the transfer function set up in RayTracedTechnique to prepare for new scale and offset uniforms.

Updated wrappers
2009-09-03 13:40:50 +00:00
Robert Osfield
43e3089417 Added support for recording the RescaleIntecept and RescaleSlope from the dicome files and passing these values onto osgVolume::ImageLayer 2009-09-01 10:48:32 +00:00
Robert Osfield
ca78f3a6bc Added support to .p3d format's volume tag for the properties:
region="xmin ymin zmin xmax ymax zmax"
   alpha="float_value"
   cutoff="float_value"
   sampleDenstiy="float_value"
2009-08-27 16:42:47 +00:00
Cedric Pinson
3c45fb1e6c From Michael Platings,
- Animations with equal priority are now weighted correctly relative to each other
- (minor) Channels no longer store their weight as the only time it's used is in update() when Animation can pass in the weight directly
From Cedric Pinson,
- I adjusted the quaternion blending to keep the commutativy property
2009-08-26 09:24:02 +00:00
Robert Osfield
60253d164d From Colin McDonald, "There is a duplicate class definition in the obj & dxf plugins trunk,
causing static builds to fail."
2009-08-20 15:20:55 +00:00
Robert Osfield
9f454c1714 From Colin McDonald, "The bsp & mdl plugins have calls to atof() without including the
associated <stdlib.h> header.  This breaks the build on my Solaris setup.

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

I've attached updates to the svn trunk, the fix is also appropriate for
the 2.8.* branch."
2009-08-20 14:59:29 +00:00
Robert Osfield
fe8822e496 Added check against a minimual video size of 10x10 to prevent problems with swscale reporting errors and crashing on small video dimensionsline, and those below, will be ignored--
M    ffmpeg/FFmpegImageStream.cpp
2009-08-20 14:59:00 +00:00
Robert Osfield
850ea3de9f Added support for trimming the contents of parsed Xml graph 2009-08-19 15:36:23 +00:00
Robert Osfield
c24e9330a0 Added support for selecting the TabBoxTrackballDragger using dragger="trackball-box" 2009-08-05 17:01:50 +00:00
Robert Osfield
93996e6133 Added support for volume tags with properties:
dragger="box" or dragger="trackball"

and

    technique="light" or technique="isosurface" or technique="iso" or technique="mip"

and

    tf="transferfunctionfile.tf"

i.e.

         <volume dragger="box">CardiacCT</volume>
         <volume tf="colour.tf">CardiacCT</volume>
         <volume technique="isosurface">CardiacCT</volume>
2009-08-05 14:37:56 +00:00
Cedric Pinson
d2af7efc61 From Cedric Pinson, Add UpdateMaterial callback to animate material\nUpdate LinkVisitor to traverse stateset\nUpdate ReaderWriter to read osgAnimation::UpdateMaterial Callback\nUpdate nathan.osg data file to demonstrate the MaterialAnimation 2009-08-03 09:48:12 +00:00
Robert Osfield
91f53369a3 From Terry Welsh, .osg and .ive support for new Text boxes 2009-07-28 06:00:03 +00:00
Robert Osfield
fcaec80dc9 Fixed bug in handling of stereo image pairs 2009-07-27 15:39:27 +00:00
Robert Osfield
6af1859bc4 From Jason Daly, "This set of changes reworks the BSP plugin to use TexEnvCombine instead of a GLSL program for doing the texture blending on displaced terrain geometry. After working with it a while, I found this method to be more scene graph friendly (at least until Wojtek gets his VirtualProgram scheme working ;-) )
Note that this technique will require ARB_texture_env_crossbar (or NV_texture_env_combine4), as it mixes two textures in the first texture unit, and just does the lighting in the second.  I doubt this will be a problem for any card that can already handle GLSL programs, though."
2009-07-24 15:09:37 +00:00
Robert Osfield
773ae51a45 From Chris Hanson, typo and comment clean ups 2009-07-24 14:45:44 +00:00
Robert Osfield
48a1934ca8 From J.P. Delport, "attached a modified jpeg plugin that allows writing of grayscale images." 2009-07-17 07:47:48 +00:00
Robert Osfield
484d8e328a From Fabien Lavignotte,"When exporting some models to OpenFlight, i found a crash if the texture
unit does not contain a TexEnv object.
Here's the small fix, just a test on the pointer."
2009-07-16 12:09:47 +00:00
Robert Osfield
c2c5a82b92 Fixed build. 2009-07-16 11:35:59 +00:00
Robert Osfield
7f1b0055bd Added .get() to fix build 2009-07-16 11:26:14 +00:00
Robert Osfield
9eb03d450d From Jason Daly, "These are some fixes to the mdl and bsp plugins to handle transparency and lighting better, plus a few other tweaks." 2009-07-16 11:21:02 +00:00
Robert Osfield
5496e91f87 Added the ability to turn off the external paging in of PagedLOD children. 2009-07-16 10:13:41 +00:00
Robert Osfield
137605eba8 Added support for using PagedLOD to managing loading of presentation preview and then the main presentation in the background paging thread 2009-07-16 10:12:33 +00:00
Robert Osfield
c491373698 Cleaned up indenting 2009-07-14 13:32:06 +00:00
Robert Osfield
adc68d79af Converted code to use osg::asciiToFloat() instead of relying upong the C libraries sscanf to read floats as the C library is locale sensitive. 2009-07-14 13:30:28 +00:00
Robert Osfield
65c8357f76 From Alexandre Amalric, "I'm using osg svn version 2.9.5 and I've apparently found a bug in osgPlugin logo.
When using more than one view logosCullCallback function is called without checking context ID from the cull visitor is equal to logo _contextID variable. It involves updating logo's viewport with different sizes.
So I made a fix well working, at least the way I use the plugin."

Note, from Robert Osfield, changed code to return true to signal culling of logo when being applied to a window that it wasn't assigned to.
2009-07-14 12:22:47 +00:00
Robert Osfield
cc37d7f439 Moved the getting of the ReaderWriter to do the actual model loading to later so that it only gets invoked when required. 2009-07-14 11:19:22 +00:00
Robert Osfield
424e892f99 Quietened down debug messages, and added early return when filename contains server address. 2009-07-14 11:18:11 +00:00
Robert Osfield
f9517fde6a Refactored the setup of the reading of the wrl file by allow reading from istreams, as well as nesting of filepaths using a local osgDB::Options to prevent threading issues.
Also fixed crash in parsing of the vrml data structures that occurred when no vrml material was assigned.
2009-07-14 10:37:31 +00:00
Robert Osfield
c690dfec50 Quitened down debug messages 2009-07-14 10:35:53 +00:00
Robert Osfield
148798137c Fixed the handling of compressed files 2009-07-14 10:04:18 +00:00
Robert Osfield
6e6a7c960e Added Dragger::s/getActivationModKeyMask(..) and Dragger::s/getActivationKeyEvent(...) methods to make it possible to have draggers that only respond when you press a specified modified key or standard key.
Changed the optional dragger in osgvolume to require the shift key to be pressed for the dragger to become active.
2009-07-03 19:16:53 +00:00
Robert Osfield
cb1b874167 From and incorported the addition from Paul Fotheringham, addition of define VCL_CAN_STATIC_CONST_INIT_FLOAT to be zero to solve build error under Linux
From Robert Osfield, general cleaned up ITK side to CMakeList.txt.
2009-07-03 19:07:02 +00:00
Robert Osfield
1d320d3ca1 To the ITK code path added support for handling a whole directory of dicom files. 2009-07-03 18:58:01 +00:00
Robert Osfield
2232bd5ee5 From Byran Thrall, "The OpenFlight plugin doesn't handle unrecognized options or extra
whitespace in all cases, causing it to crash."
2009-07-01 15:39:06 +00:00
Robert Osfield
8aaedda982 Changed the definition of HAVE_CONFIG_H so that it's only defined when on a now windows system, so to allow the dcmtk/osconfig.h to include the correct header on unix vs widows. 2009-06-26 16:52:27 +00:00
Robert Osfield
063bc6e513 Added search in /usr/local/dicom for dcmtk. 2009-06-26 16:39:44 +00:00
Robert Osfield
85456b1ac1 Fixed warning 2009-06-26 08:16:03 +00:00
Robert Osfield
06abd75198 From Mathias Froehlich, "We are currently getting issues with locale settings and some osg plugins.
Therefore I have changed all the occurances of atof by asciiToFloat or
asciiToDouble.

I believe that it is safe to do so at least for all the plugins.
Included here are also asciiToFloat conversion of environment variables. One
might argue that these should be locale dependent. But IMO these should be
set and interpreted by osg independent of the current locale.
"
2009-06-25 16:07:49 +00:00
Robert Osfield
d167142a59 Fixed warnings and refactored FindFFmpeg.cmake and ffmpeg plugin CMakeLists.txt scripts to better handle different instation combinations 2009-06-25 16:02:23 +00:00
Robert Osfield
d1eb4fd5de Converted tabs to spaces 2009-06-25 13:31:48 +00:00
Robert Osfield
c5c71f519c From Serge Lages, "Here is a little fix for the FFmpeg plugin. Previously the path computed by osgDB::findDataFile was not used, preventing loading files from directories inside the data path list." 2009-06-25 13:10:31 +00:00
Robert Osfield
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
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
Robert Osfield
76de3e6a02 Fixed swap size 2009-06-22 16:02:38 +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
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
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