Commit Graph

3021 Commits

Author SHA1 Message Date
Robert Osfield
8b231ba8e3 From Stephan Huber, added event sending support into osgGA::Device along with implementation on this into the osc plugin. Added osgoscdevice example to demonstate this in action. 2012-11-28 10:43:58 +00:00
Robert Osfield
694e603d15 Added support for <properties> tag for <presentation>, <slide> and <layer> scope to compliment the scope of <property_animation> 2012-11-27 16:00:43 +00:00
Robert Osfield
42529ca415 Added preliminary support for <property_animation> 2012-11-27 15:09:44 +00:00
Robert Osfield
a31d603f9a From Stephan Huber, "Attached you'll find a new ImageSequence.cpp which will fix an issue I had when moving the mouse cursor over the left window-border, as the index becomes negative. And I added a UdpSocket.cpp-file with more debuggin-output via some sprinkled printf-calls. " 2012-11-22 15:13:46 +00:00
Robert Osfield
1f50f23f86 Simplified CMakeLists and adjusted OscHostEndianness to automatically detect the endian at compile time 2012-11-22 11:55:38 +00:00
Robert Osfield
9ef448c7b1 From Stephan Huber, updates to explictly set the HOST Endian using Cmake 2012-11-22 11:47:03 +00:00
Robert Osfield
56bc0b14bc Added explict handling of osg::Image, osg::HeightField, osg::Shader and osg::Node when doing writes to the archive. 2012-11-22 09:49:24 +00:00
Robert Osfield
f0b3a47735 From Stephan Huber, further work on osc plugin 2012-11-21 15:19:58 +00:00
Robert Osfield
ea9e13a0c6 From Paul Martz, fix for Windows build 2012-11-20 18:41:30 +00:00
Robert Osfield
7e67ac7a34 From Stephan Huber, added missing windows dependency 2012-11-20 13:01:57 +00:00
Robert Osfield
f3e9967f47 Added ws2_32 library to Win32 build 2012-11-20 10:37:42 +00:00
Robert Osfield
e2ee774705 Frm Stephan Huber, osc plugin that supports send and recieving events via UDP packets. 2012-11-19 10:48:37 +00:00
Robert Osfield
057f8a8b3b Added support for <image blending="ON" or blending="OFF"> to allow user definition of when to enable OpenGL blending for an image or not. 2012-11-13 14:22:37 +00:00
Robert Osfield
0c02ef358f From Stephan Huber, fixed warning 2012-11-13 13:52:33 +00:00
Robert Osfield
933baf5db4 Changed COLOUR to COLOR to be consistent with OpenGL spelling 2012-11-13 13:32:01 +00:00
Robert Osfield
92975a01fd Moved colour space conversion of volumes from the osgvolume example into osg/ImageUtils and added support for colorSpaceConversion="MODULATE_ALPHA_BY_LUMINANCE","MODULATE_ALPHA_BY_COLOUR","REPLACE_ALPHA_WITH_LUMINANCE" and "REPLACE_RGB_WITH_LUMINANCE" to .p3d <volume> tag 2012-11-13 13:16:10 +00:00
Robert Osfield
ad1cec1b2e From Stephan Huber, introduced syncornization of osgGA::Device 2012-11-13 11:20:36 +00:00
Robert Osfield
ff476e9c15 Added support for naming slides and layers with slide_name and layer_name properties respectively.
Added support for creating events based on key presses using a <key_to_run> and <key_to_jump> tags.
2012-11-09 21:32:54 +00:00
Robert Osfield
1b871a822d Added support for <imagesequence interaction_mode="USE_MOUSE_Y_POSITION"> 2012-11-08 15:45:23 +00:00
Robert Osfield
014f13f774 Refactored ImageSequence to better handle random access usage. 2012-11-08 11:19:31 +00:00
Robert Osfield
4fa32ee0b8 From Stephan Huber, improved performance by using native apple functions for flipping image 2012-11-06 11:18:33 +00:00
Robert Osfield
f09b9576c6 From Stephan Huber, "Attached you'll find a fix for the image-io-plugin to handle out-of-memory situations more gracefully as before (don't crash)" 2012-11-05 17:22:34 +00:00
Robert Osfield
d7ce523529 From Stephan Huber, updated to debug output to RestHttpDevice and tweaks to ImageIO and QTKit plugins 2012-11-05 12:03:50 +00:00
Robert Osfield
a6f3e0af78 Added event and update callbacks to pass up changes to the mouse position to the ImageSequence::seek() to control which images is selected based on mouse x position 2012-10-31 16:07:23 +00:00
Robert Osfield
fa2fb07609 From Stephan Huber, RestHttpDevice plugin for support of remote application control via Rest http. 2012-10-30 12:31:27 +00:00
Robert Osfield
d879cd7715 Intial work towards support an interaction <imagesequence> tag in Present3D. 2012-10-29 15:58:02 +00:00
Robert Osfield
ce623c697e From Luc Frauciel, "Compile Fix - KTX plugin with Visual Studio, <stdint.h>not defined under MSVC" 2012-10-26 15:31:18 +00:00
Robert Osfield
f9fd4342ba From Stephan Huber, "attached you'll find the latest versions of the QTKit + the AVFoundation-plugin, some changes to osgPresentation and a small enhancement für ImageIO.
I fixed some bugs and did some more tests with both of the video-plugins. I integrated CoreVideo with osgPresentation, ImageStream has a new virtual method called createSuitableTexture which returns NULL for default implementations. Specialized implementations like the QTKit-plugin return a CoreVideo-texture. I refactored the code in SlideShowConstructor::createTexturedQuad to use a texture returned from ImageStream::createSuitableTexture.

I did not use osgDB::readObjectFile to get the texture-object, as a lot of image-related code in SlideShowConstructor had to be refactored to use a texture.  My changes are minimal and should not break existing code.

There's one minor issue with CoreVideo in general: As the implementation is asynchronous, there might be no texture available, when first showing the video the first frame. I am a bit unsure how to tackle this problem, any input on this is appreciated.

Back to the AVFoundation-plugin: the current implementation does not support CoreVideo as the QTKit-plugin supports it. There's no way to get decoded frames from AVFoundation stored on the GPU, which is kind of sad. I added some support for CoreVideo to transfer decoded frames back to the GPU, but in my testings the performance was worse than using the normal approach using glTexSubImage. This is why I disabled CoreVideo for AVFoundation. You can still request a CoreVideoTexture via readObjectFile, though.
"
2012-10-24 10:43:01 +00:00
Robert Osfield
1591fe09f3 Added osgGA::Device class for integration of both physical and virtual devices.
Added template readFile(..) function to make it more convinient to cast to a specific object type.

Added support for osgGA::Device to osgViewer.

Added sdl plugin to provides very basic joystick osgGA::Device integration.
2012-10-23 16:15:03 +00:00
Robert Osfield
7244e97850 From Aurelein Albert, "Under some Visual Studio configuration, I get compile error on "lib3ds_io.c" due to use of these kind of conversion :
b[1] = uint8_t((w & 0xFF00) >> 8);

I replaced it with :

    b[1] = (uint8_t)((w & 0xFF00) >> 8);

And it compiles fine
"
2012-10-08 15:10:56 +00:00
Robert Osfield
4235169d41 From Gill Peacegood, "In the attached file I have changed the colour space used for writing images to match the one used for reading images. Also this color space does not make subtle changes to the original colours which i think is probably what most people intend when writing an image and is more consistent with other plugins.
The effect is that an image that is written does not have a noticeably different colour when it is read back."
2012-10-08 12:00:53 +00:00
Robert Osfield
232bda3828 From Oren Fromberg, ""
--This line, and thosAttached is an update to ReaderWriterDAE.cpp/h and daeReader.cpp/h that implements

osgDB::ReaderWriter::ReadResult

ReaderWriterDAE::readNode (std::istream&, const osgDB::ReaderWriter::Options*)

This virtual function had never been implemented in ReaderWriterDAE. I implemented this function because the DAE plugin could not load files from other ReaderWriter derived objects that use protocol handlers.

I have updated function declarations in the header to have identical signatures with the base class declarations that include the default parameter.


readNode (std::istream&, …) is nearly identical to readNode(const std::string &, …) except it uses a new private function to convert the file from standard input:

bool daeReader::convert( std::istream& fin )

When this function is called fileURI is the string “from std::istream” to make the user aware where the file is coming from. Then instead of calling

_dae->open(fileURI)

we call

_dae->openFromMemory(fileURI, buffer.data())

Where buffer.data() is a pointer to the dae file text in memory.


Other changes include private functions to clear caches and to consolidate redundant code that appears between the two convert functions.


e below, will be ignored--

M    src/osgPlugins/dae/ReaderWriterDAE.cpp
M    src/osgPlugins/dae/daeReader.cpp
M    src/osgPlugins/dae/ReaderWriterDAE.h
M    src/osgPlugins/dae/daeReader.h
2012-10-08 11:54:40 +00:00
Robert Osfield
b742a9e71a From James Athey, "I've attached a new osgDB ReaderWriter that can read Khronos Texture Files
(KTX).  The KTX file format is straightforward and designed to be easy to
use in OpenGL.

http://www.khronos.org/opengles/sdk/tools/KTX/file_format_spec/
http://www.khronos.org/opengles/sdk/tools/KTX/

The attached plugin can read:

* 1D, 2D, and 3D textures
* uncompressed and compressed images
* mipmapped and non-mipmapped textures
* little-endian and big-endian files
* textures from files as well as seekable istream objects

It does not handle:

* array textures (not supported by the ReaderWriter API)
* cubemap textures (not supported by the ReaderWriter API)
* the "KTXorientation" key-value pair; support could be added later (see
the file format spec for more information)
* non-seekable istream objects (would require more complicated memory
management)
"
2012-10-08 11:10:25 +00:00
Robert Osfield
1796d55bea From Stephan Huber, OSX and iOS Video support via a QTKit plugin from OSX 10.7 and before, and an AVFoundation plugin for iOS and OSX10.8 and later. 2012-10-02 14:07:12 +00:00
Robert Osfield
0e8bcc9027 From Frederic Bouvier, "fix PNG write for images with bits per components different than 8 that was hard coded." 2012-09-24 10:10:28 +00:00
Robert Osfield
ea631c777d From Aurelien Albert, "In the DXF plugin, DXF layers are decoded and each layer is added in a separate group, which is very usefull to retrieve a layer or display a list of all layers in the aplication.
But the layers are not always children of the "model root" node : there can be a matrix transform between "model root" and "layers parent", so I've added the name "Layers" on the node which contains all layers to easily retrieve the layers groups from application code."
2012-09-20 14:06:01 +00:00
Robert Osfield
cfe36876d4 Converted sorting of directory contents across to use the new osgDB::FileNameComparator and osgDB::getSortedDirectoryContents() 2012-09-12 11:09:41 +00:00
Robert Osfield
0b778533c8 From Piotr Domagalski, "I've added reading of node names ('DEF' element) to the VRML reading plugin. The changes were based on trunk's version of the plugin." 2012-09-06 13:53:58 +00:00
Robert Osfield
46104008c7 From Piotr Domagalski, "I've rewritten some bits of the STL plugin in order to support ASCII STL files with multiple named solids (reading and writing). The names are also used as OSG nodes names.
- Also, a 'dontSaveNormals' was added. It allows to ignore normals when writing an STL file. For example, it is useful for me when writing an STL file for CFD simulations.

- Some comments and code formatting were improved (to be consistent with the formatting already used in the plugin).

- With 'separateFiles' option files are now named fooX.stl instead of foo.stlX

The changes have been tested on various STL, both ASCII and binary found on the net. The change was based on the trunk branch."

From Robert Osfield, changed assert in Piotr's code to a runtime check warning report.
2012-09-06 13:48:17 +00:00
Robert Osfield
e8c4a6785c From Andreas Ekstrand, The attached ESRIShape.cpp contains fixes for comparing calculated byte sizes with the content length from the record header. According to the ESRI Shape documentation (http://www.esri.com/library/whitepapers/pdfs/shapefile.pdf), the content length is specified in 16 bit words, which is why I have multiplied it by 2 when comparing to byte sizes. Note that the comparison in line 813 is made with a fix number of 16-bit words so it hasn't been changed.
This fixes problems with PolygonZ records where the previous code was reading past the end of the record since it thought it had M values even if it didn't. I suspect the problem that James McGlone had back in 2006 was the same but reversed, when he tried to simply comment out the check, which was a (correctly) refused submission.""
2012-09-05 10:24:10 +00:00
Robert Osfield
568aeef975 From Brad Christiansen, "fix for the NVTTImageProcessor. When the code was updated in revision 12912 a couple of typos where made. These cause a crash when compressing transparent images and mangled colours when compressing rgb images. " 2012-09-03 15:19:00 +00:00
Robert Osfield
2faeaf553b Added support for setting the <image> paging_mode property to PRE_LOAD_ALL_IMAGES, PAGE_AND_RETAIN_IMAGES or PAGE_AND_DICARD_IMAGE for osg::ImageStream,
with PAGE_AND_DICARD_IMAGE set as the default.
2012-06-11 19:54:07 +00:00
Robert Osfield
c39ee015d6 Added ImageStream support to <image> and <stereo_image> tags in .p3d 2012-06-08 10:26:23 +00:00
Robert Osfield
5d3cb4f754 Added osg::ImageSequence support into osgPresentation::SlideShowConstructor and the associated <image> tag in .p3d. 2012-06-08 04:18:28 +00:00
Robert Osfield
45c6ba0b73 From Mathias Froehlich,"Attached is a change to the ac3d model loader as of rev 11498, that uses
indexed draws instead of plain array draws to save some amount of main memory.
Draw performance does not change with the nvidia binary blob as well as with
the open source drivers."
2012-04-20 10:01:50 +00:00
Robert Osfield
18b5e2a9b8 From John Kaniarz, "Here's a patch to add new extensions for tessellation shaders to the GLSL
plugin." "I went with .tctrl and .teval for the shader extensions."
2012-04-20 09:53:41 +00:00
Robert Osfield
c3bfa67576 Fixed build with OSG_USE_REF_PTR_IMPLICIT_OUTPUT set to OFF. 2012-04-19 13:18:58 +00:00
Robert Osfield
6a40df7b7d Added check to avoid accessing pointer past the end of the string. 2012-03-30 10:10:27 +00:00
Robert Osfield
c0bd5cda99 From Magnus Kessler, typo and documentation fixes 2012-03-29 15:08:15 +00:00
Robert Osfield
ba2432ca45 From Cedric Pinson, "I Updated the ply plugin to support alpha color in files. Plus I updated it to use by default an alpha of 1.0 instead of 0 when no alpha is specified.
Last changes is to divide byte color by 255.0 instead of 256.0."
2012-03-29 14:58:00 +00:00
Robert Osfield
aab27e106c From David Callu, "Here an update of osg::Uniform :
- add non square matrix
- add double
- add all uniform type available in OpenGL 4.2
- backward compatibility for Matrixd to set/get an float uniform matrix
- update of IVE / Wrapper ReadWriter

implementation of AtomicCounterBuffer based on BufferIndexBinding

add example that use AtomicCounterBuffer and show rendering order of fragments,
original idea from geeks3d.com."
2012-03-29 09:43:12 +00:00
Robert Osfield
eb9f545d67 Fixed potential memory leak 2012-03-23 11:20:17 +00:00
Robert Osfield
1feea279a5 From Luc Frauciel, "I've encoutered a nasty group of dae which are incompatible with dae plugins (and probably collada schema ) in 4 different ways :
1)  they use direct link to texture

-> this is already handle by current plugin : OK

2)  they defined colors with only 3 color components

->  it leads to a crash when trying to acces to the fourth component
 I fixed that

3)  they contain empty primitive lists

-> reading is ok, but osgviewer crashes when trying to display the geometries
The reason is that osg assume that  DrawElementsare never empty (blunt acces to DrawElements.front() in PrimitiveSet.cpp)
I corrected this (on the plugin side), but I wonder :
Is it the responsability of plugins to create non empty DrawElements, or of osg core not to crash when they occur ?
If the responsability is on the osg core side, I can submit a patch to PrimitiveSet.cpp regarding that aspect.

4)  they use a material binding scheme not supported by the plugin

->I've implemented a mechanism to handle this binding scheme

You will also find in the patch an example of these evil dae and comments on the offending elements.
They seems to be produced by ComputaMaps (www.computamaps.com)
They load well in Google Earth
"
2012-03-23 11:16:01 +00:00
Robert Osfield
14a563dc9f Ran script to remove trailing spaces and tabs 2012-03-21 17:36:20 +00:00
Robert Osfield
f51bb8bc70 Replaced && with & to address error in handling bitmask 2012-03-20 11:18:45 +00:00
Robert Osfield
41863ecbb6 From Lukasz Izdebski, Added StencilTwoSided support to ive plugin 2012-03-19 09:49:41 +00:00
Robert Osfield
9c04527cbe Fixed the order of setting of CenterMode 2012-03-16 13:22:20 +00:00
Robert Osfield
51f3a02f73 From Luc Frauciel, "I've modified dxf writer :
- correction to writeFace : the fourth point was defined with an incorrect code (http://www.autodesk.com/techpubs/autocad/acad2000/dxf/3dface_dxf_06.htm)
- if no layer name was found, an empty string was used, with is incorrect according to dxf specifications and was rejected by Autodesk DWG TrueView
- the plugin was writting polygons and triangles as LINE, as if PolygonMode GL_LINE was active, and didn't use 3DFACE primitive.
   I changed this behaviour to write 3DFACE  as default, and LINE when  PolygonMode GL_LINE is active.
  when reading back the file with osg, the result is now consistent with the source

Tested with osg plugin, FME (Safe software), Autodesk DWG TrueView
"
2012-03-01 11:33:31 +00:00
Robert Osfield
ac2be18fbc From Luc Frauciel, "In 3ds plugin, asGeometry() is used on a drawable but the resulting pointer is not tested for nullity.
It leads to a crash when writing osgText::Text or Shapes"
2012-03-01 11:03:18 +00:00
Robert Osfield
9c5774defb Improved the handling of endian swap of osg::Array 2012-02-29 10:22:56 +00:00
Robert Osfield
7bcf5e3b36 From Glenn Waldron, "Attached are modifications to ZipArchive to make it safe for mutli-threaded access.
Here's a summary:

* Uses a separate ZIP file handle per thread
* Maintains a single shared (read-only) index, created the first time through
* Stress-tested with the DatabasePager using 24 threads under osgEarth

I also updated the member variables to use OSG's leading-underscore convention."
2012-02-29 10:22:18 +00:00
Robert Osfield
1a080dfa6a Added fin.imbue(std::locale::classic()); to avoid problems with parsing of .obj files 2012-02-27 09:50:47 +00:00
Robert Osfield
e8ac276451 Added s/getByteSwap to teh InputStreamOperator base class and use of this method in the InputStream::start(InputStreamOperator*) method to ensure the bytes are swapped consistently. 2012-02-24 21:07:02 +00:00
Robert Osfield
3ca30736b4 Added support for checking the possible endian reversal the OSG_HEADER_LOW and OSG_HEADER_HIGH when reading binary files written out from systems that have a different endian to the system reading it. 2012-02-24 11:43:35 +00:00
Robert Osfield
949c635d5d From Sergey Polischuk, "In and Out control points were computed incorrectly for some animation channels with cubic bezier interpolation" 2012-02-22 10:50:38 +00:00
Robert Osfield
da44e4f4b6 From Paul Martz, "The attached fixes a few issues that are present when ref_ptr implicit casting is disabled." 2012-02-21 17:20:58 +00:00
Robert Osfield
f56ab3a04e From Chris Denham, "ReaderWriter3DS smoothing group handling corrections" 2012-02-21 11:13:25 +00:00
Robert Osfield
aea4d1a261 Fixed warnings 2012-02-21 10:42:59 +00:00
Robert Osfield
ec89769e6b From Luc Frauciel, "When dae plugin is used with daeUseSequencedTextureUnitsoption, the transparency processing is done with the wrong texture unit
I've remplaced the unused parameter diffuseColorName by the diffuseTextureUnit effectively used."
2012-02-20 16:00:46 +00:00
Robert Osfield
b213f6030e From Alexander Sinditskiy, "Fix loading small monochrome bmp images" 2012-02-20 12:36:53 +00:00
Robert Osfield
2a97715239 From Riccardo Corsi, "please find attached a small patch for HDR plugin,
which simply set by default the internal pixel format to GL_RGB32F_ARB where appropriate.

In the current version there's a comment saying that the plugin set it to GL_RGB8 (even when reading from float) to support old graphics cards,
but the comment dates back to 2004...
What's more I believe that it's correct to expect a floating texture format if you're loading an hdr image.
It was quite troublesome for us to discover why our background image wasn't showing hdr data...

In case you accept the submission, I've removed the comment as it would be misleading to leave it there."
2012-02-20 12:12:43 +00:00
Robert Osfield
5a396c91e6 From Martin Lambers, "It adds a new ReaderWriter plugin for the GTA file format
(http://gta.nongnu.org). This allows to read and write floating point
image data. Unlike other formats, GTA also allows very good compression
ratios for floating point data. The compression method can be selected
with the COMPRESSION option of the plugin.
"
2012-02-17 16:45:49 +00:00
Robert Osfield
2f5e19447c Added usage of OSG_CPP_EXCEPTIONS_AVAILABLE for plugins that use std::exceptions. 2012-02-17 16:13:16 +00:00
Robert Osfield
2dbd24b52d From Martin von Gagern, "The xine osg plugin won't compile against xine-lib-1.2.0:
OpenSceneGraph-3.0.1/src/osgPlugins/xine/video_out_rgb.c:2772:25:
error: ?video_driver_class_t? has no member named ?get_identifier?
OpenSceneGraph-3.0.1/src/osgPlugins/xine/video_out_rgb.c:2773:25:
error: ?video_driver_class_t? has no member named ?get_description?

This has been reported on Gentoo: https://bugs.gentoo.org/397643
The relevant commit to the xine-lib repository is
http://anonscm.debian.org/hg/xine-lib/xine-lib-1.2/diff/806b590a4d38/src/xine-engine/video_out.h

This change addresses the issue. I'm sending the full modified file as
an attachment. It is based on the 3.0.1 release of OSG. I'll also paste
a diff below. You will find a colorized view in the Gentoo bugzilla.

The xine-lib API changed in the following way: the identifier and
description members are now "const char*" strings instead of "char*
(*)(video_driver_class_t*)" getter function. As the functions in the osg
plugin will always simply return a string literal, without accessing
their argument, it is safe to simply call them with a NULL argument and
use the returned string. This makes it easy to support both API
versions. When you drop support for older xine one day, you might want
to move the string literals to the assignment, getting rid of the
functions in the process.

The modified code compiles for me. I'm not sure how to test it, as I've
only got OSG around in order to build (and hopefully one day even use)
Flightgear.

I'm assigning my copyright in this change to the osg project leads.
"
2012-02-09 16:42:47 +00:00
Robert Osfield
359fc46757 From Colin McDonald, fix for Solaris build. 2012-02-09 14:40:07 +00:00
Robert Osfield
89cf88f2a9 From Chris Denham, "This is a submission to fix a problem with use of mode GL_RESCALE_NORMAL for geometries below a scaling transform which is not equal in X, Y & Z components. In this case, the 'slow' method of mode GL_NORMALIZE should be used to perform the normalization.
I have attached a correction to daeRTransforms.cpp based on trunk at [12892] which corrects this problem.

This is the changed section:

Code:
       if (scale.x() == scale.y() && scale.y() == scale.z())
       {
           // This mode may be quicker than GL_NORMALIZE, but ONLY works if x, y & z components of scale are the same.
           ss->setMode(GL_RESCALE_NORMAL, osg::StateAttribute::ON|osg::StateAttribute::OVERRIDE);
       }
       else
       {
           // This mode may be slower than GL_RESCALE_NORMAL, but does work if x, y & z components of scale are not the same.
           ss->setMode(GL_NORMALIZE, osg::StateAttribute::ON|osg::StateAttribute::OVERRIDE);
       }"
2012-02-09 14:11:36 +00:00
Robert Osfield
c533c33457 From Hartmut Seichter, "attached a revised CMakeLists.txt file for Android that avoids the problems with a ARM gcc bug that appears in the NDK. It only overrides the optimization level for one file. As it resides only in the cfg parser this should not have side effects on performance." 2012-02-08 17:12:58 +00:00
Robert Osfield
7d5d742070 From Sukender, "I just fixed using UTF8 paths in JP2 readerwriter under Windows. Jpeg2000 plugin could not handle UTF8 paths as it was using an Japser open() function which seems to be based on the standard fopen(). The fix simply opens the file beforehand and only gives a FILE* to the Jasper lib (and then closes the file, of course).
"
2012-02-07 10:33:09 +00:00
Robert Osfield
ec08c4dfea From Cory Riddell, "I've been using the dot plugin and found that our application which sets
the global locale was generating bad dot files. Specifically, the node
numbers had comma separators in them (like 1,234 rather than 1234).

The attached file simply forces the stringstreams used to build up the
dot file to use the "C" locale."
2012-02-06 13:29:38 +00:00
Robert Osfield
55c4f9b401 From Paul Palumbo, "This change seems to fix a problem reading 32-bit Floating point tiff images. Without this fix, I'm only getting half my image displayed in "osgviewer --image"." 2012-02-06 12:42:52 +00:00
Robert Osfield
d21280785c From Jason Beverage, "Attached is a patch to the SVG plugin to use cairo_surface_destroy
instead of free.  This was causing a crash on Windows.
"
2012-02-06 12:38:11 +00:00
Robert Osfield
1ed3833556 From Terry Welsh, improved support for handling archives 2012-02-03 11:09:45 +00:00
Robert Osfield
43f9a76169 From Luc Frauciel, "FBX plugin was locked on version 2012.1 of FBX SDK which is not available anymore on Autodesk website.
This patch allows version of FBX >= 2012.1, which includes current one : 2012.2
"
2012-02-01 17:38:37 +00:00
Robert Osfield
9da901e11b Chris Denham, fixed type of parameters to ensure they are longs where appropriate. 2012-01-24 17:38:23 +00:00
Robert Osfield
884f480202 Fixed compile error 2012-01-24 15:44:58 +00:00
Robert Osfield
6d66e1abaa Added support for using GL_UNPACK_ROW_LENGTH in conjunction with texture's + osg::Image via new RowLength
parameter in osg::Image.  To support this Image::setData(..) now has a new optional rowLength parameter which
defaults to 0, which provides the original behaviour, Image::setRowLength(int) and int Image::getRowLength() are also provided.

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

To support the possibility of non contiguous osg::Image usage of image objects has had to be updated to
check DataContiguous and handle the case or use access via the DataIerator or by row by row.  To achieve
this a relatively large number of files has had to be modified, in particular the texture classes and
image plugins that doing writing.
2012-01-24 14:34:02 +00:00
Robert Osfield
76b1c8e20e Changed float QuicktimeImageStream::getCurrentTime() to double QuicktimeImageStream::getCurrentTime() to keep it consistent with
the type of the virtual function ImageStream::getCurrentTime(), and with this fixing a compile and runtime error.

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

I have just included it, and verified that this also works with current
version 0.7, since the header is also available there."
2012-01-05 14:07:56 +00:00
Robert Osfield
d9fd29d996 From Chris Denham, Implementation of write functions in CURL plugin 2012-01-02 16:38:01 +00:00
Robert Osfield
3aab31f198 From Paul Martz and David Glenn,
"From David Glenn and Paul Martz. This change adds support for the NO_COLOR bit in the Vertex records' flags field. If NO_COLOR is set, and PACKED_COLOR is not set, the code will now properly default to using the face color at those vertices. See the osg-users thread "Open Flight characteristic not reflected in the current OSG" for more info."

and

"In consultation with David Glenn, it appears we needed to change a second file to correct how OpenFlight handles transparency when vertices have NO_COLOR. "
2011-12-23 17:40:31 +00:00
Robert Osfield
50c7a31d62 From Brad Christiansen, "I have added an implementation for set/getVolume in the direct show plug-in." 2011-12-23 17:16:06 +00:00
Robert Osfield
fa2e8b22c5 From Ulrich Hertlein, "attached is a patch for osgPlugins/mdl/MDLReader.cpp that improves its functionality on
Unix filesystems.  It also includes code cleanups/refactoring."
2011-12-23 16:29:51 +00:00
Robert Osfield
4e834dfc73 From Brad Christiansen, "Attached are some small changes to the ImageStream interface and the DirectShow and FFMPEG plugins to provide the current time being displayed in the image stream.
I don’t have access to an OSX or Linux dev machine to make the changes required to the quick time plugin. This plugin will just default to returning 0."
2011-12-23 16:27:25 +00:00
Robert Osfield
3cad9d0962 Fixed the use DCM_SeriesDescription 2011-11-01 10:30:18 +00:00
Robert Osfield
14a4aa9a19 Improved the handling of multiple datasets being read at once, with all the images in a series being group according to Series UID and SeriesDescription and orientation. 2011-11-01 10:27:12 +00:00
Robert Osfield
d95801f6a8 Changed the notification level to INFO. 2011-10-28 11:00:55 +00:00
Robert Osfield
3e7900c39e Changed the default for SampleBuffers to be 1 when set. 2011-10-28 10:36:29 +00:00
Robert Osfield
24ff8796d5 Changed the default depth to 24. 2011-10-28 09:11:21 +00:00
Robert Osfield
c403c052db Added support for American spelling of swap and add supportOptions(..) documentation for the new options. 2011-10-27 08:34:53 +00:00
Robert Osfield
881078289d Added support into the .p3d format for specifying the osgDB::Options::OptionString via the <tag options="value">.
Added support into .vnc plugin for passing in the keywords "swap", "RGB", "RGBA", "BGR", "BGRA" as OptionString values to allow .p3d presentations to control
whether the pixelformat should be swapped or set to a specific format.
2011-10-26 14:25:56 +00:00
Robert Osfield
5d26d16fd3 Added password support into present3D's vnc support via the tag usage : <vnc password="mypassword">hostname</vnc> 2011-10-26 12:48:57 +00:00
Robert Osfield
9995cb70a9 Added password support into osgvnc example and vnc plugin 2011-10-26 12:29:38 +00:00
Robert Osfield
b9d7989b44 Implement a simply attempt at detecting when the pixel format needs to be swapped. 2011-10-26 09:34:50 +00:00
Robert Osfield
affe0b4a6d Added support for calling throwException() from InputIterator and added a check for negative string sizes. 2011-10-20 16:35:50 +00:00
Robert Osfield
78ad56f76c Changed getVertical(..) so it uses the same coord scale as the getGlyph 2011-10-03 14:57:39 +00:00
Robert Osfield
bb48cef38c Added Font::getVertical(float& ascender, float& descender) methods. 2011-10-03 10:36:18 +00:00
Robert Osfield
0b7dbc68c9 Added better error reporting and handling when <key> tag contents are not valid. 2011-09-20 10:59:18 +00:00
Robert Osfield
8a230d42ed From Luc Frauciel, "You'll find attached a new option that allow, when using LOD in USER_DEFINED_CENTER mode to expand the radius of the node by the radius of loaded objets.
Motivation ;
When using PagedLODs, you don't always know the real size of loaded children,
If it occurs that they  are out of predefined bounds, picking on the parts that are out of bound will fail
They also can be culled out too soon.
The problem often  occurs with long object (roads).
I've modified LOD and ProxyNode to include this option."

and later email:

"Attached the UNION_OF_BOUNDING_SPHERE_AND_USER_DEFINED version
There are impacts on some serializers (dae, osgWrapper).
I haven't modified deprecated osg, since it's deprecated"
2011-09-19 10:34:31 +00:00
Robert Osfield
f9dffdba2c Copya and Paste Anti-Pattern strikes again! Renamed FreeType usage to Revisions to correct previous mistake when copying and modifying the ReaderWriter. 2011-09-19 09:44:29 +00:00
Robert Osfield
0f30c08701 From Laurens Voerman, "attached is a zipped
OpenSceneGraph\src\osgPlugins\ffmpeg\FFmpegDecoderAudio.cpp

It solves a wrong sample format being set for audiostreams type S32 and F32, for the
enum AVSampleFormat (in include/avutil/samplefmt.h) doesn't match
enum SampleFormat   (in include/osg/AudioStream) for anything but
SAMPLE_FORMAT_U8 and SAMPLE_FORMAT_S16
"

and follow up that address versioning issue

"I can find the change, avutil version 50.38.0 introduced a new header file:
libavutil/samplefmt.h
older versions use
libavcodec/avcodec.h
with the sampleformats without AV_

an intermideate fix with the FF_API_OLD_SAMPLE_FMT is removed from ffmpeg 0.8.3 so
I think this is the correct fix:

#if LIBAVUTIL_VERSION_INT < AV_VERSION_INT(50,38,0)
#define AV_SAMPLE_FMT_NONE SAMPLE_FMT_NONE
#define AV_SAMPLE_FMT_U8   SAMPLE_FMT_U8
#define AV_SAMPLE_FMT_S16  SAMPLE_FMT_S16
#define AV_SAMPLE_FMT_S32  SAMPLE_FMT_S32
#define AV_SAMPLE_FMT_FLT  SAMPLE_FMT_FLT
#define AV_SAMPLE_FMT_DBL  SAMPLE_FMT_DBL
#define AV_SAMPLE_FMT_NB   SAMPLE_FMT_NB
#endif
"
2011-09-14 09:49:28 +00:00
Robert Osfield
41924dfc14 From Sukender, "I just fount that writing double precision values (eg. Vec3dArray for vertices) works with .osg but not .osgt/.osgx. So here is the fix (SVN trunk r12712). I suppose .osgb works as expected on this point and did not change anything.
So, as for .osg, if you add "precision 16" (for instance) to the optionString, then you'll get double precision vertices written correctly.
"
2011-09-13 11:48:06 +00:00
Robert Osfield
abb7228d56 From Sukender, "I added a crash-guard against corrupted 3DS files, having faces indexes out of the range of existing vertices." 2011-09-13 09:43:45 +00:00
Robert Osfield
796ccd14c8 From Cedric Pinson, from three submissions:
"Here a patch that correct like the previous assign collada material name
to stateset."

and

"I changed how the collada reader set object name in osg. Current
implementation use collada ID to setup name. with this patch I use
collada name to setup name in osg object and if collada provide no name
I use as fallback ID. I am not sure we want this fallback.

The motivation of this change is that when an artist set names to its
objects and export to collada, I am not able to use those names in osg
to retrieve the node."

and

"Here the update of the file that fix the light id stuff"
2011-09-12 11:28:14 +00:00
Robert Osfield
edd83a03fe From Paul Idstein, warning fixes for OSX 10.7 2011-09-12 11:24:24 +00:00
Robert Osfield
ed27e55b60 Improved handling of the scaling of dicom imagery. 2011-07-28 16:40:28 +00:00
Robert Osfield
9f4fee5fd3 From Mathias Froehlich, "I have attached an updated version of the VRML2 loader.
That change is the result of the '[osgPlugins] VRML plugin - "file" url'
discussion on osg-users.

The attached change avoids rewriting file names into some kind of file urls
and then use the url for opening an fstream. Instead just use the given file
name to open the stream.
Also this change adds some Notify output for the error paths.
"
2011-07-21 09:07:22 +00:00
Robert Osfield
09b5e95d65 Changed the HAVE_CONFIG_H guard so that it uses #ifndef _MSC_VER rather than _WIN32 to avoid problems with Mingw and Cygwin builds of DCMTK. 2011-07-18 09:40:58 +00:00
Robert Osfield
b59ab789a3 From Alberto Luacas, typo fixes 2011-07-17 16:24:47 +00:00
Robert Osfield
9c876964a5 From Wang Rui, improved the handling of the _preReadString within the readWrappedString method by factoring the
reading of the next character into a dedicated getCharacter(..) method.
2011-07-17 10:30:40 +00:00
Robert Osfield
f0bdbea926 From Wang Rui, "I've found that the latest ffmpeg made some functions and macros
deprecated, which led to compilation errors in the OSG plugin. I tried
fixing them and tested with the version ffmpeg-git-5d4fd1d (ffmpeg
version > 0.8, libavcodec = 53.7.0) under Windows.
"
2011-07-15 10:24:23 +00:00
Robert Osfield
fb29f83255 From Wang Rui,"The files attached should be separately put into the directories
src/osgPlugins/osg and src/osgWrappers/serializers/osgSim. They fix a
serious infinite loop problem that may be caused by the stream buffer
mechanism under Windows and some osgSim wrapper bugs pointed by
Andreas. I've asked the community to help test them and hope now we
can solve these recent .osgt file reading issues."
2011-07-15 09:14:16 +00:00
Robert Osfield
5bfa112183 From Ryan Pavlik, "Fix inventor state copy constructor.
Clang warning:
    In file included from src/osgPlugins/Inventor/ConvertToInventor.cpp:80:
    src/osgPlugins/Inventor/ConvertToInventor.h:117:71: warning: field is uninitialized when used here [-Wuninitialized]
            osgTexGenS(s.osgTexGenS), osgTexGenT(s.osgTexGenT), osgTexGen(osgTexGen),
                                                                          ^"
2011-07-15 08:43:47 +00:00
Robert Osfield
a53dd7d744 From Philip Lamp, submitted by Stephan Huber, "Modify the ReaderWriteImageIO_IOS to correctly handle relative paths
when reading from a file. This means that no longer do all image files
have to live at the root of the Resources folder inside the app bundle,
but can now be organized inside folders. Also improved error handling
and fixed a potential leak of a CGColorSpaceRef each once per image load."
2011-07-15 08:32:04 +00:00
Robert Osfield
b6fa087fe2 Converted tabs to four spaces 2011-07-15 08:16:58 +00:00
Robert Osfield
ae2b8c4130 Added #if lib curl version check around #include <curl/types.h> as this header was deprecated and now
removed entirely from libcurl-7.21.7.
2011-06-28 07:23:52 +00:00
Robert Osfield
2de3f08fd3 From Wang Rui, "I've found a small problem which causes crashes in the 3ds plugin
while trying to load a model. The fix here will ensure that the
texture map is valid and everything could work well then."
2011-06-28 07:22:09 +00:00
Robert Osfield
e1bae2701a Tweaked the comments 2011-06-27 21:33:38 +00:00
Robert Osfield
0f9f891f72 From Jean-Sebestien Guay, workaround for bug under windows with the seek implementation when handling ascii files with unix file endings. 2011-06-27 21:32:20 +00:00
Robert Osfield
3979eb7755 From Andreas Eskland, "I found that a binary PNM file couldn't be read by the PNM plugin in the 3.0 branch. Attached is a small fix in ReaderWriterPNM.cpp, simply opening the file in binary mode." 2011-06-25 20:51:58 +00:00
Robert Osfield
a9658dbd4d Removed redundent assert and associated variables to fix warnings. 2011-06-24 16:15:47 +00:00
Robert Osfield
d6a3ac647b Implemented missing writeShader 2011-06-24 15:04:16 +00:00
Robert Osfield
5fd1ece440 Implemented missing Archive::readShader/writeShader, and added searching of the archive list in Registr::read() so that files
that are stored in the archives can be found.
2011-06-24 12:40:18 +00:00
Robert Osfield
41a6d949c2 From Wang Rui, "I've modified the code to handle -1.#IND and other kinds of infinite
values. Please see the attachments for details"
2011-06-24 08:13:58 +00:00
Robert Osfield
fa40366ae4 Warning fixes for:
OpenSceneGraph/src/osgPlugins/Inventor/ConvertFromInventor.cpp: In member function ?virtual SbBool SoVRMLImageTextureOsg::readInstance(SoInput*, short unsigned int)?:
OpenSceneGraph/src/osgPlugins/Inventor/ConvertFromInventor.cpp:1264:16: warning: variable ?retval? set but not used [-Wunused-but-set-variable]
OpenSceneGraph/src/osgPlugins/ac/Geode.cpp: In member function ?void ac3d::Geode::ProcessGeometry(std::ostream&, unsigned int)?:
OpenSceneGraph/src/osgPlugins/ac/Geode.cpp:806:35: warning: variable ?fRep_s? set but not used [-Wunused-but-set-variable]
OpenSceneGraph/src/osgPlugins/ac/Geode.cpp:806:43: warning: variable ?fRep_t? set but not used [-Wunused-but-set-variable]
OpenSceneGraph/src/osgPlugins/ac/Geode.cpp:807:35: warning: variable ?fOffset_s? set but not used [-Wunused-but-set-variable]
OpenSceneGraph/src/osgPlugins/ac/Geode.cpp:807:46: warning: variable ?fOffset_t? set but not used [-Wunused-but-set-variable]
OpenSceneGraph/src/osgViewer/GraphicsWindowX11.cpp: In member function ?virtual void osgViewer::GraphicsWindowX11::checkEvents()?:
OpenSceneGraph/src/osgViewer/GraphicsWindowX11.cpp:1181:10: warning: variable ?destroyWindowRequested? set but not used [-Wunused-but-set-variable]
2011-06-23 18:24:07 +00:00
Robert Osfield
00cf10be35 Added better handling of archives in ReaderWriterZip::readNode() so that if there is no master file definition it
loads all the available nodes in the zip archive and returns an osg::Group containing all the nodes if there is more
than one, or just returns the node if there is just one.  Also implemented this functionality for ReaderWriterZip::readImage().
2011-06-23 15:37:35 +00:00
Robert Osfield
7455f6265c Fixed warnings.
OpenSceneGraph/src/osgGA/NodeTrackerManipulator.cpp:32:1: warning: base class ?class osg::Object? should be explicitly initialized in the copy constructor
OpenSceneGraph/src/osgGA/TerrainManipulator.cpp:31:1: warning: base class ?class osg::Object? should be explicitly initialized in the copy constructor
OpenSceneGraph/include/osgSim/ShapeAttribute:99:9: warning: base class ?class std::vector<osgSim::ShapeAttribute>? should be explicitly initialized in the copy constructor
OpenSceneGraph/src/osgPlugins/zip/unzip.cpp:3102:14: warning: missing initializer for member ?unz_s::gi?
OpenSceneGraph/src/osgPlugins/zip/unzip.cpp:3102:14: warning: missing initializer for member ?unz_s::byte_before_the_zipfile?
OpenSceneGraph/src/osgPlugins/zip/unzip.cpp:3102:14: warning: missing initializer for member ?unz_s::num_file?
OpenSceneGraph/src/osgPlugins/zip/unzip.cpp:3102:14: warning: missing initializer for member ?unz_s::pos_in_central_dir?
OpenSceneGraph/src/osgPlugins/zip/unzip.cpp:3102:14: warning: missing initializer for member ?unz_s::current_file_ok?
OpenSceneGraph/src/osgPlugins/zip/unzip.cpp:3102:14: warning: missing initializer for member ?unz_s::central_pos?
OpenSceneGraph/src/osgPlugins/zip/unzip.cpp:3102:14: warning: missing initializer for member ?unz_s::size_central_dir?
OpenSceneGraph/src/osgPlugins/zip/unzip.cpp:3102:14: warning: missing initializer for member ?unz_s::offset_central_dir?
OpenSceneGraph/src/osgPlugins/zip/unzip.cpp:3102:14: warning: missing initializer for member ?unz_s::cur_file_info?
OpenSceneGraph/src/osgPlugins/zip/unzip.cpp:3102:14: warning: missing initializer for member ?unz_s::cur_file_info_internal?
OpenSceneGraph/src/osgPlugins/zip/unzip.cpp:3102:14: warning: missing initializer for member ?unz_s::pfile_in_zip_read?
OpenSceneGraph/src/osgViewer/CompositeViewer.cpp:30:1: warning: base class ?class osg::Object? should be explicitly initialized in the copy constructor
OpenSceneGraph/src/osgViewer/View.cpp:159:1: warning: base class ?class osg::Object? should be explicitly initialized in the copy constructor
OpenSceneGraph/src/osgViewer/Viewer.cpp:196:1: warning: base class ?class osg::Object? should be explicitly initialized in the copy constructor
OpenSceneGraph/src/osgViewer/Viewer.cpp:196:1: warning: base class ?class osgViewer::ViewerBase? should be explicitly initialized in the copy constructor
OpenSceneGraph/include/osgManipulator/Dragger:47:9: warning: base class ?class osg::Object? should be explicitly initialized in the copy constructor
2011-06-23 11:09:49 +00:00
Robert Osfield
8570c37ed5 From Ryan Pavlik, "I have successfully compiled OpenSceneGraph trunk using the Clang compiler (using a recent trunk build of llvm and clang, haven't tested an older release). The attached files contain the change shown in the diff below, which was required to finish the build with Clang. It fixes an issue with two-phase name lookup - there's more information here http://blog.llvm.org/2009/12/dreaded-two-phase-name-lookup.html
"
2011-06-23 09:26:27 +00:00
Robert Osfield
fa26facba9 Converted tabs to four spaces 2011-06-23 07:13:13 +00:00
Robert Osfield
30becd5ed3 Resolved warnings reported by g++ 4.6's -Wunused-but-set-variable.
Warnings were:

/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osg/ShapeDrawable.cpp: In member function ‘void PrimitiveShapeVisitor::createHalfSphere(unsigned int, unsigned int, float, int, float, const Matrix&)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osg/ShapeDrawable.cpp:1409:11: warning: variable ‘nzBase’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osg/ShapeDrawable.cpp:1410:11: warning: variable ‘nRatioBase’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgUtil/DelaunayTriangulator.cpp: In function ‘osgUtil::Triangle_list osgUtil::fillHole(osg::Vec3Array*, std::vector<unsigned int, std::allocator<unsigned int> >)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgUtil/DelaunayTriangulator.cpp:569:27: warning: variable ‘ptest’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgUtil/DelaunayTriangulator.cpp: In member function ‘bool osgUtil::DelaunayTriangulator::triangulate()’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgUtil/DelaunayTriangulator.cpp:979:45: warning: variable ‘curp’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgUtil/RenderStage.cpp: In member function ‘void osgUtil::RenderStage::runCameraSetUp(osg::RenderInfo&)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgUtil/RenderStage.cpp:631:18: warning: variable ‘stencilAttached’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgText/FadeText.cpp: In member function ‘void FadeTextPolytopeData::buildPolytope()’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgText/FadeText.cpp:74:20: warning: variable ‘edge23’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgText/FadeText.cpp:75:20: warning: variable ‘edge30’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgText/Text.cpp: In member function ‘void osgText::Text::computeBackdropPositions(unsigned int) const’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgText/Text.cpp:747:10: warning: variable ‘is_valid_size’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgGA/NodeTrackerManipulator.cpp: In member function ‘virtual bool osgGA::NodeTrackerManipulator::performMovementLeftMouseButton(double, double, double)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgGA/NodeTrackerManipulator.cpp:257:21: warning: variable ‘lookVector’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgGA/NodeTrackerManipulator.cpp:259:21: warning: variable ‘upVector’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgGA/TerrainManipulator.cpp: In member function ‘virtual bool osgGA::TerrainManipulator::performMovementMiddleMouseButton(double, double, double)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgGA/TerrainManipulator.cpp:217:11: warning: variable ‘lookVector’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgGA/TerrainManipulator.cpp:219:11: warning: variable ‘upVector’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgVolume/FixedFunctionTechnique.cpp: In member function ‘virtual void osgVolume::FixedFunctionTechnique::init()’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgVolume/FixedFunctionTechnique.cpp:124:30: warning: variable ‘tf’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgParticle/FluidProgram.cpp: In member function ‘virtual void osgParticle::FluidProgram::execute(double)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgParticle/FluidProgram.cpp:38:23: warning: variable ‘velBefore’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgShadow/ParallelSplitShadowMap.cpp: In member function ‘virtual void osgShadow::ParallelSplitShadowMap::cull(osgUtil::CullVisitor&)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgShadow/ParallelSplitShadowMap.cpp:593:22: warning: variable ‘bb’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgTerrain/GeometryTechnique.cpp: In member function ‘virtual void osgTerrain::GeometryTechnique::generateGeometry(osgTerrain::GeometryTechnique::BufferData&, osgTerrain::Locator*, const osg::Vec3d&)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgTerrain/GeometryTechnique.cpp:777:12: warning: variable ‘i_sampleFactor’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgTerrain/GeometryTechnique.cpp:778:12: warning: variable ‘j_sampleFactor’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/dds/ReaderWriterDDS.cpp: In function ‘osg::Image* ReadDDSFile(std::istream&)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/dds/ReaderWriterDDS.cpp:314:10: warning: variable ‘is3dImage’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/dds/ReaderWriterDDS.cpp: In function ‘bool WriteDDSFile(const osg::Image*, std::ostream&)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/dds/ReaderWriterDDS.cpp:721:10: warning: variable ‘is3dImage’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/hdr/hdrloader.cpp: In static member function ‘static bool HDRLoader::load(const char*, bool, HDRLoaderResult&)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/hdr/hdrloader.cpp:101:10: warning: variable ‘cmd’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/vtf/ReaderWriterVTF.cpp: In function ‘osg::Image* ReadVTFFile(std::istream&)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/vtf/ReaderWriterVTF.cpp:360:23: warning: variable ‘base’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/jp2/ReaderWriterJP2.cpp: In function ‘int putdata(jas_stream_t*, jas_image_t*, int)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/jp2/ReaderWriterJP2.cpp:41:13: warning: variable ‘linelen’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/Inventor/ConvertToInventor.cpp: In member function ‘void ConvertToInventor::processGeometry(const osg::Geometry*, ConvertToInventor::InventorState*)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/Inventor/ConvertToInventor.cpp:1639:10: warning: variable ‘ok’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/Inventor/ConvertFromInventor.cpp: In member function ‘virtual SbBool SoVRMLImageTextureOsg::readInstance(SoInput*, short unsigned int)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/Inventor/ConvertFromInventor.cpp:1264:16: warning: variable ‘retval’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/OpenFlight/GeometryRecords.cpp: In member function ‘virtual void flt::Face::readRecord(flt::RecordInputStream&, flt::Document&)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/OpenFlight/GeometryRecords.cpp:369:19: warning: variable ‘secondaryPackedColor’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/OpenFlight/GeometryRecords.cpp: In member function ‘virtual void flt::Mesh::readRecord(flt::RecordInputStream&, flt::Document&)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/OpenFlight/GeometryRecords.cpp:942:19: warning: variable ‘secondaryPackedColor’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/OpenFlight/ReaderWriterFLT.cpp: In member function ‘virtual osgDB::ReaderWriter::ReadResult FLTReaderWriter::readNode(std::istream&, const Options*) const’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/OpenFlight/ReaderWriterFLT.cpp:427:40: warning: variable ‘pos’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/ive/ShapeAttributeList.cpp: In member function ‘void ive::ShapeAttributeList::write(ive::DataOutputStream*)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/ive/ShapeAttributeList.cpp:31:48: warning: variable ‘it’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/ac/Geode.cpp: In member function ‘void ac3d::Geode::ProcessGeometry(std::ostream&, unsigned int)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/ac/Geode.cpp:806:35: warning: variable ‘fRep_s’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/ac/Geode.cpp:806:43: warning: variable ‘fRep_t’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/ac/Geode.cpp:807:35: warning: variable ‘fOffset_s’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/ac/Geode.cpp:807:46: warning: variable ‘fOffset_t’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/ac/Geode.cpp:932:38: warning: variable ‘primLength’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/txp/trpage_geom.cpp: In member function ‘virtual bool trpgGeometry::Write(trpgWriteBuffer&)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/txp/trpage_geom.cpp:615:19: warning: variable ‘u’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/txp/trpage_material.cpp: In member function ‘int trpgMatTable::AddMaterial(const trpgMaterial&, bool)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/txp/trpage_material.cpp:103:10: warning: variable ‘spaceInTable’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/txp/trpage_rarchive.cpp: In member function ‘virtual bool trpgr_Archive::ReadHeader(bool)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/txp/trpage_rarchive.cpp:261:14: warning: variable ‘headerHasTexTable’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/zip/unzip.cpp: In member function ‘ZRESULT TUnzip::Get(int, ZIPENTRY*)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/zip/unzip.cpp:4055:8: warning: variable ‘hidden’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/zip/unzip.cpp:4055:22: warning: variable ‘system’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/zip/unzip.cpp:4055:36: warning: variable ‘archive’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/zip/ZipArchive.cpp: In member function ‘virtual bool ZipArchive::getFileNames(osgDB::Archive::FileNameList&) const’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/zip/ZipArchive.cpp:91:37: warning: variable ‘iterEnd’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/pvr/ReaderWriterPVR.cpp: In member function ‘osgDB::ReaderWriter::ReadResult ReaderWriterPVR::readPVRStream(std::istream&) const’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/pvr/ReaderWriterPVR.cpp:155:14: warning: variable ‘hasAlpha’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgViewer/View.cpp: In function ‘osg::Geometry* create3DSphericalDisplayDistortionMesh(const Vec3&, const Vec3&, const Vec3&, double, double, osg::Image*, const Matrix&)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgViewer/View.cpp:737:15: warning: variable ‘cursor’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgViewer/View.cpp: In function ‘osg::Geometry* createParoramicSphericalDisplayDistortionMesh(const Vec3&, const Vec3&, const Vec3&, double, double, osg::Image*, const Matrix&)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgViewer/View.cpp:1130:19: warning: variable ‘cursor’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgViewer/View.cpp:1118:15: warning: variable ‘dx’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgViewer/GraphicsWindowX11.cpp: In member function ‘virtual void osgViewer::GraphicsWindowX11::checkEvents()’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgViewer/GraphicsWindowX11.cpp:1181:10: warning: variable ‘destroyWindowRequested’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/cfg/ConfigParser.cpp: In member function ‘bool osgProducer::CameraConfig::parseFile(const string&)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/cfg/ConfigParser.cpp:2247:13: warning: variable ‘result’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgQt/QGraphicsViewAdapter.cpp: In member function ‘bool osgQt::QGraphicsViewAdapter::handlePointerEvent(int, int, int)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgQt/QGraphicsViewAdapter.cpp:344:17: warning: variable ‘viewportGeometry’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/examples/osgdistortion/osgdistortion.cpp: In function ‘osg::Node* createDistortionSubgraph(osg::Node*, const Vec4&)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/examples/osgdistortion/osgdistortion.cpp:125:19: warning: variable ‘cursor’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/examples/osgdistortion/osgdistortion.cpp:126:19: warning: variable ‘texcoord’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/examples/osgdistortion/osgdistortion.cpp: In function ‘osg::Geometry* createDomeDistortionMesh(const Vec3&, const Vec3&, const Vec3&, osg::ArgumentParser&)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/examples/osgdistortion/osgdistortion.cpp:358:15: warning: variable ‘cursor’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/examples/osgposter/osgposter.cpp: In function ‘int main(int, char**)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/examples/osgposter/osgposter.cpp:253:31: warning: variable ‘outputTiles’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/examples/osgthreadedterrain/osgthreadedterrain.cpp: In function ‘int main(int, char**)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/examples/osgthreadedterrain/osgthreadedterrain.cpp:669:10: warning: variable ‘readParameter’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/examples/osgtext3D/TextNode.cpp: In member function ‘virtual void osgText::Layout::layout(osgText::TextNode&) const’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/examples/osgtext3D/TextNode.cpp:80:11: warning: variable ‘characterHeightScale’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/examples/osgvolume/osgvolume.cpp: In function ‘int main(int, char**)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/examples/osgvolume/osgvolume.cpp:678:38: warning: variable ‘internalFormatMode’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/examples/osgwidgetcanvas/osgwidgetcanvas.cpp: In function ‘bool windowMouseOver(osgWidget::Event&)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/examples/osgwidgetcanvas/osgwidgetcanvas.cpp:27:24: warning: variable ‘xy’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/examples/osgwidgetcanvas/osgwidgetcanvas.cpp: In function ‘bool widgetMouseOver(osgWidget::Event&)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/examples/osgwidgetcanvas/osgwidgetcanvas.cpp:35:24: warning: variable ‘xy’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/p3d/ReaderWriterP3D.cpp: In member function ‘osg::Node* ReaderWriterP3DXML::parseXmlGraph(osgDB::XmlNode*, bool, osgDB::Options*) const’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/p3d/ReaderWriterP3D.cpp:2121:10: warning: variable ‘readSlide’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/applications/present3D/present3D.cpp: In function ‘int main(int, char**)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/applications/present3D/present3D.cpp:639:10: warning: variable ‘sizesSpecified’ set but not used [-Wunused-but-set-variable]
2011-06-22 12:30:01 +00:00
Robert Osfield
111a4a9274 Added returns to end of files 2011-06-21 09:54:57 +00:00
Robert Osfield
e3c89d7f60 Added return to end of file 2011-06-21 09:54:23 +00:00
Robert Osfield
f38a855a73 Conveted tabs to four spaces and added a return to end of file 2011-06-21 09:53:34 +00:00
Michael PLATINGS
dc123461c7 Fixed redundant "enumeration not handled in switch" warnings.
Fixed a warning about a comparison between different enums - EUnifiedMappingType was being compared with EMappingType. In general the FBX SDK is moving away from Get & Set functions to giving direct access to properties, so I have changed GetMappingType() to CurrentMappingType.Get()
2011-06-21 09:29:32 +00:00
Robert Osfield
7f9e1c5a6f Fixed a range of issues reported by cppcheck:
[examples/osgphotoalbum/PhotoArchive.cpp:56]: (error) Memory leak: fileIndentifier
[examples/osgphotoalbum/PhotoArchive.cpp:257]: (error) Deallocating a deallocated pointer: newData
[examples/osgphotoalbum/PhotoArchive.cpp:318]: (error) Deallocating a deallocated pointer: newData
[src/osg/ImageUtils.cpp:116]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/ImageUtils.cpp:307]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/ImageUtils.cpp:312]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/ImageUtils.cpp:367]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/ImageUtils.cpp:399]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/ImageUtils.cpp:400]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/ImageUtils.cpp:482]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/ImageUtils.cpp:483]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/ImageUtils.cpp:484]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/ImageUtils.cpp:519]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/ImageUtils.cpp:536]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/OcclusionQueryNode.cpp:71]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/OcclusionQueryNode.cpp:74]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/OcclusionQueryNode.cpp:77]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/OcclusionQueryNode.cpp:82]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/OcclusionQueryNode.cpp:102]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/OcclusionQueryNode.cpp:107]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/OcclusionQueryNode.cpp:599]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/OcclusionQueryNode.cpp:600]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/OcclusionQueryNode.cpp:601]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/OcclusionQueryNode.cpp:602]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/OcclusionQueryNode.cpp:603]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/OcclusionQueryNode.cpp:604]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/OcclusionQueryNode.cpp:605]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/OcclusionQueryNode.cpp:606]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osgDB/ExternalFileWriter.cpp:134]: (portability) Extra qualification 'osgDB::' unnecessary and considered an error by many compilers.
[src/osgDB/ExternalFileWriter.cpp:135]: (portability) Extra qualification 'osgDB::' unnecessary and considered an error by many compilers.
[src/osgDB/ExternalFileWriter.cpp:136]: (portability) Extra qualification 'osgDB::' unnecessary and considered an error by many compilers.
[src/osgDB/ExternalFileWriter.cpp:137]: (portability) Extra qualification 'osgDB::' unnecessary and considered an error by many compilers.
[src/osgDB/ExternalFileWriter.cpp:139]: (portability) Extra qualification 'osgDB::' unnecessary and considered an error by many compilers.
[src/osgDB/ExternalFileWriter.cpp:177]: (portability) Extra qualification 'osgDB::' unnecessary and considered an error by many compilers.
[src/osgDB/ExternalFileWriter.cpp:178]: (portability) Extra qualification 'osgDB::' unnecessary and considered an error by many compilers.
[src/osgDB/ExternalFileWriter.cpp:195]: (portability) Extra qualification 'osgDB::' unnecessary and considered an error by many compilers.
[src/osgDB/ExternalFileWriter.cpp:198]: (portability) Extra qualification 'osgDB::' unnecessary and considered an error by many compilers.
[src/osgDB/ExternalFileWriter.cpp:203]: (portability) Extra qualification 'osgDB::' unnecessary and considered an error by many compilers.
[src/osgDB/ExternalFileWriter.cpp:205]: (portability) Extra qualification 'osgDB::' unnecessary and considered an error by many compilers.
[src/osgDB/ExternalFileWriter.cpp:253]: (portability) Extra qualification 'osgDB::' unnecessary and considered an error by many compilers.
[src/osgDB/InputStream.cpp:553]: (error) Memory leak: data
[src/osgDB/OutputStream.cpp:393]: (error) Memory leak: data
[src/osgPlugins/Inventor/ConvertToInventor.cpp:656]: (error) Mismatching allocation and deallocation: tmpArray
[src/osgPlugins/Inventor/ReaderWriterIV.cpp:237]: (error) Common realloc mistake: 'buf' nulled but not freed upon failure
[src/osgPlugins/OpenFlight/expGeometryRecords.cpp:167]: (portability) Extra qualification 'flt::' unnecessary and considered an error by many compilers.
[src/osgPlugins/OpenFlight/expGeometryRecords.cpp:373]: (portability) Extra qualification 'flt::' unnecessary and considered an error by many compilers.
[src/osgPlugins/cfg/CameraConfig.cpp:635]: (error) Unusual pointer arithmetic
[src/osgPlugins/freetype/FreeTypeLibrary.cpp:122]: (error) Memory leak: buffer
[src/osgPlugins/geo/ReaderWriterGEO.cpp:210]: (error) Possible null pointer dereference: gfd - otherwise it is redundant to check if gfd is null at line 211
[src/osgPlugins/geo/ReaderWriterGEO.cpp:227]: (error) Possible null pointer dereference: gfd - otherwise it is redundant to check if gfd is null at line 228
[src/osgPlugins/geo/ReaderWriterGEO.cpp:903]: (error) Possible null pointer dereference: gfd - otherwise it is redundant to check if gfd is null at line 904
[src/osgPlugins/geo/osgGeoNodes.h:180]: (error) Memory leak: geoHeaderGeo::intVars
[src/osgPlugins/geo/osgGeoNodes.h:181]: (error) Memory leak: geoHeaderGeo::useVars
[src/osgPlugins/geo/osgGeoNodes.h:182]: (error) Memory leak: geoHeaderGeo::extVars
[src/osgPlugins/md2/ReaderWriterMD2.cpp:180]: (error) Memory leak: mapbase
[src/osgPlugins/md2/ReaderWriterMD2.cpp:166]: (error) Resource leak: file_fd
[src/osgPlugins/pic/ReaderWriterPIC.cpp:152]: (error) Mismatching allocation and deallocation: tmpbuf
[src/osgPlugins/pic/ReaderWriterPIC.cpp:153]: (error) Mismatching allocation and deallocation: buffer
[src/osgPlugins/ply/plyfile.cpp:843]: (error) Memory leak: plyfile
[src/osgPlugins/pvr/ReaderWriterPVR.cpp:179]: (error) Memory leak: imageData
[src/osgPlugins/shp/ESRIShapeParser.cpp:29]: (error) Resource leak: fd
[src/osgPlugins/shp/XBaseParser.cpp:96]: (error) Resource leak: fd
[src/osgPlugins/zip/unzip.cpp:3158]: (error) Possible null pointer dereference: s - otherwise it is redundant to check if s is null at line 3159
[src/osgPlugins/zip/unzip.cpp:4155]: (error) Dangerous usage of 'rd' (strncpy doesn't always 0-terminate it)
[src/osgShadow/MinimalCullBoundsShadowMap.cpp:334]: (error) Possible null pointer dereference: rl - otherwise it is redundant to check if rl is null at line 331
[src/osgViewer/ScreenCaptureHandler.cpp:617]: (error) Possible null pointer dereference: camera - otherwise it is redundant to check if camera is null at line 611
[src/osgViewer/ScreenCaptureHandler.cpp:632]: (error) Possible null pointer dereference: camera - otherwise it is redundant to check if camera is null at line 626
[src/osgVolume/Locator.cpp:209]: (error) Dangerous iterator usage after erase()-method.
[src/osgVolume/RayTracedTechnique.cpp:274]: (error) Possible null pointer dereference: imageLayer - otherwise it is redundant to check if imageLayer is null at line 259
[src/osgVolume/RayTracedTechnique.cpp:275]: (error) Possible null pointer dereference: imageLayer - otherwise it is redundant to check if imageLayer is null at line 259
[src/osgWrappers/serializers/osg/ShaderBinary.cpp:28]: (error) Mismatching allocation and deallocation: data
2011-06-20 19:15:53 +00:00
Robert Osfield
20f334b6f8 Removed unneccesary namespace qualifiers, and issue picked out by cppcheck. 2011-06-20 14:09:49 +00:00
Robert Osfield
9781fe55ea From Farshid Lashkari, BGR write support for BMP, PNG and TGA 2011-06-20 12:36:53 +00:00
Robert Osfield
c6f4c26e31 Added extern "C" to fix build issues under OSX 2011-06-17 12:57:31 +00:00
Robert Osfield
058123cd50 Refined the version checking 2011-06-17 08:42:54 +00:00
Robert Osfield
4c6cc601c2 Build fix 2011-06-17 08:41:56 +00:00
Robert Osfield
c547172c24 Fixed warning 2011-06-17 06:22:01 +00:00
Robert Osfield
52aeb306d0 Fixed warnings 2011-06-17 06:09:25 +00:00
Robert Osfield
d5fa4dd272 Added disabling of VisualStudio warning C4324 : structure was padded due to __declspec(align()) 2011-06-17 05:57:29 +00:00
Robert Osfield
4dd0782549 Fixed warnings. 2011-06-16 18:43:58 +00:00
Robert Osfield
22dd032faa From Farshid Lashkari, "Attached is a small patch that adds support for writing BGR images to the DDS plugin." 2011-06-16 16:02:27 +00:00
Robert Osfield
38a807ae6e Windows warning fixes 2011-06-16 15:57:40 +00:00
Robert Osfield
93d1fedd0b Fixed indentation issues 2011-06-16 13:00:28 +00:00
Robert Osfield
375c1456f6 Improved indentation. 2011-06-16 10:05:49 +00:00
Robert Osfield
d0ccbf8219 Replaced tabs with four spaces 2011-06-16 08:59:48 +00:00
Robert Osfield
e1f5597167 Removed executable permission. 2011-06-14 09:11:58 +00:00
Robert Osfield
1016092720 From Mathias Froehlich, "the attached patch adds an additional null pointer check" 2011-06-09 11:07:27 +00:00
Robert Osfield
1f33e65c2a From Sukender, "Lastest change (update to FBX 2012.1) introduced a regression. It didn't take materials' order into consideration. The line
lMaterialLayer->GetDirectArray().SetAt(it->second.getIndex(), lMaterial);
has been replaced by
   _curFbxNode->AddMaterial(lMaterial);
because KFbxLayerElementMaterial::GetDirectArray() is now private and we can't access to it.
However, pushing back the material at the end of the vector is wrong.
We can use the (now) public attribute KFbxLayerElementMaterial::mDirectArray, as in this submission.
"
2011-06-07 14:28:58 +00:00
Robert Osfield
4f7903f732 From Mathias Froehlich, build fixes for legacy unix systems 2011-06-07 14:26:13 +00:00
Robert Osfield
3a5ef17ca7 From Frida Schlaug, "Imageio for ios had a poorly implemented function for reading from streams (always returning null). In this patch I copied some code from the non-ios imageio file and adjusted it to work on ios. " 2011-06-06 11:48:32 +00:00
Robert Osfield
594b4bf873 From Dimi Christop, build fix for RHEL 4. 2011-05-30 13:02:13 +00:00
Robert Osfield
0820be93d2 From Eric Sokolowsky, "Attached is an updated PNM plugin for inclusion in both the trunk and for release version 2.8.5. The attached file fixes numerous bugs in reading 8-bit and 16-bit images, including loading the images upside-down. This file also incorporates trunk patch r12220 which updated the plugin for reading and writing images through streams instead of C-style FILE I/O."
Note from Robert Osfield, previous revision was in error due to an incomplete merge, this revision completes the job.
2011-05-27 09:05:20 +00:00
Robert Osfield
ba2fd0316b From Eric Sokolowsky, "Attached is an updated PNM plugin for inclusion in both the trunk and for release version 2.8.5. The attached file fixes numerous bugs in reading 8-bit and 16-bit images, including loading the images upside-down. This file also incorporates trunk patch r12220 which updated the plugin for reading and writing images through streams instead of C-style FILE I/O." 2011-05-27 08:55:37 +00:00
Robert Osfield
0acce47d97 Reverted Bryce Eldrige submission. 2011-05-27 08:22:16 +00:00
Robert Osfield
b8b368dc7c From Bryce Eldridge, "Here is an update for the TIFF plugin that includes the following features when writing out TIFF files:
- Support for writing unsigned 16-bit images (GL_UNSIGNED_SHORT)
- Code to parse the options string for the following options:
-- Flag to turn off the compression. The PACKBITS compression type causes issues for me with some programs on Windows (Picasa for example).
-- Options to set the XRESOLUTION and YRESOLUTION tags (DPI) in the TIFF file.

Existing behavior (PACKBITS compression, DPI tags left at default) is preserved if the options string is not set.
"
2011-05-26 16:26:50 +00:00
Robert Osfield
909a4d1603 Fixed default setting of texture_no_tile to match the flags seet in lib3ds_material.cpp initialize_texture_map(..). 2011-05-26 16:19:54 +00:00
Robert Osfield
0a1ecd3272 From Oliver Neumann,
"I checked your solution and found one missing point which makes it still produce the tif error:
The very first seek_set on the empty stream with zero offset."

"This means that the empty stream is seeked again resulting in the fail bit to be set. Your code does not check this case, furthermore you use t_off instead of std::ostream::streampos for the tellp() calls. In this special case (empty stream) tellp() returns -1 which is cast to 0xFFFFFFFFFF as t_off is unsigned. I suggest this addition to your code (within the switch statement)"
2011-05-26 16:16:11 +00:00
Robert Osfield
d137c26191 From Bradley Anderegg, "Ok, I am re-submitting this with the changes we discussed. That is, there is a default implementation of osgDB::Archive::getDirectoryContents() that uses getFileNames(), and the osgDB::ArchiveExtended header was removed as it is now unnecessary.
Here is a quick list of the modified files:

Archive - getDirectoryContents() no longer pure virtual
Archive.cpp - default getDirectoryContents() implementation
unzip.cpp - modified to fix a bug where the same file will not load twice in a row
ZipArchive.h / ZipArchive.cpp - extends osgDB::Archive and provides support for random access loading within a .zip file
ReaderWriterZip.cpp - modified to use the ZipArchive class"
2011-05-25 12:41:49 +00:00
Robert Osfield
e0f4fa453c Removed now redundent local implementation of getDirectoryContexts() 2011-05-25 09:13:26 +00:00
Robert Osfield
76b6cd6fa3 From Bradley Anderegg, "Ok, I am re-submitting this with the changes we discussed. That is, there is a default implementation of osgDB::Archive::getDirectoryContents() that uses getFileNames(), and the osgDB::ArchiveExtended header was removed as it is now unnecessary.
Here is a quick list of the modified files:

Archive - getDirectoryContents() no longer pure virtual
Archive.cpp - default getDirectoryContents() implementation
unzip.cpp - modified to fix a bug where the same file will not load twice in a row
ZipArchive.h / ZipArchive.cpp - extends osgDB::Archive and provides support for random access loading within a .zip file
ReaderWriterZip.cpp - modified to use the ZipArchive class"
2011-05-25 09:04:44 +00:00
Robert Osfield
ec00c25274 Removed unused numX, numY member variables, and added initializer for firstHeaderWrite. 2011-05-23 16:58:49 +00:00
Robert Osfield
c44ef1bfd9 From Sukender, I wrapped my change about non-empty texture units in an off-by-default option, so that it doesn't break any existing code. But AFAIK, other readers (except OSGx) generate contiguous texture units, so I guess this option to be useful for users.
Other changes in this sumbission include the added ability to tessellate polygons in Collada reader, with appropriate options.
 - No tessellation
 - Tessellate as triangle fan (previous behaviour, kept as default for backward-compatibility)
 - Full tessellation

I also put auto_ptr<> for RAII of DAE structure (as discussed), and moved reader options in a structure, as for the writer.

Code also make use of osgDB::ExternalFileWriter I submitted, so please merge this submission after the PluginImageWriter one.
2011-05-16 10:07:20 +00:00
Robert Osfield
c4dff10cb4 From Wang Rui, build fix 2011-05-15 08:27:04 +00:00
Robert Osfield
fe1c75aa8a Fixed handling of Font implementations that don't handle multiple font resolutions. 2011-05-13 19:08:04 +00:00
Robert Osfield
460f433ca7 Improved the size, advance and bearing settings 2011-05-13 11:20:48 +00:00
Robert Osfield
77057d06ab Warning and build fixes 2011-05-12 18:52:18 +00:00
Robert Osfield
5cbe74fbc1 From Sukender, ported across to use the new osgDB::ExternalFileWriter 2011-05-12 14:07:15 +00:00
Robert Osfield
3a4ff98883 Added setting of size. 2011-05-12 10:10:49 +00:00
Robert Osfield
3d300c38d0 Fixed Coverity reported issue
CID 11441: Non-array delete for scalars (DELETE_ARRAY)
"_dwobj::readOpenings(_iobuf *, int)" allocates "obj.fc1". [show details]

"_dwobj::~_dwobj()" uses delete on "obj.fc1" which is an array. It should be deleted with operator delete[]. [show details]
2011-05-06 10:28:24 +00:00
Robert Osfield
07bed106af Fixed Covertiy reported issues.
CID 11394: Resource leak in object (CTOR_DTOR_LEAK)
Allocating memory by calling "new osg::IntArray".
Assigning: "this->colorindices" = "new osg::IntArray".
The constructor allocates field "colorindices" of "struct vertexInfo" but there is no destructor.

CID 11395: Resource leak in object (CTOR_DTOR_LEAK)
Allocating memory by calling "new osg::IntArray".
Assigning: "this->coordindices" = "new osg::IntArray".
The constructor allocates field "coordindices" of "struct vertexInfo" but there is no destructor.

CID 11396: Resource leak in object (CTOR_DTOR_LEAK)
Allocating memory by calling "new osg::IntArray".
Assigning: "this->normindices" = "new osg::IntArray".
The constructor allocates field "normindices" of "struct vertexInfo" but there is no destructor.

CID 11397: Resource leak in object (CTOR_DTOR_LEAK)
Allocating memory by calling "new osg::IntArray".
Assigning: "this->txindices" = "new osg::IntArray".
The constructor allocates field "txindices" of "struct vertexInfo" but there is no destructor.

CID 11398: Resource leak in object (CTOR_DTOR_LEAK)
Allocating memory by calling "new osg::Vec2Array".
Assigning: "this->txcoords" = "new osg::Vec2Array".
The constructor allocates field "txcoords" of "struct vertexInfo" but there is no destructor.

CID 11399: Resource leak in object (CTOR_DTOR_LEAK)
Allocating memory by calling "new osg::Vec3Array".
Assigning: "this->norms" = "new osg::Vec3Array".
The constructor allocates field "norms" of "struct vertexInfo" but there is no destructor.

CID 11400: Resource leak in object (CTOR_DTOR_LEAK)
Allocating memory by calling "new osg::Vec3Array".
Assigning: "this->coords" = "new osg::Vec3Array".
The constructor allocates field "coords" of "struct vertexInfo" but there is no destructor.

CID 11401: Resource leak in object (CTOR_DTOR_LEAK)
Allocating memory by calling "new osg::Vec4Array".
Assigning: "this->colors" = "new osg::Vec4Array".
The constructor allocates field "colors" of "struct vertexInfo" but there is no destructor.

CID 11402: Resource leak in object (CTOR_DTOR_LEAK)
Allocating memory by calling "new osg::Vec4Array".
Assigning: "this->polycols" = "new osg::Vec4Array".
The constructor allocates field "polycols" of "struct vertexInfo" but there is no destructor.
2011-05-06 10:27:59 +00:00
Robert Osfield
31aa1cdfee Fixed Coverity reported issues.
CID 11389: Resource leak in object (CTOR_DTOR_LEAK)
Allocating memory by calling "new bsp::VBSPData".
Assigning: "this->bsp_data" = "new bsp::VBSPData".
The constructor allocates field "bsp_data" of "struct bsp::VBSPReader" but the destructor and whatever functions it calls do not free it.
2011-05-06 09:20:06 +00:00
Robert Osfield
67c12b14b0 Fixed Coverity reported issues by using ref_ptr<> for object.
ID 11390: Resource leak in object (CTOR_DTOR_LEAK)
Allocating memory by calling "new osg::Vec3Array".
Assigning: "this->vertices" = "new osg::Vec3Array".
The constructor allocates field "vertices" of "struct prims" but the destructor and whatever functions it calls do not free it.

CID 11391: Resource leak in object (CTOR_DTOR_LEAK)
Allocating memory by calling "new osg::Vec3Array".
Assigning: "this->normals" = "new osg::Vec3Array".
The constructor allocates field "normals" of "struct prims" but the destructor and whatever functions it calls do not free it.

CID 11392: Resource leak in object (CTOR_DTOR_LEAK)
Allocating memory by calling "new osg::Vec3Array".
Assigning: "this->txc" = "new osg::Vec3Array".
The constructor allocates field "txc" of "struct prims" but the destructor and whatever functions it calls do not free it.

CID 11393: Resource leak in object (CTOR_DTOR_LEAK)
Allocating memory by calling "new osg::Vec3Array".
Assigning: "this->txcoords" = "new osg::Vec3Array".
The constructor allocates field "txcoords" of "struct prims" but the destructor and whatever functions it calls do not free it.

CID 11747: Uninitialized pointer field (UNINIT_CTOR)
Non-static class member gset is not initialized in this constructor nor in any functions that it calls.
2011-05-06 09:19:27 +00:00
Robert Osfield
bf9cc20ef0 Fixed Coverity reported issue.
CID 11845: Structurally dead code (UNREACHABLE)
This code cannot be reached: "<temporary>.basic_string("");".
2011-05-05 12:40:03 +00:00
Robert Osfield
b0f6783631 Fixed Coverity reported issue.
CID 11855: Use after free (USE_AFTER_FREE)
"operator delete[](void *)" frees "buffer".
2011-05-05 12:39:35 +00:00
Robert Osfield
9a8edde316 Fixed Coverity reported issue. This fix addresses a memory leak.
CID 11847: Unused pointer value (UNUSED_VALUE)
Pointer "node" returned by "lib3ds_node_new(LIB3DS_NODE_CAMERA)" is never used.
2011-05-05 12:38:48 +00:00
Robert Osfield
f0b0a8788b Fixed warning 2011-05-05 11:31:12 +00:00
Robert Osfield
69e205b8a1 Fixed Coverity reported issue.
CID 11864: Wrapper object use after free (WRAPPER_ESCAPE)
Assigning: "szFilename" = "path.c_str()", which extracts wrapped state from local "path".
2011-05-05 11:27:34 +00:00
Robert Osfield
ee9db5e5ba Fixed 4 Coverity reported issues
CID 11851: Unused pointer value (UNUSED_VALUE)
Pointer "gfd" returned by "gr->getField(26)" is never used.

CID 11850: Unused pointer value (UNUSED_VALUE)
Pointer "gfd" returned by "gr->getField(80)" is never used.

CID 11849: Unused pointer value (UNUSED_VALUE)
Pointer "gfd" returned by "gr->getField(3)" is never used.

CID 11848: Unused pointer value (UNUSED_VALUE)
Pointer "gfd" returned by "grec->getField(3)" is never used.
2011-05-05 10:31:34 +00:00
Michael PLATINGS
c7814cf50a Updated to use FBX SDK 2012.1 2011-05-03 09:11:04 +00:00
Robert Osfield
b78ad29429 Improved the handling of different combinations of slashes and dirNames. 2011-04-29 16:50:45 +00:00
Robert Osfield
b4353c1a8e Added following methods to osgDB::Archive in support of work by Fradley Anderegg on .zip archive support:
/** Get the file name which represents the archived file.*/
       virtual std::string getArchiveFileName() const = 0;

       /** return type of file. */
       virtual FileType getFileType(const std::string& filename) const = 0;

       /** return the contents of a directory.
       * returns an empty array on any error.*/
       virtual DirectoryContents getDirectoryContents(const std::string& dirName) const = 0;

Added implementations of these new methods into src/osgPlugins/osga/OSGA_Archive.h src/osgPlugins/osga/OSGA_Archive.cpp
2011-04-29 16:34:26 +00:00
Robert Osfield
fb09d0e553 Refactored the libtiffOStreamSeekProc function so that it extendeds the stream when the
requested file position is beyond the current end of the stream.  This fix addresses
a bug that occurred when writting to a streamstream.
2011-04-29 14:31:45 +00:00
Robert Osfield
9a4c277592 Fixed Coverity reported issue.
CID 11636: Allocation size mismatch (SIZECHECK)
"my_alloc(sizeof (struct PlyProperty) /*36*/ * elem->nprops, 1292, "..\\..\\..\\..\\src\\osgPlugins\\ply\\plyfile.cpp")" allocates memory. [show details]
Allocating a multiple of 36 bytes to pointer "other->props", which needs 8 bytes.
2011-04-27 16:00:32 +00:00
Robert Osfield
c19fcd6d44 Fixed 3 Coverity Low Impact performance issues relating to "Big parameter passed by value". 2011-04-26 19:29:22 +00:00
Robert Osfield
a793958836 From Johannes Baeuerele, "I have extended the pvr reader plugin to support etc1 compression(GL_ETC1_RGB8_OES). The changes attached to this submission are based on today's trunk.
The pvr format which can be used as a wrapper for different compressed and uncompressed formats supports this compression algorithm. The original pvr compression uses the pvrtc format. The handling of pvrtc is already implemented in the pvr plugin. PVR provides wrapper functionality for some formats, e.g. etc or even dxt/dds.

Our target system (gles2) is able to use the etc compression format. With minor changes in the submitted files, there is no need to write a separate plugin. However the original pvr texture compression formats are not supported on our target, which is the reason for this extension.

The changes mainly consist in the definition on new enum values in the classes and headers of ReaderWriterPVR,Image and Texture. I also found some locations where the handling of the original pvr textures was not implemented. These are also part of this submission."
2011-04-21 17:04:50 +00:00
Robert Osfield
cd44e63b90 From Cedric Pinson, "I have tried some model that produces crashes in the dae plugin because
of empty node:

if (GetFloat4Param(cot->getParam()->getRef(), f4)) {...}

in the model I have tested cot->getParam()->getRef() return 0x0 and make
it crahes inside GetFloat4Param.

I have added a test before calling GetFloat4Param
if (cot->getParam()->getRef() != 0 &&
GetFloat4Param(cot->getParam()->getRef(), f4)) {...}
"
2011-04-21 12:12:40 +00:00
Robert Osfield
63cfbadc95 From Guillaume Taze, "This is a fix for the error popups which appeared when reading a corrupted file on windows. Errors are redirected to std::err instead."
Note from Robert Osfield, changed jpeg error report output from stderr to standard OSG notification system using OSG_WARN.
2011-04-20 17:15:58 +00:00
Robert Osfield
f564926570 From Magnus Kessler, "A few minor fixes in the documentation strings of ReaderWriterFLT.cpp" 2011-04-19 14:19:06 +00:00
Robert Osfield
2648723c83 Cleaned up DXT1 support 2011-04-14 15:22:43 +00:00
Robert Osfield
7c004aeebc Added osgDB::Option string entries:
supportsOption("dds_dxt1_rgb","set the pixel format of DXT1 encoded images to be RGB");
        supportsOption("dds_dxt1_rgba","set the pixel format of DXT1 encoded images to be RGBA");
        supportsOption("dds_dxt1_detect_rgba","For DXT1 encode images set the pixel format according to presence of transparent pixels.");

And set the default not to modify and detect the RGB or RGBA pixel format for DXT images.
2011-04-14 10:44:37 +00:00
Robert Osfield
fc38d5b6e7 Added setting of the internal texture format 2011-04-14 09:16:09 +00:00
Robert Osfield
76445d07b0 quitened down debug output 2011-04-13 19:28:30 +00:00
Robert Osfield
b1692f1f31 Introduced new code for detecting DXT1 images catogoriesed as RGB that actually have a 1 bit alpha,
therefore re-interpreting these as RGBA.
2011-04-13 19:26:35 +00:00
Robert Osfield
e7e860b742 Added support for explitly requesting DXT1a and DXT1c compression 2011-04-11 19:11:25 +00:00
Robert Osfield
5625c0cd8b Added m4v as a handled movie file extension 2011-03-23 14:01:58 +00:00
Robert Osfield
f4110a7d84 Improved handling of RGB data. 2011-03-21 21:28:02 +00:00
Robert Osfield
923b658e65 Adde an isFileADicom(..) method to enable the loader to automatically identifier dicom files without making any assumptions about the file extension 2011-03-18 12:21:58 +00:00
Robert Osfield
6b67320190 Added support for new SampleDensityWhenMovingProperty into .p3d format, with it default to 0.02.
One can override this value via the sampleDensityWhenMoving="value" property in the volume tag, i.e.

         <volume sampleDensityWhenMoving="0.01">CardiacCT</volume>

To switch the feature off set the value to 0, i.e.

         <volume sampleDensityWhenMoving="0">CardiacCT</volume>
2011-03-17 17:33:02 +00:00
Robert Osfield
256da4879e Added hud and billboard support to image, stereo_image, pdf, browser and vnc image placement 2011-03-16 10:51:42 +00:00
Robert Osfield
f2ce2f19a9 Added support hud property for title, bullets and paragraph tags 2011-03-15 19:54:57 +00:00
Robert Osfield
bdd4a67d7c From Sukender, "Fixed a case where getUniqueName() does not work properly" 2011-03-15 14:04:50 +00:00
Robert Osfield
52ff51e0eb Implemented billboard="on" option for image, bullet and paragraph tags 2011-03-14 21:36:32 +00:00
Robert Osfield
74cf1168e0 Added support for placing comments at end of each line. 2011-03-14 11:29:08 +00:00
Robert Osfield
9da669cbd8 From Sukender, "Added support for texcoords scale and offset (UV scaling and offset in Lib3DS Materials), for texture unit 0." 2011-03-11 11:25:19 +00:00
Robert Osfield
8995824aa4 From Jan Peciva,
"please, find attached updates to Inventor plugin:

- improved transparency
- do not treat 32-bit textures as transparent textures unless they really
contain transparent pixels
- error messages forwarded to osg::notify"
2011-03-09 15:55:35 +00:00
Robert Osfield
7640e9535d From Sukender, "1. Made code a bit more readable/cleaner.
2. Removed unecessary code. Also made sure the images names are not truncated in the middle of an UTF8 character. You'll find there a function called utf8TruncateBytes(), which may be moved in core OSG (osgDB/ConvertUTF I guess). Feel free to do it if you feel it that way.
"
2011-03-09 14:44:14 +00:00
Robert Osfield
b91741b421 From Eric Sokolowsky, "I have updated the pnm plugin to use streams instead of C-style I/O. Attached is src/osgPlugins/pnm/ReaderWriterPNM.cpp" 2011-03-09 13:10:38 +00:00
Robert Osfield
eff5fdbe40 Removed the repeated called to jas_init() and jas_image_clearfmts() calls to make it possible to use the reading multi-threaded 2011-03-09 12:15:39 +00:00
Robert Osfield
651a7845fc From Sukender, "I fixed the writing but never thought about the reading part...
Here is the fix for reading path containing %23 (= '#') characters."
2011-03-09 11:13:12 +00:00
Robert Osfield
b24353b12c From Rafa Gaitan and Jorge Izquierdo, build support for Android NDK.
"- In order to build against GLES1 we execute:
$ mkdir build_android_gles1
$ cd build_android_gles1
$ cmake .. -DOSG_BUILD_PLATFORM_ANDROID=ON -DDYNAMIC_OPENTHREADS=OFF
-DDYNAMIC_OPENSCENEGRAPH=OFF -DANDROID_NDK=<path_to_android_ndk>/
-DOSG_GLES1_AVAILABLE=ON -DOSG_GL1_AVAILABLE=OFF
-DOSG_GL2_AVAILABLE=OFF -DOSG_GL_DISPLAYLISTS_AVAILABLE=OFF -DJ=2
-DOSG_CPP_EXCEPTIONS_AVAILABLE=OFF
$ make
 If all is correct you will have and static OSG inside:
build_android_gles1/bin/ndk/local/armeabi.

- GLES2 is not tested/proved, but I think it could be possible build
it with the correct cmake flags.
- The flag -DJ=2 is used to pass to the ndk-build the number of
processors to speed up the building.
- make install is not yet supported."
2011-03-08 16:35:37 +00:00
Robert Osfield
454e2df32b Fixed handling of write and reading of straight Node objects in the scene graph. 2011-02-26 16:04:34 +00:00
Robert Osfield
d88a6af8c1 Changed the handling of unkown nodes on write so that the code now ignores the non supported nodes allows the overall write to continue. 2011-02-26 15:52:51 +00:00
Robert Osfield
bff1ada14b Changed the handling of erroneous dicom files so that the loading of a directory of dicom files is not abondonded when one or more erroneous files are encountered. 2011-02-22 10:53:58 +00:00
Robert Osfield
cdb0f277a4 Added missing Terrain.h reference 2011-02-21 10:02:53 +00:00
Michael PLATINGS
caa9ef591e Disabled the RGB components of the opacity texture 2011-02-18 11:04:01 +00:00
Robert Osfield
83954e3f52 From Philipp Svehla, "We’ve added support for users to override the default values for child elements in asset tags (for the collada writer). This support was added for the following child elements:
- contributor

        - author

        - authoring_tool

        - comments

        - copyright

        - source_data

   - created

   - keywords

   - modified

   - revision

   - subject

   - title

   - unit

        - name

        - meter

   - up_axis



With this support, users are able to include additional information in their models.  Additionally, tools such as sketchup that support asset tags use the values appropriately within their imported models."
2011-02-14 16:24:12 +00:00
Robert Osfield
059a7c052d From Tim Moore, "This patch fixes some performance problems with the DXF loader. It removes some unnecessary copies of vertex coordinates (which were causing an exponential explosion). It also replaces BIND_PER_PRIMITIVE normals with BIND_PER_VERTEX so that the resulting geometry will be on the fast path." 2011-02-14 16:09:51 +00:00
Robert Osfield
c7bf98cca9 From Jan Peciva, "Improvements:
- Use OSG routines to load images instead of simage library (removes
dependency on 3rdParty simage library). Applies to Coin Inventor clone only.
"
2011-02-14 15:04:40 +00:00
Robert Osfield
3128c8063e From Sukender, "Here are two sumbissions for DAE.
1. daeRGeometry.cpp (rev 12132). A tiny sumbission which fixes a quite important bug: a parameter was forgotten in Collada ReaderWriter, and texture coordinates could not be loaded properly. So:
"
Added missing paramter when calling createGeometryData(). Fixes missing texture coordinates (in "bind_vertex_input").
"

2. ReaderWriterDAE.cpp (rev 12132):
"
Added "baseImageDir" as a plugin string data, in order to manually specify base directory to use when relativising image file names. This is used to properly write files, when images are not located in a subdirectory (like "../images" for some software).
"
2011-02-14 14:16:58 +00:00
Robert Osfield
310a28dbee From Martin von Gagern, build fix for latest ffmpeg changes 2011-02-10 12:23:18 +00:00
Michael PLATINGS
dcf3187745 Updated information about the FBX SDK version 2011-02-02 16:44:21 +00:00
Robert Osfield
b4eaccc3c2 From Per Fahlberg, warning fixes 2011-01-28 11:07:51 +00:00
Robert Osfield
523b77ee8f From Ulrich Hertlien, "the changes from r12126 (see below) in dae/domSourceReader.h cause compiler errors on OS X
with gcc-4.2.1:

In file included from
/Users/uli/Projects/osg/OpenSceneGraph/src/osgPlugins/dae/daeRAnimations.cpp:3:
/Users/uli/Projects/osg/OpenSceneGraph/src/osgPlugins/dae/domSourceReader.h:43: error:
explicit specialization in non-namespace scope 'class osgDAE::domSourceReader'
/Users/uli/Projects/osg/OpenSceneGraph/src/osgPlugins/dae/domSourceReader.h:45: error:
explicit specialization in non-namespace scope 'class osgDAE::domSourceReader'
/Users/uli/Projects/osg/OpenSceneGraph/src/osgPlugins/dae/domSourceReader.h:47: error:
explicit specialization in non-namespace scope 'class osgDAE::domSourceReader'
/Users/uli/Projects/osg/OpenSceneGraph/src/osgPlugins/dae/domSourceReader.h:49: error:
explicit specialization in non-namespace scope 'class osgDAE::domSourceReader'
/Users/uli/Projects/osg/OpenSceneGraph/src/osgPlugins/dae/domSourceReader.h:51: error:
explicit specialization in non-namespace scope 'class osgDAE::domSourceReader'
...

The attached file fixes this."
2011-01-28 10:53:49 +00:00
Robert Osfield
278203240b From Sukender, "I found the bug I was chasing! Here is my "twin" submission, from latest trunk rev: 12124.
1. DAE submission:
DAE plugin now correctly writes images URI in Collada file, when images are used twice.
I also greatly improved readability and maintenability of geometry reading (mainly daeRGeometry.cpp), by factorizing code, templatizing it (for double/single precision), and removing ugly macros.

2. osgDB submission:
I updated osgDB::getPathRelative(): it is now far more readable, it handles more cases (especially when you want to relativise "a/c" from "a/b", which results in "../c"), and I added comments to make it clearer to maintain."
2011-01-27 17:12:23 +00:00
Robert Osfield
f9428e9f45 From Mathias Froehlich, build fix for Solaris 2011-01-26 16:45:36 +00:00
Robert Osfield
9bb86b5534 Fixed warnings 2011-01-25 16:48:53 +00:00
Robert Osfield
abea92ee91 From Mathias Froehlich, build fixes 2011-01-24 21:12:25 +00:00
Robert Osfield
71f97cb3bc Added #include to fix build 2011-01-21 14:11:22 +00:00
Robert Osfield
90508f282a From Sukender, "
DAE plugin was linking ORIGINAL images in the Collada file, using image->getName() as a path (even if images were modified in memory!). As the behaviour was not the one of other plugins (3DS, FBX, and such), I made the plugin relativise images filenames (as those plugins) and write the image which is in memory. However, in order to avoid removing features, I kept the previous behaviour but moved it in an option. Here are the options of the plugin I changed:
- daeForceTexture was unclear in this new context and removed in favor of two new options
- daeLinkOriginalTexturesNoForce: Writes reference to the original image if found, instead of writing the image in memory
- daeLinkOriginalTexturesForce: Writes reference to the original image even if not found, instead of writing the image in memory
Of course, if you specify no option, images are written as for other plugins.

Other thing I changed is the UTF8 support as I told you in a previous conversation. Now there is a simple option, "daeNamesUseCodepage", which makes all names except filenames (materials, animation, geometries...) be considered as encoded using current codepage. If so, they'll be converted to UTF8 when writing; else they are written directly. Of course, filenames follow OSG_USE_UTF8_FILENAME as usual.

I did "
2011-01-21 13:40:28 +00:00
Michael PLATINGS
cc207c1112 From Sukender: I had to call code from the FBX plugin (to relativise paths). I thus extracted it from FBX and moved it in osgDB (FileNameUtils) 2011-01-21 12:17:18 +00:00
Robert Osfield
34aca88715 From Simon Julier, "I have been using the ply plugin to read files created by bundler and pmvs2 (http://grail.cs.washington.edu/software/pmvs/). This program generates models in the form of vertices only. However, the existing ply reader implementation was not able to handle the models generated in a satisfactory manner for two reasons:
1. It did not support normals applied to individual vertices.
2. It would only support red / green / blue colour triples, but the pmvs models are generated with diffuse colours. (The PLY format, http://local.wasp.uwa.edu.au/~pbourke/dataformats/ply/, lists specular and ambient colour forms as well.)

To partially overcome these limitations, please find attached modified versions of

src/osgPlugins/ply/vertexData.cpp
src/osgPlugins/ply/vertexData.h

The changes I've made are:

1. I have changed the boolean hasColor flag to a vertexField (which is a boolean operation on an enum) to indicate what fields are present in the ply file. (This is required because Turk's ply reader spits out warnings for every line where you try to read fields which do not exist.)
2. I have modified the code to apply valid normals to either triangles or vertices.
3. I have kludged in "support" for the various colour variants. Specifically, all the colour specified can be read from the file. However, they are all applied in the same way (namely as a colour array, bound to each vertex)."
2011-01-20 12:23:04 +00:00
Robert Osfield
d21009c323 From Simon Julier, "I ran across linking errors with osgdb_exr. Specifically, I found it was necessary to link against libImlIlf, libImlThread, libHalf, libIex and libzip.
I have attached a patch, against the trunk from 13:30 today, which consists of the following:

1. CMakeModules/FindOpenEXR.cmake: Look for libIlmThread and libIex as well. 2. src/osgPlugins/CMakeList.txt: Only include the exr subdirectory if both the OpenEXR and zip libraries were found. 3. src/osgPlugins/exr/CMakeLists.txt: Add ZIP_LIBRARY to TARGET_EXTERNAL_LIBRARIES."
2011-01-19 10:57:58 +00:00
Robert Osfield
6fb5387473 From Sukender, normalized option names 2011-01-19 10:38:39 +00:00
Robert Osfield
fc32aa4918 From Sukender, "Added ability for writer to read from Vec3/4d/f. Plugin now warns if it finds another type of data" 2011-01-19 10:31:49 +00:00
Robert Osfield
975aea4a2b From Sukender, "Factorized the depth loop ("while ( lastDepth >= _nodePath.size() )...") into a method called updateCurrentDaeNode(). Added missing calls into apply(osg::LightSource &) and daeWriter::apply(osg::Camera &) and daeWriter::apply(osg::CameraView &)" 2011-01-19 09:53:34 +00:00
Robert Osfield
0ed6049390 From Sukender, "Fixed ReaderWriterDAE::ConvertFilePathToColladaCompatibleURI(): It now handles paths containing '#' character as expected." 2011-01-19 09:36:21 +00:00
Robert Osfield
45f2b29a77 From Sukender and Robert Osfield, clean up of options 2011-01-19 09:34:26 +00:00
Robert Osfield
2b3bba8587 From Guy Volckaert, "Changes to the openflight plugin to support replacing double sided polygons by 2 opposite facing polygons. This is sometimes required to resolved lighting and intersection issues. A new import option was was added to activate this feature called "replaceDoubleSidedPolys". 2011-01-14 14:30:19 +00:00
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