Commit Graph

8505 Commits

Author SHA1 Message Date
Robert Osfield
ecbe4b1058 From Farshild Laskari, "The vertex shader for the point stateset of PrecipitationEffect was not properly computing the clip vertex. It needed to apply a modelview transformation to the clip vertex. Attached is the fix." 2012-03-06 10:33:20 +00:00
Robert Osfield
fd97a9a800 From Chuck Seberino, "Here is a fix for the RotateCylinderDragger. This patch fixes the case where the picking direction is close to the cylinder axis. The current behavior is this:
* If the eyepoint and cylinder axis are close to parallel (given some tolerance), then it uses a plane perpendicular to the cylinder axis.
* Otherwise it uses a plane parallel to the cylinder axis oriented towards the eyepoint (previous behavior).  This gives decent behavior and is the only path that was taken in the previous code.   I kept with previous behavior and that allowed a good bit of code to be removed, simplifying things.  There is now no need for the _onCylinder flag, but since there is a public accessor, I wasn't sure how to handle it for backwards compatibility, so I left it in.  NOTE - there is no default initialized value, so if it is kept in, it should be set to 'false' to keep same behavior as before.  I am not quite sure how the _onCylinder case was supposed to behave as even forcing that path gave undesirable behavior, even with carefully controlled dragging.
"
2012-03-06 10:08:49 +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
33e7857af9 From Guillaume Millet, "When using the texture Atlas builder, it will convert from REPEAT to
CLAMP all textures using only texcoord between [-0.001 1.001] to give a
chance to create an Atlas.
If the atlas creation failed for other reason (texture size, only one
compatible texture, ...) the texture remain modified in CLAMP mode.

But if you use texcoords between [0.0 1.0] using CLAMP mode instead
REPEAT it is not safe because you will have a blend to the border color
at extremities.
If we want to have exactly the same rendering after changing mode from
REPEAT to CLAMP we should use the CLAMP_TO_EDGE mode instead of CLAMP to
avoid blending to border color at extremities.

Please find as attachment the proposed patch against latest svn version.
"
2012-02-28 12:03:48 +00:00
Robert Osfield
84ca21655e Added build problem with using float Matrix. 2012-02-28 11:37:09 +00:00
Robert Osfield
11c9ec4f7d From Thomas Hogarth, build fix for IOS build 2012-02-28 10:21:21 +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
c3fb8dc714 Added support for using glGenerateMipmap instead of GL_GENERATE_MIPMAP_SGIS on GLES2 2012-02-24 12:15:15 +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
b4155dd817 Moved the
state.applyTextureMode(0,GL_TEXTURE_2D,osg::StateAttribute::ON);

into the #if defined(OSG_GL_FIXED_FUNCTION_AVAILABLE) block to solve problems under GLES and GL3.x/GL4.x
2012-02-23 17:51:40 +00:00
Robert Osfield
6d351ba237 From Mathieu Marache, "I was trying to play with the configuratiion files from the data but
couldn't load them with osgviewer's -c CLI switch, this correction
should make the alias work :-)
"
2012-02-23 15:55:30 +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
caceb94db8 From Miha Ravsel, "While trying to create my custom serializer class, i created some dummy data which accidentally popped-up bug in InputStream readObjectFields function.
Bug description:
 Let's say we have class A
namespace Bug
{
class A : public osg::Object
{
public:
  //...
  typedef std::vector<osg::ref_ptr<A> > AList;

protected:
  AList _alist;
  //...
}
}

REGISTER_OBJECT_WRAPPER( A,
                        new Bug::A,
                        Bug::A,
                        "osg::Object Bug::A" )
{
       ADD_LIST_SERIALIZER(A,Bug::A::AList);
}


Bug:
We create say 3 instances of class A: A1,A2,A3 and then we add A2 and A3 and A1 as child instances of A1 so we get next structure:
A1
 |- A2,A3,A1

we call osgDB::writeObjectFile(A1,"/data/a.osgt") -> saved correctly( third element in list is saved as unique id that references parentClass

now we call
A1 = osgDB::readObjectFile("/data/a.osgt");

Everything is deserialized correctely except last element in list which should be same instance as parent A1.

The attached code resolves this issue by passing UniqueID in readObjectFields method and saving object in _identifierMap as soon as we have valid object instance so we can make reference to parent object from any child instance.
"
2012-02-22 10:46:35 +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
0b88ad24b2 From Olaf Flebbe, "Macos X cleanup:
I added AFAIK proper defaults for several Macos X Version API targets.

* In order to determine which defaults to apply, consult the  CMAKE_OSX_SYSROOT variable pointing to the used SDK, not the pure existence of an SDK.

* Defaults are now:
10.7: Support Intel 32 and 64 Bit Cocoa with imageio picture reader
10.6 + 10.5: Support Cocoa with imageio on Intel and PowerPC
10.4: Carbon, Quicktime and PowerPC

Now OSG compiles out of the box for MacOSX  10.7. , tested with gcc and clang with FlightGear."
2012-02-21 11:30:07 +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
67ce0d5244 Fixed erroneous use #if !defined(OSG_GLES1_FEATURES) && !defined(OSG_GLES2_FEATURES) which should have been #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) 2012-02-21 10:38:12 +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
acb48db89e From Farshid Lashkari, "I've attached a small optimization to osgDB::Registry::removeExpiredObjectsInCache that removes the expired items while iterating over the cache, instead of saving to a temporary vector and then removing." 2012-02-20 12:23:36 +00:00
Robert Osfield
041dd7a871 From Riccardo Corsi, Added passing of EventVisitor pointer to event handlers. 2012-02-20 12:18:50 +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
48b9b25805 From Johannes Baeurele, "The osg::Image class now contains a 'supportsTextureSubloading()' method that is used inside the Texture2D::apply method. For now it only checks for the etc1 format in which case it returns 'false'. All other formats lead to a return value of 'true'.
Without the change the application does not work properly. First I get the notification that an OpenGL error occured. After some more of this error messages I see broken textures on the screen. With the changes attached to this message my application works as intended."

Note from Robert Osfield, changed the Image::supportsTextureSubloading() to be const and to be implemented in the .cpp rather than inline.
2012-02-20 12:03:14 +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
d393604846 From Stephan Huber, "
Here's another small submission for IOS, which adds unique ids to the
touchpoints, so the ids stay the same during a touch-sequence.

(and some minor code enhancements)"
2012-02-10 17:24:08 +00:00
Robert Osfield
4457d2a145 From Colin McDonald, "Upgrading to OpenSceneGraph 3.0.1, texture mip mapping stopped
working on some junk low-end graphics cards which I still have to
support.  They worked ok with osg 2.8 and earlier.

The problem turned out to be with gl proxy textures, which are
unreliable on those devices.  Proxy textures are used by the glu
mipmap build routines to determine if a texture size is
supported. The external glu library had a nice fallback
behaviour, so that if proxy textures didn't work then the mipmap
texture was still created.  But in the work on the new embedded
glu routines that fallback behaviour has been inadvertently
lost.  I have restored the fallback in
src/osg/glu/libutil/mipmap.cpp.  It doesn't add any extra
complexity."
2012-02-10 17:20:43 +00:00
Robert Osfield
d507a54456 From Domenico Mangieri, "Implementation for MoveRight and MoveUp methods in FirstPersonManipulator is missing.
I'm using the manipulator, so I added it."
2012-02-10 16:12:28 +00:00
Robert Osfield
bd81dd5ff8 From Stephan Huber, attached you'll find a compile fix for the new introduced rowlength-feature on IOS/OpenGL ES builds 2012-02-10 15:57:51 +00:00
Robert Osfield
9b6e10ddf0 From Torben Dannhauer, "Modification to osgfilecache: Now source data can also be local.:
find attached my modifications to osgfilecache.

It now allows also the caching of LOCAL terrain databases. In combination with the extends and level cmd parameter it allows to extract parts of terrain databases and write it in a new "Sub database".
I also modified osgDB::FileCache to create correct filenames if the data source is local."
2012-02-09 17:52:13 +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
5743d30dc1 From Olaf Flebbe, "there are two ocurrences where pointer to bool is mixed with bool. Fixes warnings on MacOSX with llvm.
diff --git a/src/osg/State.cpp b/src/osg/State.cpp
index 0b88d63..2137bbd 100644
--- a/src/osg/State.cpp
+++ b/src/osg/State.cpp
@@ -109,7 +109,7 @@ State::State():
        }
    }

-    _abortRenderingPtr = false;
+    _abortRenderingPtr = NULL;

    _checkGLErrors = ONCE_PER_FRAME;

@@ -689,7 +689,7 @@ bool State::getLastAppliedTextureMode(unsigned int unit,Stat

 const StateAttribute* State::getLastAppliedTextureAttribute(unsigned int unit,S
 {
-    if (unit>=_textureAttributeMapList.size()) return false;
+    if (unit>=_textureAttributeMapList.size()) return NULL;
    return getLastAppliedAttribute(_textureAttributeMapList[unit],type,member);
 }

"
2012-02-09 15:54:13 +00:00
Robert Osfield
0a78919807 From Colin McDonald, "The bounding box returned by getBound() for Text which is not
auto-rotated (e.g. HUD text) is not always correct, because it
doesn't take account of the base line offsets added by the
various alignment options such as CENTER_TOP, CENTER_BOTTOM etc.

The attached src/osgText/TextBase.cpp fixes the problem."
2012-02-09 15:08:30 +00:00
Robert Osfield
359fc46757 From Colin McDonald, fix for Solaris build. 2012-02-09 14:40:07 +00:00
Robert Osfield
4935efc1a9 From Filip Arlet,"I ran into problem with osg::Text _BASE_LINE alignment. It didn't account line spacing. Btw. same problem in 3D text
Changed _offset from: -_characterHeight*(_lineCount-1)
to: -_characterHeight*(1.0 + _lineSpacing)*(_lineCount-1)"
2012-02-09 14:33:13 +00:00
Robert Osfield
5f4c155d6b Added back in support for checking the current working directory by default, but now do the check
after the Options and Registry DataFilePathLists have been checked, which will allow users to better control
over where files are searched for.
2012-02-09 14:28:39 +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
ba4dde81bb From Thorsten Brehm, "attached update changes OSG's src/osgDB/Registry.cpp, so it doesn't (accidentally) resolve relative paths against the current working directory when searching for resources. So far, such paths were always resolved against the cwd first.
I guess the previous behaviour of giving the cwd precedence over any path configured in the "database path list" (osgDB::Options) wasn't intentional. Otherwise, if it was intentional after all, it'd be good to add another feature instead, to make this configurable - e.g. a flag in osgDB::Options to disable this, if an application doesn't want the cwd being considered.
"

Note from Robert Osfield, this submission will change the default behaviour of searching for files so can potentially break existing applications as it
won't search the current working direction unless it's included in the DataFilePathList entry in the Options or Registy.  I'll add a follow
up submission to add back in this feature.
2012-02-09 12:50:42 +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
f537ece404 From Leandro Motto Barros,
"I've made a few changes to osgUtil::PolytopeIntersector so that it
actually uses double precision floating point numbers everywhere (as
long as OSG_USE_FLOAT_PLANE is not defined).

I needed double precision intersections in a project I am working on.
These changes fixed the problems I was having -- this is all testing I
have done.

Notice that I have changed
osgUtil::PolytopeIntersector::Intersection's members to use doubles
(osg::Vec3d, instead of osg::Vec3). I could have added #ifdef's there
too, but I think it is better to not change the types of stuff in the
public interface depending on some preprocessor definition.

The modified files are attached. A diff also follows, for those who like it."

With the following changes from Robert Osfield:

"I've just reviewed your changes and have just tweaked them a little to
streamline them.  What I have done in the PolytopeIntersector header
is add:

       typedef osg::Plane::Vec3_type Vec3_type;

And then use this typedef in the definition of the vertices rather
then Vec3d as you did.  Next changes were to PolytopeInteresector.cpp
where to the PolytopeIntersectorUtils defintions of the Vec3_type, and
value_type which now simply read:

   typedef osg::Plane::Vec3_type Vec3_type;
   typedef Vec3_type::value_type value_type;

This way I was able to complete avoid any if def's and have essential
the same implementation as you achieved.  Changes now checked into
svn/trunk."
2012-02-08 10:06:58 +00:00
Robert Osfield
ce4890fa7a From Claus Scheiblauer, "in GraphicsWindowQt.cpp the GLWidget::keyReleaseEvent was implemented slightly different to the GLWidget::keyPressEvent, which caused the cursor keys values to be not correctly mapped from an QKeyEvent value to an osg key value when releasing a cursor key." 2012-02-08 09:34:44 +00:00
Robert Osfield
1432d4d54b Fixed build issues when compile with OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION set to OFF. 2012-02-07 16:14:13 +00:00
Robert Osfield
a9baf19f32 From Alexander Irion, "Added missing format GL_ALPHA to Image::computeFormatDataType()." 2012-02-07 12:37:48 +00:00
Robert Osfield
4d69577228 From Johannes Baeuerle, "The first problem is wrong value of the block size of etc1 textures in the getCompressedSize call in Texture.cpp. With the current block size of 16 the target application crashes with a GL_INVALID_VALUE. The reason is that the calculated size passed to OpenGL does not match the size of the passed data(data pointer,texture width,texture height,spec of etc1).
With a block size of 8 in the getCompressedSize call this error dissapears."
2012-02-07 12:02:04 +00:00
Robert Osfield
52270c9656 From David Fries, "Of the two ways to use the Tessellator object, only
retessellatePolygons was applying the winding and boundary option.
Moved the gluTessProperty calls into beginTessellation().

There's a comment typo fix, removing an unused VertexPointList
typedef, and allocates one _tobj instead of one per tesellation.
Protections were added to check that _tobj was allocated in the few
remaining places it wasn't being checked.

---
On a side note, I would like to avoid the 'new Vec3d' in
Tessellator::addVertex for each call to
gluTessVertex(tess, location, data).
The RedBook leaves it ambiguous if the location pointer must
remain valid after gluTessVertex or not.
http://www.opengl.org/sdk/docs/man/xhtml/gluTessVertex.xml
says that changing location is not safe, so being conservative, I'll
leave it as is, even though the Mesa GLU library copies the data not
the pointer, so it is currently safe."
2012-02-07 11:29:47 +00:00
Robert Osfield
0775483b7c From Lionel Lagarde, "The setNormal method of osg::Billboard has side effects (it calls updateCache and update the normal to Z rotation matrix). When cloning billboards, copying the normal vector is not enough. In the correction, the copy constructor calls setNormal to update the internal members." 2012-02-07 11:21:11 +00:00
Robert Osfield
3ae53557b1 From Wojciech Lewandowski, "This is a one line modification of StatsHandler.cpp to work correctly while dumping states to console when ViewerStats getEarliesFrameNumber() and getLatestFrameNumber() return zeroes. If that happened in current version, printing loop was iterating between 0 and 0xFFFF FFFF indices and that was hanging our system.
"
2012-02-07 10:57:19 +00:00
Robert Osfield
1454e9c760 From Tamer Fahmy, Fix for bug when scrolling down and using render on demand.
"Currently issuing a mouse scroll DOWN event would stop updating
animations in progress.

The fix consists of changing the line
 us.requestContinuousUpdate( false );
to:
 us.requestContinuousUpdate( isAnimating() || _thrown );

in OrbitManipulator::handleMouseWheel() as has been done for the
GUIEventAdapter::SCROLL_UP case a couple of lines earlier or in
src/osgGA/FirstPersonManipulator.cpp."
2012-02-07 10:51:22 +00:00
Robert Osfield
89417ee47f From Rudolf Wiedemann, "the file attached fixes the incomplete implementation of "osg::DefaultUserDataContainer"'s copy constructor.
Copying user objects was missing."

Note from Robert Osfield, in submission changed
    _objectList.push_back((*itr)->clone(copyop));
to
    _objectList.push_back(copyop(*itr));
2012-02-07 10:40:04 +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
251827c994 From Mathias Froehlich, "In Optimizer.cpp a nodes update callback is checked twice and the cull
callback is checked never for the decision of a node being redundant.
The change replaces one of the update callback tests with a cull callback
test."
2012-02-06 13:45:20 +00:00
Robert Osfield
5d50913722 From Mathias Froehlich, "Attached is a change to the stats handler so that the aspect ratio of the
viewer stats coordinates always stay about 1:1 to the pixels.
This helps for more readable stats with very wide windows for example."
2012-02-06 13:40:01 +00:00
Robert Osfield
af01a9e984 From Mathias Froehlich, "The attached change to the default font makes the baseline correctly working
and makes the glyphs aspect ratio match their 12x8 bitmaps.
I am not exactly sure about osgTexts current internals but it matches the
changes that happened lately to the txf font.
"
2012-02-06 13:35:45 +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
2298cc520c From Robert Milharcic, "In attached file I implemented LOAD_IMMEDIATELY mode for new osg ProxyNode wrapper. Current version of proxynode loading uses DatabasePager for both modes(DEFER_LOADING_TO_DATABASE_PAGER and LOAD_IMMEDIATELY).
Immediate loading of external references begins after ProxyNode has been deserialized in ProxyNodeFinishedObjectReadCallback."
2012-02-06 13:27:25 +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
38b17bc5fa From Jan Peciva, "attaching improved StatsVisitor. Changes:
- apply() and reset() methods made virtual to allow overriding
- added apply(StateSet&) to make more easier to gather StateAttribute
statistics in user-derived classes
"
2012-02-06 12:36:25 +00:00
Robert Osfield
6ebe48d6bb Fixed indendation and line endings 2012-02-06 12:29:29 +00:00
Robert Osfield
db49c23944 From Brad Christiansen, "The attached files add the ability to control when a paged child becomes eligible for expiry based on time and/or elapsed frames.
I found that some of the items that had been paged in were being expired on the first frame that they were not visible (as the cache was full). This resulted in excessive paging every time the view was moved. With the following changes I could only allow children to be expired if they had not been used for e.g. 30 seconds or 60 frames."
2012-02-06 12:06:40 +00:00
Robert Osfield
ae27f1e210 From Alexander Sinditskiy, "looks like GlyphGeometries _glyphGeometries; should be removed because Glyph3D have the same named local variable." 2012-02-06 11:17:12 +00:00
Robert Osfield
0e3de701d9 From Stephan Huber, "attached you'll find a first version of multi-touch-support for OS X (>=
10.6), which will forward all multi-touch events from a trackpad to the
corresponding osgGA-event-structures.

The support is switched off per default, but you can enable multi-touch
support via a new flag for GraphicsWindowCocoa::WindowData or directly
via the GraphicsWindowCocoa-class.

After switching multi-touch-support on, all mouse-events from the
trackpad get ignored, otherwise you'll have multiple events for the same
pointer which is very confusing (as the trackpad reports absolute
movement, and as a mouse relative movement).

I think this is not a problem, as multi-touch-input is a completely
different beast as a mouse, so you'll have to code your own
event-handlers anyway.

While coding this stuff, I asked myself if we should refactor
GUIEventAdapter/EventQueue and assign a specific event-type for
touch-input instead of using PUSH/DRAG/RELEASE. This will make it
clearer how to use the code, but will break the mouse-emulation for the
first touch-point and with that all existing manipulators. What do you
think? I am happy to code the proposed changes.

Additionally I created a small (and ugly) example osgmultitouch which
makes use of the osgGA::MultiTouchTrackballManipulator, shows all
touch-points on a HUD and demonstrates how to get the touchpoints from
an osgGA::GUIEventAdapter.

There's even a small example video here: http://vimeo.com/31611842"
2012-02-03 15:15:37 +00:00
Robert Osfield
85bce8b8ad From Stephan Huber, "attached you'll find a first version of multi-touch-support for OS X (>=
10.6), which will forward all multi-touch events from a trackpad to the
corresponding osgGA-event-structures.

The support is switched off per default, but you can enable multi-touch
support via a new flag for GraphicsWindowCocoa::WindowData or directly
via the GraphicsWindowCocoa-class.

After switching multi-touch-support on, all mouse-events from the
trackpad get ignored, otherwise you'll have multiple events for the same
pointer which is very confusing (as the trackpad reports absolute
movement, and as a mouse relative movement).

I think this is not a problem, as multi-touch-input is a completely
different beast as a mouse, so you'll have to code your own
event-handlers anyway.

While coding this stuff, I asked myself if we should refactor
GUIEventAdapter/EventQueue and assign a specific event-type for
touch-input instead of using PUSH/DRAG/RELEASE. This will make it
clearer how to use the code, but will break the mouse-emulation for the
first touch-point and with that all existing manipulators. What do you
think? I am happy to code the proposed changes.

Additionally I created a small (and ugly) example osgmultitouch which
makes use of the osgGA::MultiTouchTrackballManipulator, shows all
touch-points on a HUD and demonstrates how to get the touchpoints from
an osgGA::GUIEventAdapter.

There's even a small example video here: http://vimeo.com/31611842"
2012-02-03 14:25:08 +00:00
Robert Osfield
e5a16de7d4 Improved handling of archives 2012-02-03 11:10:17 +00:00
Robert Osfield
1ed3833556 From Terry Welsh, improved support for handling archives 2012-02-03 11:09:45 +00:00
Robert Osfield
fe61dcac69 From Colin McDonald, "I have an application with multiple windows. They share GL objects
between the contexts, using the GraphicsContext::Traits sharedContext
and setting the same contextID.

When one of these shared contexts is closed, GraphicsContext::close
deletes all GLObjects for that contextID, regardless of the fact that
they are shared.  This means that all of the other contexts sharing the
objects have to recompile them.

The attached tweak makes GraphicsContext::close a bit less brutal for
shared contexts.  I have also changed a misleading diagnostic message.
"
2012-02-01 17:42:42 +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
487ee0f8e7 Added DraggerTransformCallback::HandleCommandMask to DraggerTransformCallback to allow applications to select which
commands they want the dragger callback to respond to why updating the transform.
2012-02-01 13:55:38 +00:00
Robert Osfield
7664d90504 Improved the handling of osgManipulator::Constraint, DraggerCallbacks and Command so that they now use a Visitor Pattern
to ensure the correct methods on constraints and callbaks are called for each Command.  Also fixed the handling of
Constraints when applied to composite Draggers.
2012-01-31 10:56:52 +00:00
Robert Osfield
a0df35b580 From Stephan Huber, "a recent submission added a 10.6-feature to GraphicsWindowCocoa. I added
some ifdefs around, so it compiles again with 10.5 SDK"
2012-01-26 18:03:26 +00:00
Robert Osfield
eb2e4d313a Quietend down debug message 2012-01-26 14:26:59 +00:00
Robert Osfield
167b6e69e4 From J.P. Delport, "when switching from windowed mode to fullscreen (with the 'f' key) in X11, no RESIZE event is generated. This confuses handlers that perform some processing on the RESIZE event, e.g. the InteractiveImageHandler.
To reproduce the problem I attach a minimally modified osgviewer that just prints resize events. You can check what's printed in the console when you go fullscreen and windowed a few times.

The attached version of GraphicsWindowX11 fixes the problem for me, but I'm not sure this is the right approach. Maybe you can see a fix for the problem clearer.

The only place where the RESIZE event is generated in GraphicsWindowX11 is in CheckEvents and it then depends on the ConfigureNotify message. For some reason, either ConfigureNotify is not sent when going fullscreen or the traits already reflect the latest window size."
2012-01-26 13:08:19 +00:00
Robert Osfield
8ecd0dea87 From J.P. Delport, "this fall-through had me scratching my head for a while...
It made InteractiveImageHandler eat keypresses outside its image."
2012-01-25 17:37:55 +00:00
Robert Osfield
45998e9ce1 From J.P. Delport, "GraphicsWindowX11 typo, I believe X/Y's should match." 2012-01-25 17:35:17 +00:00
Robert Osfield
5feb203d79 From Luc Frauciel, "Ati FirePro is as much crippled as other Ati drivers.
This patch add "FirePro" to the black list of renderers in State.cpp / initializeExtensionProcs

It allows to avoid an OpenGL error on Viewer initialization.
Tested on FirePro  M7740 / Windows7 x64  Driver 8.85.7.2"
2012-01-25 17:31:07 +00:00
Robert Osfield
7fc23467f1 From Tobias Ottenweller, "this is a fix for the problem where all input freezes for a quarter second when calling requestWarpPointer under Mac OS X (described here: http://forum.openscenegraph.org/viewtopic.php?t=3933 ).
I used the latest version available via subversion.

My fix is using some API only available on 10.4 and later. I used some preprocessor statements to gain compatibility with 10.3 and earlier using (now) deprecated API.

Only tested on OS X Lion (10.7). Please do some testing as well since I'm fairly new to OpenSceneGraph. Someone should also test the code for 10.3 and earlier."
2012-01-24 17:49:18 +00:00
Robert Osfield
3c414c7962 Fixed indentation and spaces at ends of lines. 2012-01-24 17:47:04 +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
d350ea5395 Moved setEndBarrierOperation(..) implementation into .cpp and added support for stoppig and starting threading if required. 2012-01-24 17:30:44 +00:00
Robert Osfield
b0b98d49b8 From Paul Martz, Added ViewerBase::s/getEndBarrierOperation(..) method to allow user control of how viewers are sync'd. 2012-01-24 17:21:14 +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
6aa6e9a38c Refactored the click_to_run implementation to avoid bug associated with running the first click_to_run entry in a layer when
subsequent click to run's are called.
2012-01-24 14:27:17 +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
329f98c83b Fixed the return value of SlideEventHandler::selectLayer() so that the 'n' now works correctly. 2012-01-03 15:59:19 +00:00
Robert Osfield
b828f5c083 From Farshid Lashkari, "Attached is a simple fix to osg::Sequence that allows it to load properly with the serializer formats (osgt/osgb). The problem was that the internal _nrepsRemain member was not being initialized properly if the number of repeats was equal to the default value of -1. When the number of repeats is explicitly set using setNumRepeats(), _nrepsRemain is set to the same value. However, in the constructor of osg::Sequence, it was not being initialized to the same value as _nreps. This fix simply changes the initial value of _nrepsRemain to the same as _nreps." 2012-01-02 16:54:05 +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
a53308f7e8 Gunnar Holm, "After upgrading from 2.8.3 to 3.0.1 we experienced a lock in the Mutex
functionality when using Terrain::setVerticalScale. This was caused by
the following call sequence resulting in a lockup:

void Terrain::setVerticalScale(float scale)
  CALLS    dirtyRegisteredTiles();


void Terrain::dirtyRegisteredTiles(int dirtyMask)
 SETS LOCK    OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_mutex);
 and CALLS (on every tile)   setDirtyMask(dirtyMask);


void TerrainTile::setDirtyMask(int dirtyMask)
 CALLS _terrain->updateTerrainTileOnNextFrame(this);


void Terrain::updateTerrainTileOnNextFrame(TerrainTile* terrainTile)
 SETS LOCK   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_mutex);
******* PROBLEM - since lock has already been set! ********


The suggested fix submitted changes from using Mutex to ReentrantMutex.
"
2011-12-23 17:34:07 +00:00
Robert Osfield
c7698c1334 From Aurelien Albert, "I made a modification in the Dragger class :
You can now set a "intersection mask" and it will be used when looking for intersections.

So you can now easily "hide" some objects from manipulators."
2011-12-23 17:21:59 +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
f3ce66aa8b From Glenn Waldron, "Attached is a change to ClusterCullingCallback to make it work properly under an RTT camera with an INHERIT_VIEWPOINT reference frame." 2011-12-23 17:15:06 +00:00
Robert Osfield
dc55068db1 From James Turner, "Testing FlightGear with Cocoa osgViewer, encountered some problems with hiding / re-showing the cursor. Attached version fixes this, by tracking the current cursor value, and ensuring we don't nest calls to [NSCursor hide] or [NSCursor unhide]." 2011-12-23 16:57:34 +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
c9d19d7bff Added handling of an empty filename when writing out an image file. 2011-12-23 12:42:18 +00:00
Robert Osfield
0af31eff5d Removed inappropriate static usage 2011-12-19 16:18:18 +00:00
Robert Osfield
c86e2361d2 Moved the createSpotLightImage function into include/osg/ImageUtils 2011-12-19 09:37:57 +00:00
Robert Osfield
22e309e8fb Created new PerlinNoise class from the Noise.h+Noise.cpp code in the osgshaders example. 2011-12-13 21:12:00 +00:00
Robert Osfield
16c2bb5a2f To fix problems in tight bound computation of the shadow map made the ComputeLightSpaceBounds usage always used when the
CastShadowMask is active.  Changed the ComputeLightSpaceBounds to use just VIEW_FRUSTUM_CULLING.
2011-11-25 12:48:03 +00:00
Robert Osfield
2b2c1b5671 From Jean-Sebastien Guay, fix for handling texture unit >= 8 and negative LigthNum. 2011-11-25 09:24:50 +00:00
Robert Osfield
92ed903a7f Added prelimanary support for parallel split shadow maps into ViewDependentShadowMap. 2011-11-22 21:55:30 +00:00
Robert Osfield
862c1c4af3 Updated built in volume shaders to honour the osg::Matierial setting 2011-11-11 10:36:17 +00:00
Robert Osfield
d13bfb522b Enabled blending for the iso surface rendering to enable fade in/fade out of volume. 2011-11-11 10:25:20 +00:00
Robert Osfield
85418bf7ba Added handling of osgGA::GUIEventAdapter::getMouseYOrientation() in the orientation of mouse y position.
Added updating of properties on both mouse move/drag and keydown.
2011-11-10 15:50:22 +00:00
Robert Osfield
693d79c638 Implement presentation update feature that reloads the presentation on pressing 'u'. 2011-11-04 12:50:05 +00:00
Robert Osfield
e8bae33143 Improved the handling of setStartTick() being called mid app, such as when idirectly called when doing a Viewer::setSceneData().
Improved the setting the the initial event state.
2011-11-04 12:47:24 +00:00
Robert Osfield
0329ca5cea Improved handling of resetting of the EventQueue::startTick(). 2011-11-04 12:45:32 +00:00
Robert Osfield
747654fb6d Added removeFromObjectCache method. 2011-11-04 12:44:01 +00:00
Robert Osfield
3c461dd706 Add check to filter out the return of FILE_NOT_FOUND from archive results to prevent these from prematurely exiting the Registry::read(..) method
bofore it loads plugins to try and load requested file.
2011-11-02 10:57:17 +00:00
Robert Osfield
1bcd36f5ed From Stephan Huber, "A recent commit
(41e23f466d)
for GraphicWindowsIOS.mm broke the compilation for OpenGL ES 1.x as
GL_DEPTH_COMPONENT32_OES is not defined for 1.x. I added a #define-guard."
2011-11-01 13:41:48 +00:00
Robert Osfield
215512647c Added setting of the sampleDensityWhenMovingProperty at the same time as when setting the sampleDensityProperty 2011-11-01 11:08:48 +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
ca582c708d Adding missing checks against View's Camera and SceneData for any update callbacks that need calling. 2011-10-31 15:29:49 +00:00
Robert Osfield
d95801f6a8 Changed the notification level to INFO. 2011-10-28 11:00:55 +00:00
Robert Osfield
bbf081695b Changed the setting of Traits::sampleBuffers so that it's set to 1 when DisplaySettings::getMultiSamples() is set to a non zero value. 2011-10-28 11:00:08 +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
20ffed1fa1 Removed OSX codepath for setting the depth value to 32 as this turned out to be unneccesary. 2011-10-28 09:45:51 +00:00
Robert Osfield
24ff8796d5 Changed the default depth to 24. 2011-10-28 09:11:21 +00:00
Robert Osfield
98d50250ff Updated volume shaders to use the GL_LIGHT 0 values to control the direction of the light source 2011-10-27 16:33:18 +00:00
Robert Osfield
3a64805d20 Reimplement the light direction controls so that they now work correctly with osgViewer::Viewer.
Improved the computation of the light direction from non-dimensional mouse coords so that they now project onto a hemisphere making
the interaction more intuitive.
2011-10-27 13:11:20 +00:00
Robert Osfield
7bcfb3c130 Added support for ignore returns as white space. 2011-10-27 09:24:34 +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
2dc271d85f Added support for 32bit depth buffer 2011-10-25 15:55:33 +00:00
Robert Osfield
4b655d9c46 Added hack of using a 32bit depth buffer default setting for Traits when compiling under Apple. 2011-10-25 15:31:46 +00:00
Robert Osfield
1538ecf113 Fixed handling of slide with no layers. 2011-10-24 11:09:35 +00:00
Robert Osfield
e04ca06fc8 Fixed build of StreamOperator 2011-10-22 09:02:18 +00:00
Robert Osfield
9e903861a2 Fixed handling of Vec3dArray in GLBeginEdnAdapter/ArrayDispatchers. 2011-10-21 15:39:51 +00:00
Robert Osfield
d7cba048f5 Added support for using negative scale_x, scale_y and scale_z values in the <volume> tag to allow presentations to flip the imagery 2011-10-21 11:00:29 +00:00
Robert Osfield
d3cebab9a3 Added flipDepth() method 2011-10-21 10:59:42 +00:00
Robert Osfield
088d00c651 Fixed handling of scale.x, scale.y and scale.z paramters so that all of them now take an effect. 2011-10-21 09:31:56 +00:00
Robert Osfield
6607b373d5 Fixed handling of reading/writing of osgVolume::VolumeTile tiles 2011-10-20 16:49:08 +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
61b2659fab Fixed typo 2011-10-17 15:39:46 +00:00
Robert Osfield
33479c7768 Improvements to the compute near/far 2011-10-17 14:41:49 +00:00
Robert Osfield
bdb0dfe27d Improvements to osgShadow::ViewDependentShadowMap and ShadowSettings 2011-10-17 14:40:29 +00:00
Robert Osfield
d9dbff18a2 Add catch for when shadows are enabled between the update and draw traversals. 2011-10-03 15:57:06 +00:00
Robert Osfield
e8e25e82a9 From Jean-Sebastien Guay, changed the border colour for the shadow map to be 1 rather the 0 used for debugging so that areas outside the shadow map default to being unshadowed rather than shadowed.
changed the shadow map texture assigment to StateSet so that it doesn't use OVERRIDE, enabling subgraphs to use the same texture unit for other textures if they so required.
                          tidied up indentation.
2011-10-03 15:25:16 +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
951a437c0c Fixed handling of ShadowSetting LightNum 2011-10-03 14:56:38 +00:00
Robert Osfield
bb48cef38c Added Font::getVertical(float& ascender, float& descender) methods. 2011-10-03 10:36:18 +00:00
Robert Osfield
db329cf943 Added catch for NaN vertices that were being generated by osgText, these NaN vertices were causing glu tesselation functions to crash. 2011-09-28 11:52:27 +00:00
Robert Osfield
b32d8e0151 Added computation of the extents, in light space, of the shadow maps RenderStage contents and use of this to produce a tighter bound light space projection. 2011-09-28 10:54:30 +00:00
Robert Osfield
12e8d09ed1 Added a half second sleep after calling system command when the command is run in the background so
that this command has a chance to run and open a window before the calling present3D moves on to the next frame.
2011-09-20 11:46:45 +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
845d33b353 Added handling of <!DOCTYPE...> tag and "" options. 2011-09-20 10:01:07 +00:00
Robert Osfield
2c1b6789db From Ulrich Hertlein, "attached is a patch that cleans up compiler warnings and common functionality." 2011-09-19 10:42:54 +00:00
Robert Osfield
e557d4f28b From Wojciech Lewandowski, "There was a bug in reading modifier keys when focus to GraphicsWindowWin32 was restored. Handler of WM_SETFOCUS was reading pressed keys and sending WM_KEYDOWN messages to fill initial keyboard state. But WM_KEYDOWN messages sent had 0 on lParam and adaptKey method computing state of modifier mask was using lParam to find which modifier keys are down. Obviously when lParam was 0 it was not recording proper modifier masks.
This patch fixes this code sending proper lParam and also makes sure LEFT_CONTROL will be not confused with RIGHT_CONTROL."
2011-09-19 10:39:19 +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
6e01f05853 Added removal of [..] from names returned from glGetActiveUniform results to avoid issues with name lookups when the driver add the [..] for uniform arrays. 2011-09-19 10:12:53 +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
c1af863f78 From Morten Hauknes, "I have been using the getLastVisiblePixelCount on pre 3.0 osg. I believe maybe this was a private function that we made public in our side. I use(d) this method to make a simple algorithm to tell how much visible an object was in percent.
So with the 3.0 api change we propose the following change:
- put OSG_EXPORT on the QueryGeometry class so that we get access to the getNumPixels method.
- Create a function called getQueryGeometry that returns a casted _queryGeode->getDrawable(). Or a function called getQueryGeode that returns _queryGeode."
2011-09-13 13:38:26 +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
64fa6aec43 From Robert Milharcic, "This will hopefully fix some issues with osgQt, more precisely with GLWidget event handling. There are at least two current GL context braking events, QEvent::Hide and QEvent::ParentChange. When running in a multithreaded mode they both try to change current GL context in a wrong thread (main GUI thread). The QEvent::ParentChange is also problematic when running in a single threaded model because Qt is going to release current contex then delete it, and then it will create new one, and as a result the osg will continue to render to an invalid deleted context. This changes workaround above problems by deferring execution of the problematic evens. These events has to be enqueued and executed later. The enqueued event processing is currently done right after swap in a swapBuffersImplementation of GraphicsWindowQt while code is running in a render thread by calling QGLWidget handler directly. In principle the deferred events queue should be executed while in GUI thread but I couldn't find any reliable way to do this, that is without risking a deadlock. For now it is assumed, Qt is not going to execute any GUI thread only operations inside the QGLWidget handler." 2011-09-13 11:09:39 +00:00
Robert Osfield
098bc6df5e From Farshid Lashkari, "
The osgUtil::CullVisitor class will display an OSG_INFO notification when attempting to clamp the projection matrix with invalid near/var values. This usually appears when the scene graph is empty or all objects are culled. I don't think this scenario warrants having this message appear every frame. It makes it very difficult to debug other issues when this notification floods the output window.

I'd prefer to have the notification removed, but there might be legitimate cases where you want this displayed. Instead, I just disabled the output if the near/far values are equal to FLT_MAX (their initial values). This should at least prevent the notification for the common case where everything was culled."
2011-09-13 10:15:07 +00:00
Robert Osfield
408c2a2267 From Paul Martz, "Here's my proposed change regarding the osg-users post "small feature culling threshold". I've updated the comments and brought the default values into agreement, but didn't bother to add the environment variable support." 2011-09-13 09:59:21 +00:00
Robert Osfield
698a284da8 From Sukender, "I added a tiny check to avoid an integer divide-by-zero, when image is invalid (ie. all values are 0)." 2011-09-13 09:46:22 +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
6d1ba5b06d From Farshild Lashkari, "Attached is a simple patch that avoids the depth write pass in Text::renderWithDelayedDepthWrites if the current osg::State object has GL_DEPTH_TEST disabled." 2011-09-13 09:21:07 +00:00
Robert Osfield
43483408f3 Reverted Paul Idstein warning fix as this was breaking the build 2011-09-13 09:17:21 +00:00
Robert Osfield
757d00c3c8 From Ulrich Hertlein, Added some error checks and memory cleanup. 2011-09-12 16:24:08 +00:00
Robert Osfield
cd6e174a5c From Stephan Huber, fixed build for OSX 10.6 and earlier 2011-09-12 16:20:45 +00:00
Robert Osfield
6e6dafcd3e From Luc Frauciel, "When osgUtil::DelaunayTriangulator triangulate() function ends with no triangle generated, it crashes.
This patch fixes that"
2011-09-12 12:26:55 +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
19b8b1f474 From Bob Kuehne, build fix for OSX 10.7 SDK. 2011-09-12 11:24:52 +00:00
Robert Osfield
edd83a03fe From Paul Idstein, warning fixes for OSX 10.7 2011-09-12 11:24:24 +00:00
Robert Osfield
9be4a1a1c8 From Magnus Kessler, typo fixes 2011-09-12 10:52:16 +00:00
Robert Osfield
83524f958e Added handling the ShadowSettings::LightNum for selecting which light to use. 2011-09-07 20:05:25 +00:00
Robert Osfield
b2fd8f4059 Added handling of the case when RenderLeaf::_modelview matrix is NULL, such as when LightPointNode is used in the scene graph. 2011-09-07 16:26:57 +00:00
Robert Osfield
3a79bc343d Moved ViewDependetShadowMap parameter settings into a dedicated ShadowSettings object in prep for making it possible to scale the API to handle multiple lights and multiple shadow maps per light. 2011-09-07 15:55:54 +00:00
Robert Osfield
772c7d75c5 Added setting of the shadow map Camera's name to "ShadowCamera" to improve integration with osgOcean. 2011-09-06 17:26:27 +00:00
Robert Osfield
f83722d62b Added s/getPerspectiveShadowMapCutOffAngle() and use of this when setting up light space to avoid sigularaties when
the light and view directions are co-incident.
2011-09-06 10:12:45 +00:00
Robert Osfield
15ad6eda63 Added support for setting whether ViewDependentShadowMap should provide it's own vertex and fragment shaders. 2011-09-05 12:36:47 +00:00
Robert Osfield
52c2bc3ff5 Added s/getTextureSize() method for setting the shadow map texture size. 2011-09-02 10:16:16 +00:00
Robert Osfield
f476406ae1 Disabled the use of the ReceivesShadowTraversalMask() mask 2011-09-02 07:46:08 +00:00
Robert Osfield
ec3b2ba2d3 Added test line for COMPUTE_NEAR_USING_PRIMITIVES 2011-09-01 18:49:33 +00:00
Robert Osfield
1fd3c84287 Added fine grained computation of the far plane when using the COMPUTE_NEAR_FAR_USING_PRIMITIVES ComputeNearFarMode.
Added COMPUTE_NEAR_FAR_USING_PRIMITIVES option that provides the original functionality where only the near plane
is computed in a fine grained way, with the far plane being computed simply from bound volumes.
2011-09-01 18:48:21 +00:00
Robert Osfield
b21d206d3a From Tony Horrobin, build fix 2011-08-29 16:01:02 +00:00
Robert Osfield
47db350da1 Added fallback base texture 2011-08-29 10:26:05 +00:00
Robert Osfield
2d71a390d3 Added support for setting the MinimumShadowMapNearFarRatio. 2011-08-29 09:59:47 +00:00
Robert Osfield
771075084b Fixed bug in computaton of the min/max x/z ratios. 2011-08-26 15:40:09 +00:00
Robert Osfield
0f14f53698 Added releaseGLObjects/resizeGLObjectBuffers support 2011-08-26 10:52:25 +00:00
Robert Osfield
966981f100 Improved the handling of depth partitioning and orthographic datasets 2011-08-25 17:21:38 +00:00
Robert Osfield
0d3169f645 Added support for user defined setting of the shadow texture unit 2011-08-24 19:38:58 +00:00
Robert Osfield
26e2106636 Changed new ViewDependentShadowMap to default to a perspective shadow map with automatic detection of a spot light/perspetive light projection
matrix to prevent inappropriate usage of perspective shadow map.
2011-08-24 13:57:15 +00:00
Robert Osfield
622cfb524c Imorovements to the new perspective/lispsm style shadow implementation. 2011-08-24 12:32:03 +00:00
Robert Osfield
3db0557ed5 Quitened down and fixed warning 2011-08-24 12:31:35 +00:00
Robert Osfield
3a70830e89 Quitended down debug messages and added passing of RenderStage to LispSM code 2011-08-19 12:42:51 +00:00
Robert Osfield
7c4fb17298 Improved the LispSM computation 2011-08-19 10:43:38 +00:00
Robert Osfield
36fea2bd60 Changed the local variable near/far type 2011-08-19 10:43:15 +00:00
Robert Osfield
c71a0c72e4 Added back in control of the backface culling. 2011-08-17 17:06:55 +00:00
Robert Osfield
1d54065646 intermin check-in of work on new LispSM implementation 2011-08-17 16:09:17 +00:00
Robert Osfield
04ffdf1801 Added missing assignement of _simulationTime. 2011-08-15 14:37:16 +00:00
Robert Osfield
1625f61812 From Paul Martz, "Recent changes to osgShadow on trunk were apparently not yet tested with ref_ptr implicit casting disabled. Attached is a fix. " 2011-08-13 19:09:58 +00:00
Robert Osfield
b15317481c Added public interface for selecting use of perspective and light space perspective shadow maps. Implementation
of backends not implemented yet so will follow.
2011-08-12 20:29:14 +00:00
Robert Osfield
6b7175baac Implemented first pass at shaders for new ViewDepedentShadow map class 2011-08-12 14:53:40 +00:00
Robert Osfield
675a61ea87 Implemented ViewDependentShadowMap::setDebugDraw(bool) to allow osgshadow to enable/disable the debug display via the
standard --debugHUD option.
2011-08-09 15:57:37 +00:00
Robert Osfield
c14516d5f6 Changed RTT Camera to use depth. 2011-08-09 15:20:25 +00:00
Robert Osfield
4aa16bc8e3 Implemented caching of Camera, Texture and TexGen 2011-08-09 13:39:57 +00:00
Robert Osfield
e4a73d121e Added replacement of the placeholder StateSet in the StateGraph with custom StateSet implemented just for the
needs of that particular frame.
2011-08-09 06:54:44 +00:00
Robert Osfield
4238629ebf Further work on basic ViewDependentShadowMaps, adding implementation of RTT camera and texgen setup. 2011-08-08 17:00:55 +00:00
Robert Osfield
cbb6f1c92c Preliminary work on new ViewDependentShadowMap base class 2011-08-07 15:51:54 +00:00
Robert Osfield
ceb8d62636 Commented out the colorAmbientEmissive += gl_FrontLightProduct[0].ambient; line from the fragment shader as it was
causing problems with the shadowed region being sporadically lit when using a spotlight.
2011-07-29 11:22:32 +00:00
Robert Osfield
164cd6e9b9 Fixed comment on end barrier position. 2011-07-29 07:42:55 +00:00
Robert Osfield
ed27e55b60 Improved handling of the scaling of dicom imagery. 2011-07-28 16:40:28 +00:00
Robert Osfield
3abbba693c Refectored the EGL setup so that it's honours the Traits values. 2011-07-28 12:07:22 +00:00
Robert Osfield
dcaf9b02ce Reverted the change to the default setting of _resizeNonPowerOfTwoHint back to true for all platforms to ensure the
same behaivour across platforms, something that can be achieved now thanks to the integrated GLU library.

Corrected the default of the ResizeNonPowerOfTwoHint to true to reflect the actual default setting set by the
Texture default constructor.
2011-07-28 11:05:10 +00:00
Robert Osfield
27cc718251 From Johannes Baeuerle, "in the file src/osgDB/ObjectWrapper.cpp, where the GlobalLookupTable for gl enums for serialization purposes is defined, some of the compressed texture formats are missing. I added enums for the pvr and etc formats." 2011-07-28 08:19:29 +00:00
Robert Osfield
302c5a7e92 From Jason Beverage, "Here is a small fix for getCameraContainingPosition. getXMin was
being used in a case where getYMin should be used instead."
2011-07-28 07:46:05 +00:00
Robert Osfield
35ccc1efa5 Fixed stats bug where not all stats fields were being collected by the cull_draw() method used in the SingleThreaded and CullDrawThreadPerContext threading models. 2011-07-25 17:07:56 +00:00
Robert Osfield
8d77126e2e From Alexander Irion, "Texture borders are not supported in ES.
_isTextureBorderClampSupported is set to "TRUE" in Texture.cpp, because of the version number check (GL VERSION >= 1.3).

This leads to an invalid enum error, when GL_TEXTURE_BORDER_COLOR is tried to set.
"
2011-07-22 09:27:41 +00:00
Robert Osfield
6128300bc5 In the RecordCameraPathhandler fixed the handling of pressing 'Z' before 'z' which was causing the view
to be reset to 0,0,0 by AnimationPathManipualtor with an empty AnimationPath.
2011-07-22 08:25:29 +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
f07a1a91c8 From Claus Scheiblauer, fixed handling of horizontal mouse wheel events. 2011-07-20 10:17:19 +00:00
Robert Osfield
1838707627 Introduced workaround for problem of text that is scaled in screen coords, but hasn't been rendered yet
so doesn't have knowledge of screen space yet, so assume that scaling is 1 rather than 0 as was previously
assumed in the previous handling of screen space text.
2011-07-20 09:10:32 +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
eed9e9f7e1 Fixed memory growth issue when using Texture2D::SubloadCallbacks that don't set the TextureObjects sizes. 2011-06-25 11:00:33 +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
f68c2246fc From Martin Innus, fixed erroneous change of INTEGER to UNKNOWN, reverting back to INTEGER. 2011-06-24 13:35:20 +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
0a48e99a25 From Ulrich Hertlein, "While we're on osgSim/ShapeAttribute, here's a fix that fixes the 'UNKNOW' typo and some
doxygen"
2011-06-24 08:32:25 +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
8e2857905f Fixed warnings generated by clang,
src/osgAnimation/Skeleton.cpp:25:87: warning: addition of default argument on redeclaration makes this constructor a copy constructor [-Wdefault-arg-special-member]
Skeleton::UpdateSkeleton::UpdateSkeleton(const UpdateSkeleton& us, const osg::CopyOp& copyop= osg::CopyOp::SHALLOW_COPY) : osg::Object(us, copyop), osg::NodeCallback(us, copyop)

/src/OpenThreads/pthreads/PThread.cpp:1024:15: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
    if (cpunum<0) return -1;

src/osgDB/ExternalFileWriter.cpp:221:122: warning: expression result unused [-Wunused-value]
    _objects.insert(ObjectsSet::value_type(&obj, ObjectData(absoluteDestinationPath, relativeDestinationPath, written))).first;

src/osgManipulator/Dragger.cpp:175:18: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
        if (*itr = constraint) return;

src/osgManipulator/Dragger.cpp:187:18: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
        if (*itr = constraint)
2011-06-23 19:58:52 +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
c617ea0163 Fixed virtual method mismtaches between subclasses and parent classes. 2011-06-23 16:36:36 +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
5ee864ff25 From Dimi Christopoulos, "I attach a fixed version of mipmap.cpp which produced a lot of warning on my gcc
compiler."
2011-06-23 09:22:23 +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
6783dcff17 Fixed regression in --run-on-demand feature 2011-06-22 09:12:12 +00:00
Robert Osfield
99b9eff9f4 Removed assert() that always evaluated to true. 2011-06-21 17:26:40 +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
90a88488d3 Disabled VisualStudio warning warning C4611: interaction between '_setjmp' and C++ object destruction is non-portable 2011-06-21 09:00:01 +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
0392efafea Added catch for window manager doesn't set the window size to full screen. 2011-06-20 11:25:52 +00:00
Robert Osfield
0ff97d1350 Added check against Traits::overrideRedirct to prevent the fullscreen workaround being run when overrideRedirect
is on as overrideRedirect switches off the window managers ability to manage the fullscreen so the problem doesn't
need working around.
2011-06-20 09:28:39 +00:00
Robert Osfield
47146017ae Introduced a workaround for fullscreen toggle issues under modern X11 window managers. 2011-06-20 09:22:57 +00:00
Robert Osfield
8c37336fdc Added sleep before window resizing to make it less likely that the previous frames rendering traversal is still
running when the window(s) is resized, something that creates what looks like a glitch in rendering.
2011-06-20 09:20:39 +00:00
Robert Osfield
c6f4c26e31 Added extern "C" to fix build issues under OSX 2011-06-17 12:57:31 +00:00
Robert Osfield
9fee243b36 Updated OpenThreads version number for stable release 2011-06-17 11:02:40 +00:00
Robert Osfield
fde8b03b5c From Jan Peciva, "sending updated version of StencilTwoSided.
It supports now even GL_ATI_separate_stencil extension and there are more
OSG_INFOs to see, which API is used."
2011-06-17 09:05:48 +00:00
Robert Osfield
6881983562 Added GLES version checks to prevent build problems under GLES1 and GLES2 2011-06-17 08:47:36 +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
5a7f0b1f7d From Ulrich Hertlein, "the OS X/Cocoa implementation logs some debug junk on every key stroke. The attached
patch removes this."
2011-06-17 08:26:51 +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
d970b9fa5f Added support for new InternalTextureFormatModes 2011-06-16 18:25:46 +00:00
Robert Osfield
7821968342 Added wider file extension support to ExternalFileWriter::generateObjectName 2011-06-16 18:12:55 +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
27d4d5e4b9 From John Cummings, "While testing recent OSG developer releases and the subversion trunk, I
have noticed that on my 64-bit Linux machines, all of the OSG libraries
get installed into the "lib64" directory as I would expect. However, the
OpenThreads library gets installed into the "lib" directory when
selecting "Build OpenThreads with Qt threading support." That is, with
the BUILD_OPENTHREADS_WITH_QT set to ON.

I am attaching the a fix for this issue in the file:

src/OpenThreads/qt/CMakeLists.txt

It simply adds ${LIB_POSTFIX} to the destination as in done with all
other CMakeLists.txt with libraries in OSG. I have tested it on both
32-bit and 64-bit Linux."
2011-06-16 16:00:33 +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
17b9cfad02 Improved the handling of compiling vs flushing deleted objects 2011-06-15 18:31:11 +00:00
Robert Osfield
e36f239917 Changed the key handling code to use EventQueue::getTime() rather then the theEvent timestamp. 2011-06-15 17:00:44 +00:00
Robert Osfield
f1c7e81eb3 Fixed blitting of FBO's with multiple render targets. 2011-06-15 09:36:34 +00:00
Robert Osfield
b6a15b2ef8 Added support osg::State::drawQuad(..) for number of vertices in quads to uint range rather than just ushort range. 2011-06-14 15:48:27 +00:00
Robert Osfield
5b3eed5dce Fixed issue with events having a negative delta of time between them. 2011-06-14 12:44:44 +00:00
Robert Osfield
6a6c5bccda Added GLBufferObject::computeBufferAlignment(..) method to enable buffer entries to be aligned along specified buffer alignment boundaries, currently defaulting to 4. 2011-06-14 10:15:12 +00:00
Robert Osfield
529ea4c94f From Stephan Huber, "attached you'll find a fix for the non-working useCursor()-method for
Windows. With the old code you can switch off the cursor, but not back on."
2011-06-14 09:16:44 +00:00
Robert Osfield
e1f5597167 Removed executable permission. 2011-06-14 09:11:58 +00:00
Robert Osfield
7f05605c16 Fixed wild card search when wild card filename includes a path. 2011-06-13 15:20:48 +00:00
Robert Osfield
c034333400 From Jeremy Moles, fixed style == operator. 2011-06-13 08:52:11 +00:00
Robert Osfield
0dbb4004d7 From Stephan Huber, build fix for IOS 2011-06-13 08:45:25 +00:00
Robert Osfield
22bc0391c7 Refactored the UserDataContainer so that the osg::UserDataContainer is now a pure virtual base class,
with a osg::DefaultUserDataContainer subclassed from this.  The user object access methods have now all
been moved from osg::Object into the UserDataContainer class, except for the set/getUserData() methods
that are left in osg::Object for backwards compatibility, and the description list access methods have
been moved back into osg::Node.

main UserObject access methods are now all def
2011-06-09 12:57:14 +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
2ddd53730e From Mathias Froehlich, "The attached patch adds the polygon primitive to the TangentSpace computation.
As far as I understand, this should just work for the polygon as well as with
the tristrip primitive.
"
2011-06-09 11:05:36 +00:00
Robert Osfield
86439123b4 Added support for creating a 3D Image from an image list.
Added support for reading a list of images in the Present3D <volume> tag.
2011-06-08 16:10:46 +00:00
Robert Osfield
973a9dee09 Introduced a less conservative near ratio. 2011-06-08 09:24:50 +00:00
Robert Osfield
9aa7010ded Added support for reading .osg, .osgb, .osgx, .osgt and .ive models that contain volumes from within the volume tag. 2011-06-07 20:24:49 +00:00
Robert Osfield
537272b98f Added support for .osgt, .osgb and .osgx plugins to osgvolume example 2011-06-07 16:17:35 +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
7f9a6aa49d Added ability to subclass from osg::Object to provide custom user data functionality. A new UserDataContainer provides the
default implementation of the user data functionality.
2011-06-07 13:02:20 +00:00
Robert Osfield
848ec5e770 Added the return of the index position of the added UserObject 2011-06-07 09:28:38 +00:00
Robert Osfield
71a961ccc3 Added support for searching for user objects from a given startPosition in the UserDataContainer object. 2011-06-07 08:53:03 +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
985fdc8965 Added support for using the sampleDensityWhenMoving tag with all techniques 2011-06-03 13:47:59 +00:00
Robert Osfield
deed0a89fe Added extra check to make sure that _userDataContainer was available before copying it 2011-06-02 22:49:29 +00:00
Robert Osfield
b5d00a1450 Added support for new osg::Object user objects. 2011-06-02 22:05:10 +00:00
Robert Osfield
c703f39459 Introduced new user object support into osg::Object that allows assignment of a list of user objects to an osg::Object.
Refactored original UserData and Descriptions strings to be managed alongside the new user object suppport within
a single osg::Object::UserDataContainer.
2011-06-02 22:04:08 +00:00
Robert Osfield
2e03f53778 Added ref_ptr<> usage to avoid possible memory leak. 2011-06-02 20:38:13 +00:00
Robert Osfield
594b4bf873 From Dimi Christop, build fix for RHEL 4. 2011-05-30 13:02:13 +00:00
Robert Osfield
0201480582 Added closing of the _eventDisplay on failure of initializing the context properly. 2011-05-30 09:26:24 +00:00
Robert Osfield
4d09574ccd Fixed X11 related crash that occured when GraphicsWindow::setCursor was called right after viewer.realize();
The fix was to simply move the setting of the thread that has done the makeCurrent to right before the makeCurrent()
rather than right after.
2011-05-30 09:25:11 +00:00
Robert Osfield
60eaa68122 From Terry Welsh, "I was having a small culling problem with osgText... new TextBase.cpp that fixes it." 2011-05-30 08:24:34 +00:00
Robert Osfield
40fd093fb1 Reverted part of revision r12294 that introduced threading related problems under X11 due to checking the _display
Display member variable assigned to the graphics thread from the main thread.
2011-05-27 16:04:18 +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
fcd3150b12 From Laurens Voerman, "While working on the osg exporter for 3dsmax I found a bug in the TriStripVisitor. I created a small example (attached), and a modified version of
src\osgUtil\TriStripVisitor.cpp where the problem is removed."
2011-05-27 09:00:53 +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
e3f7d802e4 Form Jorge Ciges, improved GL version detection code. 2011-05-26 16:52:08 +00:00
Robert Osfield
3fa1f2ed5a From Dietmar Funck, "I've noticed an issue when writing arrays of type Vec2D and Vec3D to a .osgb file. A number is written to the output stream to identify the array type. In case of Vec2D and Vec3D arrays Vec4D is written as array type - I guess this is a copy and paste mistake.
Writing the correct array types fixes the issue - in my case it fixes writing and afterwards reading geometry instances."
2011-05-26 16:34:33 +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
52146aa1b6 Fixed handling of changes in gl buffer object size so that when a gl buffer object is resized all the buffer data
is recompiled.
2011-05-26 15:47:20 +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
bf7759829e From Olaf Flebbe, fixes for OSX AGL build 2011-05-25 09:34:02 +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
51a9e63c55 From Olaf Flebbe, "build out-of-the box on MacOSX. The default windowing system is carbon and it needs the AGL OpenGL Windowing binding framework, which is missing. osgViewer does not link therefore. Cocoa does not use AGL.
The fix adds the AGL Framework to the Carbon link line for osgViewer"
2011-05-24 13:05:44 +00:00
Robert Osfield
245e023164 Fixed Coverity issues.
CID 11669: Uninitialized pointer field (UNINIT_CTOR)
Non-static class member _glAttachShader is not initialized in this constructor nor in any functions that it calls.
Non-static class member _glBindAttribLocation is not initialized in this constructor nor in any functions that it calls.
...


CID 11699: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _areTessellationShadersSupported is not initialized in this constructor nor in any functions that it calls.
2011-05-24 10:20:36 +00:00
Robert Osfield
6ce53fb7b0 Fixed Coverity issue.
CID 12328: Resource leak (RESOURCE_LEAK)
Calling allocation function "osg::KdTree::cloneType() const". (The virtual call resolves to "osg::Object * osg::KdTree::cloneType() const".) [show details]
Failing to save storage allocated by "this->_kdTreePrototype->cloneType()" leaks it.
2011-05-24 10:19:22 +00:00
Robert Osfield
e7ee4c1f79 Fixed Coverity issue.
CID 11692: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _allocationMode is not initialized in this constructor nor in any functions that it calls.
2011-05-24 10:18:47 +00:00
Robert Osfield
65d2ddd325 Fixed Coverity issue.
CID 11668: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _primitiveMode is not initialized in this constructor nor in any functions that it calls.
2011-05-24 10:18:05 +00:00
Robert Osfield
3357cc0717 Fixed 3 Coverity issues.
CID 11697: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _type is not initialized in this constructor nor in any functions that it calls.

CID 11698: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _type is not initialized in this constructor nor in any functions that it calls.

CID 12329: Resource leak (RESOURCE_LEAK)
Calling allocation function "osg::Object::clone(osg::CopyOp const &) const". (The virtual call resolves to "osg::Object * GDALPlugin::DataSetLayer::clone(osg::CopyOp const &) const".) [show details]
Failing to save storage allocated by "this->getVertexArray()->clone(struct osg::CopyOp const(128U))" leaks it.
2011-05-24 10:16:12 +00:00
Robert Osfield
da058c0ffa Fixed Coverity issue.
CID 11696: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _simulationTime is not initialized in this constructor nor in any functions that it calls.
2011-05-24 10:15:39 +00:00
Robert Osfield
f2674b2911 Fixed Coverity issue.
CID 11695: Uninitialized pointer field (UNINIT_CTOR)
Non-static class member _ximpl is not initialized in this constructor nor in any functions that it calls.
2011-05-24 10:15:17 +00:00
Robert Osfield
930f3e4974 Fixed Coverity issue.
CID 11694: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _isARBOcclusionQuerySupported is not initialized in this constructor nor in any functions that it calls.
2011-05-24 10:14:45 +00:00
Robert Osfield
fa11d7b6fa Fixed Coverity issue.
CID 11691: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _isPBOSupported is not initialized in this constructor nor in any functions that it calls.
Non-static class member _isUniformBufferObjectSupported is not initialized in this constructor nor in any functions that it calls.
2011-05-24 10:13:07 +00:00
Robert Osfield
1b6700b4c7 Fixed build error 2011-05-24 10:08:40 +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
335bcf66f8 Uppded the default acceleration as it was too slow for reasonable sized models 2011-05-19 13:25:03 +00:00
Robert Osfield
1d1d3ab50b From Sukender, "There was a stupid parameter inversion in ExternalFileWriter.cpp.
Sorry for this. Here is the fix."
2011-05-17 12:57:46 +00:00
Robert Osfield
d4eceb0b90 From Wang Rui, added close button hint 2011-05-17 09:21:32 +00:00
Robert Osfield
cd2eaf2826 From Stephan Huber, "proposed changes allows the user to add a osgGraphicsWindowIOS as an
UIView, respecting the sizes via GraphicsContext::Traits.
This helps users, who want to integrate osg into an existing ios-app
with multiple UIViews. Additinally a view-controller gets only created
if needed, set IGNORE_ORIENTATION via the WindowData-struct.
"
2011-05-16 12:44:39 +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
a287d85585 From Jan Peciva, I have improved GraphicsWindowQt:
- renamed osgQt::GraphWidget to osgQt::GLWidget
as it better fits to Qt naming (osgQt::GLWidget is derived from QGLWidget
while recent GraphWidget... it is unclear, maybe QGraphicsView,
QGraphicsScene,....)
- added the code to properly manage ON_DEMAND rendering scheme
(involves osgQt::setViewer() and internal HeartBeat class)
- added forward key events functionality. It allows to not eat the key events
by GLWidget, but it forwards them to Qt processing as well.
- destroying GLWidget before GraphicsWindowQt and vice versa does not crash
the application
- it is possible to request particular QGLFormat in GLWidget constructor
- added QtWindowingSystem class
- multithread OSG rendering improvements/fixes

--

From Robert Osfield, added back in getGraphWidget() method for backwards compatibility.
2011-05-16 09:06:06 +00:00
Robert Osfield
0875b19ab8 Fixed traling spaces 2011-05-16 08:59:10 +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
066a1f6e72 From Sukender, new ExternalFileWriter helper class that helps the management of writing out external files to disk
avoid writing out of duplicates.
2011-05-12 13:27:14 +00:00
Robert Osfield
b380387f53 From Sukender, "Here is a tiny fix which adds missing virtual methods in osgUtil::TransformAttributeFunctor, to handle Vec3d." 2011-05-12 13:12:07 +00:00
Robert Osfield
48dad2d171 From Rene Molenaar, "I have found a problem regarding manifest in the plugins,
see http://www.openscenegraph.org/projects/osg/browser/OpenSceneGraph/trunk/src/CMakeLists.txt
the option OSG_MSVC_GENERATE_PLUGINS_AND_WRAPPERS_MANIFESTS is set to ON only after the subdirectories are added,
this causes /MANIFEST:NO while the option is ON after the first configure, generate.

if this option is moved (i.e. above the ADD_SUBDIRECTORY statement) results are as expected.

attached you will find the correct CMakeLists.txt
"
2011-05-12 11:45:29 +00:00
Robert Osfield
3a4ff98883 Added setting of size. 2011-05-12 10:10:49 +00:00
Robert Osfield
74dab1fe8d Fixed Coverity reported issue.
CID 11812: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _lastFrameUsed is not initialized in this constructor nor in any functions that it calls.
Non-static class member _s is not initialized in this constructor nor in any functions that it calls.
Non-static class member _t is not initialized in this constructor nor in any functions that it calls.
2011-05-09 10:54:50 +00:00
Robert Osfield
07a29e39e0 Fixed Coverity reported issue.
CID 11813: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _endian is not initialized in this constructor nor in any functions that it calls.
2011-05-09 10:54:10 +00:00
Robert Osfield
01b80e4f66 Fixed Coverity reported issue.
CID 11814: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _updateCamera is not initialized in this constructor nor in any functions that it calls.
2011-05-09 10:53:38 +00:00
Robert Osfield
5b0ab95e41 Fixed 6 Coverity reported issues.
CID 11820: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _azAngle is not initialized in this constructor nor in any functions that it calls.
Non-static class member _elevAngle is not initialized in this constructor nor in any functions that it calls.

CID 11819: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _BoundaryAngle is not initialized in this constructor nor in any functions that it calls.
Non-static class member _planeOrientation is not initialized in this constructor nor in any functions that it calls.

CID 11818: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _BoundaryAngle is not initialized in this constructor nor in any functions that it calls.
Non-static class member _planeOrientation is not initialized in this constructor nor in any functions that it calls.

CID 11817: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _distance is not initialized in this constructor nor in any functions that it calls.

CID 11817: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _distance is not initialized in this constructor nor in any functions that it calls.

CID 11816: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _leftRightSurfaces is not initialized in this constructor nor in any functions that it calls.
2011-05-09 10:52:34 +00:00
Robert Osfield
7b4d44b2f5 Fixed 2 Coverty reported issues.
CID 11821: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _traversalNumber is not initialized in this constructor nor in any functions that it calls.

CID 11822: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _traversalNumber is not initialized in this constructor nor in any functions that it calls.
2011-05-09 10:51:52 +00:00
Robert Osfield
b4b88e9549 Added osg::ref_ptr<osgDB::Archive> osgDB::Registry::getRefFromArchiveCache() and osg::ref_ptr<osgDB::Object> osgDB::Registry::getRefFromObjectCache(). 2011-05-06 16:46:13 +00:00
Robert Osfield
7eda51abd2 Fixed Coverity reported issue.
CID 11838: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _alphaFuncKey is not initialized in this constructor nor in any functions that it calls.
Non-static class member _cyleBackwardKey is not initialized in this constructor nor in any functions that it calls.
Non-static class member _cyleForwardKey is not initialized in this constructor nor in any functions that it calls.
Non-static class member _sampleDensityKey is not initialized in this constructor nor in any functions that it calls.
Non-static class member _transparencyKey is not initialized in this constructor nor in any functions that it calls.
Non-static class member _updateAlphaCutOff is not initialized in this constructor nor in any functions that it calls.
Non-static class member _updateSampleDensity is not initialized in this constructor nor in any functions that it calls.
Non-static class member _updateTransparency is not initialized in this constructor nor in any functions that it calls.
2011-05-06 12:27:19 +00:00
Robert Osfield
b37a58e051 Fixed Coverity reported issue.
CID 11827: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _plane_mask is not initialized in this constructor nor in any functions that it calls.
2011-05-06 12:26:13 +00:00
Robert Osfield
21ca6a0475 Fixed Coverity reported issue.
CID 11826: Uninitialized scalar field (UNINIT_CTOR)
Class member declaration for _recordHeightsAsAttributes.
2011-05-06 12:25:34 +00:00
Robert Osfield
24974462f6 Fixed Coverity reported issue.
CID 11830: Uninitialized pointer field (UNINIT_CTOR)
Non-static class member _geometry is not initialized in this constructor nor in any functions that it calls.
2011-05-06 12:25:02 +00:00
Robert Osfield
c5c2080dd3 Fixed Coverity reported issue.
CID 11825: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _primitiveIndex is not initialized in this constructor nor in any functions that it calls.
Non-static class member _ratio is not initialized in this constructor nor in any functions that it calls.

CID 11824: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _hit is not initialized in this constructor nor in any functions that it calls.
Non-static class member _index is not initialized in this constructor nor in any functions that it calls.
Non-static class member _length is not initialized in this constructor nor in any functions that it calls.
Non-static class member _ratio is not initialized in this constructor nor in any functions that it calls.
2011-05-06 12:24:19 +00:00
Robert Osfield
ea29adba87 Fixed Coverity reported issue.
CID 11829: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _primitiveMode is not initialized in this constructor nor in any functions that it calls.
2011-05-06 12:23:45 +00:00
Robert Osfield
456d351a33 Fixed Coverity reported issue.
CID 11831: Uninitialized pointer field (UNINIT_CTOR)
Non-static class member _context is not initialized in this constructor nor in any functions that it calls.
Non-static class member _dc is not initialized in this constructor nor in any functions that it calls.
Non-static class member _handle is not initialized in this constructor nor in any functions that it calls.
Non-static class member _instance is not initialized in this constructor nor in any functions that it calls.
2011-05-06 12:22:10 +00:00
Robert Osfield
37f63e033a Fixed Coverity reported issue.
CID 11835: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _startTick is not initialized in this constructor nor in any functions that it calls.
2011-05-06 12:21:11 +00:00
Robert Osfield
0e56247cd0 Fixed Coverity reported issues.
CID 11834: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _tickLastUpdated is not initialized in this constructor nor in any functions that it calls.
Non-static class member _tmpText is not initialized in this constructor nor in any functions that it calls.

CID 11833: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _tmpText is not initialized in this constructor nor in any functions that it calls.
2011-05-06 12:20:48 +00:00
Robert Osfield
4f5152152d Fixed Coverity reported issues.
WindowManager.cpp
CID 11841: Uninitialized pointer field (UNINIT_CTOR)
Non-static class member _lastEvent is not initialized in this constructor nor in any functions that it calls.
Non-static class member _lastPush is not initialized in this constructor nor in any functions that it calls.
Non-static class member _view is not initialized in this constructor nor in any functions that it calls.

Frame.cpp
CID 11840: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _flags is not initialized in this constructor nor in any functions that it calls.

Window.cpp
CID 11839: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _index is not initialized in this constructor nor in any functions that it calls.
2011-05-06 10:29:47 +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
e6217e3f82 Fixed Coverity reported issue.
CID 12263: Missing break in switch (MISSING_BREAK)
This case (value 8) is not terminated by a 'break' statement.

CID 12262: Missing break in switch (MISSING_BREAK)
This case (value 7) is not terminated by a 'break' statement.

CID 12261: Missing break in switch (MISSING_BREAK)
This case (value 6) is not terminated by a 'break' statement.
2011-05-06 09:21:40 +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
Robert Osfield
47f1133c25 From Mathias Froehlich, build fix for gcc 4.6 2011-05-04 16:36:35 +00:00
Robert Osfield
da1a354502 From Stephan Huber, "attached you'll find a small enhancement for GraphicsWindowCocoa to
implement the recently introduced setSyncToVBlank-method.

Additionally I added a ToggleSyncToVBlank-eventhandler to osgViewer. I
used it to test the code, perhaps you'll find it useful and include it
in the distribution."
2011-05-04 16:01:21 +00:00
Robert Osfield
f0baf6abba Removed unncessary references to FREETYPE 2011-05-04 09:53:11 +00:00
Robert Osfield
ff99fd07f7 Added OSGVIEWER_EXPORT 2011-05-03 12:43:00 +00:00
Robert Osfield
81a0eed67f Added missing break; 2011-05-03 10:14: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
41eb850578 Fixed Coverity reported issue.
CID 11447: Unchecked dynamic_cast (FORWARD_NULL)
Dynamic cast to pointer "dynamic_cast <struct osg::NodeCallback *>(nc->clone(this))" can return null.
Assigning null: "first" = "dynamic_cast <struct osg::NodeCallback *>(nc->clone(this))".

The clone() implementation is written using macro's so that it always returns the type of Object
being cloned so it's normally safe to assume that a dynamic_cast<> will always return a valid pointer as long
as the new T that involves creates a valid object.  However, if the class being cloned doesn't correctly
implement the clone() method then their potential for the dynamic_cast to fail and will return a NULL and will
result in a memory leak of the object of paraent class that the clone would have defaulted to.

I've tightened up the CopyOp.cpp code to check the return type and added better handling of the clone in the
osg::clone() methods so thay don't have any potential mememory leaks and report warnings to OSG_WARN when
problems are encountered.  It may be more apporpriate to throw an exception so will need to ponder this
issue further.
2011-04-28 16:33:14 +00:00
Robert Osfield
c379431be3 Fixed Coverity reported issue.
CID 11403: Logically dead code (DEADCODE)
After this line, the value of "needspace" is equal to 0.
Assigning: "needspace" = "false".

Technically the report is correct, but the code is just debugging code that was there just in case
the code needed to be reviewed. This code is long since through it's debugging stage so the code
is no longer really worth keeping so I've removed it for cleanness sake.
2011-04-28 10:23:50 +00:00
Robert Osfield
f9d217ea07 Fixed Coverity reported issue.
ID 11667: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _useVertexAttribAlias is not initialized in this constructor nor in any functions that it calls.

Member variable should have been initialized but this varaible will have always been initialized in later code
before it was used anyway so wouldn't have resulted in a runtime bug.
2011-04-28 10:23:28 +00:00
Robert Osfield
bef8dedce0 Fixed Coverity reported issue.
CID 11414: Logically dead code (DEADCODE)
After this line, the value of "vboMemory" is equal to 0.
Assigning: "vboMemory" = "NULL".

Another case of debugging code paths being picked out. I have chosen to just delete these paths as the code
looks to be working fine and less code is better than more code when it comes to maintenance.
2011-04-28 10:22:20 +00:00
Robert Osfield
c32b72e8c5 Fixed Coverity reported issue. Issue is benign as all the member variables are initialized in after construction,
but I've moved this initialization into the constructor to make the code more managable.

CID 11686: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member cnt is not initialized in this constructor nor in any functions that it calls.
Non-static class member maxcnt is not initialized in this constructor nor in any functions that it calls.
Non-static class member phase is not initialized in this constructor nor in any functions that it calls.
2011-04-27 16:37:25 +00:00
Robert Osfield
718fa5b679 Fixed 2 Coverity reported issues. Both issues are benign, but I've addressed then as with the changes the
code is clean and more mantainable.

CID 11676: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member cancelMode is not initialized in this constructor nor in any functions that it calls.
Non-static class member cpunum is not initialized in this constructor nor in any functions that it calls.
Non-static class member detached is not initialized in this constructor nor in any functions that it calls.
Non-static class member isRunning is not initialized in this constructor nor in any functions that it calls.
Non-static class member stackSize is not initialized in this constructor nor in any functions that it calls.
Non-static class member threadPolicy is not initialized in this constructor nor in any functions that it calls.
Non-static class member threadPriority is not initialized in this constructor nor in any functions that it calls.
Non-static class member uniqueId is not initialized in this constructor nor in any functions that it calls.

CID 11564: Unsigned compared against 0 (NO_EFFECT)
This less-than-zero comparison of an unsigned value is never true. "cpunum < 0U".
2011-04-27 16:35:34 +00:00
Robert Osfield
91430e9c54 Fixed Coverity reported issue.
CID 11677: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _minimumNumberAccumAlphaBits is not initialized in this constructor nor in any functions that it calls.
Non-static class member _minimumNumberAccumBlueBits is not initialized in this constructor nor in any functions that it calls.
Non-static class member _minimumNumberAccumGreenBits is not initialized in this constructor nor in any functions that it calls.
Non-static class member _minimumNumberAccumRedBits is not initialized in this constructor nor in any functions that it calls.
2011-04-27 16:06:32 +00:00
Robert Osfield
688b1614ad Fixed Coverity reported issue.
CID 11690: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _frameLastUsed is not initialized in this constructor nor in any functions that it calls.
2011-04-27 16:06:10 +00:00
Robert Osfield
e962eda7d5 Fixed Coverity reported issue.
CID 11689: Uninitialized pointer field (UNINIT_CTOR)
Non-static class member _glBlendColor is not initialized in this constructor nor in any functions that it calls.
2011-04-27 16:05:37 +00:00
Robert Osfield
4751f03529 Fixed 2 Coverity reported issues.
CID 11681: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _previousHeight is not initialized in this constructor nor in any functions that it calls.
Non-static class member _previousWidth is not initialized in this constructor nor in any functions that it calls.

CID 11688: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _previousHeight is not initialized in this constructor nor in any functions that it calls.
Non-static class member _previousWidth is not initialized in this constructor nor in any functions that it calls.
2011-04-27 16:05:13 +00:00
Robert Osfield
7e6f05b864 Fixed Coverity reported issue, in this case it's a unused member variable so could just be deleted.
CID 11687: Uninitialized pointer field (UNINIT_CTOR)
Non-static class member _glBeginEndAdapter is not initialized in this constructor nor in any functions that it calls.
2011-04-27 16:04:37 +00:00
Robert Osfield
d20d2202a4 Fixed 3 Coverity reported issues. CID 11622 is a bit of false positive as for valid settings no leak would happen.
CID 11810: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _setMaxFarDistance is not initialized in this constructor nor in any functions that it calls.

CID 11811: Uninitialized pointer field (UNINIT_CTOR)
Non-static class member _displayTexturesGroupingNode is not initialized in this constructor nor in any functions that it calls.

CID 11622: Resource leak (RESOURCE_LEAK)
Calling allocation function "operator new(unsigned long long)".
Variable "<storage from new>" is not freed or pointed-to in function "osg::StateSet::StateSet()". [show details]
Assigning: "sharedStateSet" = storage returned from "new osg::StateSet".
 282    osg::StateSet* sharedStateSet = new osg::StateSet;
Variable "sharedStateSet" is not freed or pointed-to in function "osg::Object::setDataVariance(osg::Object::DataVariance)". [show details]
2011-04-27 16:03:37 +00:00
Robert Osfield
63ee77a63d Fixed Coverity reported issue.
CID 11588: Resource leak (RESOURCE_LEAK)
Calling allocation function "operator new[](unsigned long long)".
Assigning: "dataPtr" = storage returned from "new unsigned char[newTotalSize]".
2011-04-27 16:02:10 +00:00
Robert Osfield
501008f256 Fixed 2 Coverity reported issues.
Following are both false positives as the the scope they are in will always assign the object to a ref counted
structure.  I've modified the code to use ref_ptr<> to just make it clear that it's underscope, although
this is not strictly neccessary as the code is OK, I introduced this for clarity and robustness in
presence of exceptions.

CID 11586: Resource leak (RESOURCE_LEAK)
Calling allocation function "operator new(unsigned long long)".
Variable "<storage from new>" is not freed or pointed-to in function "osg::VertexBufferObject::VertexBufferObject()". [show details]
Assigning: "vbo" = storage returned from "new osg::VertexBufferObject".


CID 11587: Resource leak (RESOURCE_LEAK)
Calling allocation function "operator new(unsigned long long)".
Variable "<storage from new>" is not freed or pointed-to in function "osg::ElementBufferObject::ElementBufferObject()". [show details]
Assigning: "ebo" = storage returned from "new osg::ElementBufferObject".
2011-04-27 16:01:43 +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
e345a7bacd Fixed 1 Coverity Low Impact issue "Unused pointer value (UNUSED_VALUE)
Pointer "indices" returned by "this->_vertexAttribList[0ULL].indices.get()" is never used."

Report highlighted the fact that later code wasn't using the indices variable when it should have been, so
potentially a higher impact that the severity suggested by Coverity.
2011-04-26 19:31:04 +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
d416ebc78c From Craig Bosma,"Please find attached a fix for shared contexts on OS X, with the Cocoa backend. The NSOpenGLContext* _context member of GraphicsHandleCocoa was never set on successfully creation, so even if the dynamic_cast to GraphicsHandleCocoa succeeds, we get a bogus (NULL) pointer on retrieving the actual NSOpenGLContext* (line 1013).
This should fix the problem, as well as cause GraphicsWindowCocoa to report the correct name "GraphicsWindowCarbon" -> "GraphicsWindowCocoa".
"
2011-04-26 12:05:57 +00:00
Robert Osfield
0d97aab94f From Farshid Lashkari, "I believe their is small error in how OutputStream handles the WriteImageHint. In the "writeImage" method, it converts the WriteImageHint to an internal "decision" flag. During this conversion, it seems to be swapping the behavior for WRITE_EXTERNAL_FILE and WRITE_USE_EXTERNAL. I've attached what I believe to be the correct conversion." 2011-04-26 11:51:21 +00:00
Robert Osfield
8d323fcdea From Mattias Helsing, "Fixes installation of the osgViewer headers that got broken with rev
12208 and 12231.

The windowing system specific headers under
include/osgViewer/api/<system> are again installed under
include/osgViewer/api/<system>

Works in recent ubuntu with cmake-2.8.4 and msvc2010 with cmake-2.8.2"
2011-04-21 17:16:27 +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
634344aef5 From Marius Heise, "here is a patch that implements Win32 HW-synced swapping using wglJoinSwapGroupNV, wglBindSwapBarrierNV and the existing traits. It was tested with multiple ATI FirePro S400 cards.
I also fixed the vsync implementation introduced with rev.11357 that was crashing with the Windows Error #170. So I removed your temporary /* */ around the vsync condition..."
2011-04-21 13:34:03 +00:00
Robert Osfield
02081af4f8 From Fred Smith, "GraphicsWindowWin32::setWindow currently creates a context with no regards to the Traits, like createWindow does.
That is, it calls ::wglCreateContext to create a context, not the member method createContextImplementation(), which takes into an account the Traits.

In my situation, this prevents a GL 3.x context from being created.
"
2011-04-21 13:01:11 +00:00
Robert Osfield
478e0f3ebf From Jorge Ciges, "1rst - Changes in Cmake: They make possible "make install" with the android building.
2nd - Script to use a 3rd party directory with basic libraries: libjpeg,libpng,libtiff,giflib,freetype,curl,gdal.

3rd - Change in the GLES library loading for Android. That should make GLES2 work properly.

4rth- Included two defines RGB8_OES and RGBA8_OES as a substitute in GLES for RGB8 and RGBA8

5th - OpenGL and GLSL version identification changed to recognize GLES  versions properly
"
2011-04-21 12:53:22 +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
9bfb043a16 From Tomas Hogarth, "Attached are the complete changed files GraphicsWindowIOS and GraphicsWindowIOS.mm. The change is in regard to the ability to adapt to device orientation. We did just have a bool indicating the window would adapt to all orientations. I have changed this to a bit mask allowing the user to specify individual orientations or combinations.
enum DeviceOrientation{

                    PORTRAIT_ORIENTATION = 1<<0,

                    PORTRAIT_UPSIDEDOWN_ORIENTATION  = 1<<1,

                    LANDSCAPE_LEFT_ORIENTATION  = 1<<2,

                    LANDSCAPE_RIGHT_ORIENTATION  = 1<<3,

                    ALL_ORIENTATIONS = PORTRAIT_ORIENTATION  | PORTRAIT_UPSIDEDOWN_ORIENTATION  | LANDSCAPE_LEFT_ORIENTATION  | LANDSCAPE_RIGHT_ORIENTATION

                };

                typedef unsigned int DeviceOrientationFlags;

The main motivation for this is to easily allow the user to specifiy that the device is in a horizontal orientation rather then having to rotate the view matrix. All flags have been tested individually as well as in combinations. The default is ALL_ORIENTATIONS to keep the exiting functionality for anyone who hasn't specified WindowData for their context traits.
"
2011-04-21 12:06:06 +00:00
Robert Osfield
4d0b96c074 From Sukender, Here is a tiny update to FileNameUtils. It brings getPathRoot() and isAbsolutePath() to the public side of the lib. 2011-04-20 19:20:28 +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
70aa087f6e Added releaseGLObjects(State*) support into osg::FrameBufferObject, osg::RenderBin and osg::RenderStage
to ensure proper clean up of FBO's on closing a graphics context.
2011-04-20 11:45:01 +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
cfb19182e6 From Bradley Anderegg, "The first change just exposes the archive extension list so that
external applications can determine if an archive extension is valid.

The second change is a bug fix in Registry::read(const ReadFunctor&)
where if you pass in valid options they get wiped out after the archive
is loaded but before being passed along to the plugin."
2011-04-19 14:11:13 +00:00
Robert Osfield
c13b7d26b7 From Jan Peciva, "please find attached proposed fix for ON_DEMAND rendering. The biggest issue was
that the windows did not act on repaint request (WM_PAINT, EXPOSE,...)

Detailed explanation:
- I implemented requestRedraw using the push approach (not using
GraphicsWindow::_requestRedraw flag that I was considering) as there may be
multiple viewers reading the flag and fighting to reset it after the paint
request, while some viewers may not spot the request to redraw
- I made windows call GraphicsWindow::requestRedraw when they receive
appropriate message (WM_PAINT, EXPOSE, RESIZE,...)
- There were issues on Linux that windows did not want to close using x
button. Resolved by moving the test for DeleteWindow event from
swapBuffersImplementation() to GraphicsWindowX11::checkEvents(). The difficulty
was that DeleteWindow event is not coming using _eventDisplay, but through
_display.
- The last difficulty was that it is necessary to call
ViewerBase::checkWindowStatus() to set _done to true when all windows are
closed. This did not happened recently in ON_DEMAND run scheme. I put the call
to checkWindowStatus() to eventTraversal.
"
2011-04-19 12:01:38 +00:00
Robert Osfield
efec8a13a1 Removed spaces from end of lines 2011-04-19 11:46:05 +00:00
Robert Osfield
581e6fb630 Ran svn propset -R svn:eol-style native . on the OpenSceneGraph 2011-04-19 11:40:22 +00:00
Robert Osfield
c70e7bda86 Improved the handling of unitialized bounding box 2011-04-19 09:54:14 +00:00
Robert Osfield
8ffa50a88e Added IncrementalCompileOperation::compileAllForNextFrame(uint) method and supporting
functionality that  tell the IncrementalCompileOperation to compile all pending objects during next draw traversal,
for specified number of frames.
2011-04-18 12:35:19 +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
b62f927eff Added handling of DXT1 in osg::Image::isImageTranslucent() 2011-04-13 10:44:36 +00:00
Robert Osfield
e7e860b742 Added support for explitly requesting DXT1a and DXT1c compression 2011-04-11 19:11:25 +00:00
Robert Osfield
f0f31e4a8c From Stephan Huber, "Attached you'll find a fixed
GraphicsWindowCocoa-implementation which should fix the reported bugs.

the osgkeyboard-example works now, but not the numbers of the keypad, as
they hilight only for KEY_KP_Left, KEY_KP_Right, KEY_KP_Up, KEY_KP_DOWN
etc and not for KEY_KP_0 - KEY_KP_9."
2011-04-04 10:16:46 +00:00
Robert Osfield
70dfd11531 From Tim Moore,
Fixes to race in DatabasePager where a parent PagedLOD
of newly loaded subgraph has been expired.

Clean up of visitor naming to make it clearer what role it has.
2011-03-30 15:15:07 +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
11007a03ee Added .get() to fix build 2011-03-19 16:25:01 +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
89eadcfe82 Added SampleDensityWhenMovingProperty to control LOD property of osgVolume. 2011-03-17 15:37:39 +00:00
Robert Osfield
79cb22eb06 Changed the view movement detection code so that it uses the
new CullVisitor::Identifier to indentifier cull traversals,
this enables the code to properly detect movement when
osgViewer::Renderer uses double buffering of SceneView.
2011-03-17 13:56:27 +00:00
Robert Osfield
6e182e7c17 Added set up of CulLVisitor::Identifier so that the double buffered SceneView/CullVisitor
share the same Identifier.
2011-03-17 13:54:54 +00:00
Robert Osfield
e28f9a7d32 Added CullVisitor::Identifier to help with cull operations that require a consistent identifier for
cull traveresals when osgViewer::Renderer uses double buffering.
2011-03-17 13:54:14 +00:00
Robert Osfield
307bf7002f First cut at LOD support in RayTracedTechnique, which lowers the number of samples taken when the view of the volume is changing. 2011-03-17 11:49:22 +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
39b8aa45bc Added checked against GL version number for enabled _isTexture3DSupported. 2011-03-15 13:53:59 +00:00
Robert Osfield
f8f6a9fedf Fixed warning 2011-03-15 13:40:13 +00:00
Robert Osfield
0870d4c997 Re-enabled the fallback compute of bounding volume. 2011-03-15 12:48:40 +00:00
Robert Osfield
fbc8c9ffce Fixed updating of text position when PositionData.position is not modified by tag but other elements of PositionData are - such as when billboarding 2011-03-15 12:26:16 +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
7cd74f0282 From Farshid Lashkari, "Another update. I added a LIMIT_NEAREST enum which implements your previous suggestion of rejecting bounding volumes further from the nearest existing intersection. I only implemented this for LineSegmentIntersector. I'd appreciate it if you could double check the math I added to LineSegmentIntersector::intersects() for checking if the bounding sphere is further away. The results of this are promising. I'm getting noticeable performance increase for line intersections with scenes containing many drawables.
"
2011-03-14 10:07:15 +00:00
Robert Osfield
76dea3d0f4 From Torben Dannhauer, warning fix for a false positive warning generated by VS about "not all control pathes return a value". 2011-03-14 09:59:32 +00:00
Robert Osfield
f7718d2b7b From Farshid Lashkari, removal of redundent spaces at the end of lines. 2011-03-11 17:20:24 +00:00
Robert Osfield
50366ccb91 From Benjamin Wasty and David Guthrie, "currently, non-alpha-numeric keys are not recognized (except as modifiers) in osgQt, so I added the mapping code from my Qt integration to GraphicsWindowQt (which is based on Delta3D code from David Guthrie - he gave me permission to submit it under OSGPL)." 2011-03-11 16:31:01 +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
a81b2341c6 Fixed the case insenstive search under unices 2011-03-11 11:20:30 +00:00
Robert Osfield
339fe794b0 From Mourad Boufarguine,
"There is a redundant cmake code at the end of osgViewer cmake script. The install command is issued in SETUP_LIBRARY macro."
"I spotted this when i tried a make install on the android port :) I saw some weird copy commands of osgViewer headers.
I managed to get all osg headers copied to cmake_install_prefix/include upon make install, but i can't (yet) get the libraries to be copied to cmake_install_prefix/lib (see attached files)"
2011-03-11 10:24:12 +00:00
Robert Osfield
6055e3492a From Mourad Boufarguine, "I gave osg android port a try on Windows using cygwin, and it worked like a charm (only a tiny problem with osgViewer, when cross compiling for android using cygwin, the windows path in osgViewer/CMakeLists.txt is used rather than the android one, fix attached).
"
2011-03-10 14:53:39 +00:00
Robert Osfield
42d893c426 From Mourad Boufarguine, "I gave projects folders in VS a try, it works for applications, plugins and examples but not for the osg core libraries.
Attached OsgMacroUtils.cmake is a tiny fix for this. OpenThreads is addressed seperately."
2011-03-10 14:44:49 +00:00
Robert Osfield
78a2096247 From Michael Platings, "I'm guessing that the stack corruption was caused by calling GetFullPathNameW with the nBufferLength argument as the number of bytes in the buffer, rather than the number of characters. I've attached code that uses GetFullPathNameW et al. with _countof() rather than sizeof() and this works fine." 2011-03-10 10:52:47 +00:00
Robert Osfield
fe149c583a Quitened down timing stats 2011-03-09 17:35:30 +00:00
Robert Osfield
6c9733f96a From Johannes Baeuerle, fix for memory leak 2011-03-09 16:30:48 +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
8c7068fdb6 From Piotr Gwiazdowski, "Recently I've been having some trouble with osgWidget::StyleManager
(I'll omit osgWidget namespace from now on). It seems to me that there
are some inconsistency in the code. In Style there are multiple
applyStyle method overloads, applying style for different
widgets/windows built-in in osgWidget. Plus you can do overrides. It's
good so far.

The problem lies in StyleManager::_applyStyleToObject (which calls
_coearceAndApply, which calls _applySpecificStyle, which calls
Style::applyStyle). With current implementation Style::applyStyle
variants for Input, Window, Frame::Corner, Frame::Border,
Window::EmbeddedWindow are never called, because their classes' names
are omitted in methods' if/else if block, making it impossible to use
styles with most than half of built-in widget/window types.

My fix simply adds couple else if blocks, making each
Style::applyStyle variant callable. By the way, I think that next
update should add Style::applyStyle overload for Table class and add
proper className overloads for Input and Window."
2011-03-09 12:29:14 +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
53b8c12813 From Dietmar Funck, "I've noticed an issue with osgUtil::RenderStage::runCameraSetUp() if the number of buffer attachments of the camera decreases according to privous calls.
This happens because RenderStage::_bufferAttachmentMap is updated only for the number of buffers the camera has when runCameraSetUp is called.
For example if there were 4 attachments and now only 3, only the first three elements of _bufferAttachmentMap are changed. The fourth is just as before - however it shouldn't be there.

Calling _bufferAttachmentMap.clear() before resolves this problem.
"
2011-03-09 11:22:20 +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
3421cbbba1 Fixed error in X11 string name 2011-03-08 17:05:29 +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
99aeca003b Fixed indentation 2011-03-08 15:31:49 +00:00
Robert Osfield
42b709a9f4 From Rafa Gaitan, "I have added the macro SETUP_LIBRARY, similar to SETUP_PLUGIN or
SETUP_EXE, in order to have a unique entry point to build the
libraries. With this changes the android integration will be less
painful (currently is a big IF(ANDROID) for each CMakeLists.txt) and
more maintainable in the future. I hope next submissions will be for
supporting android from my colleague Jorge.
"
2011-03-08 13:51:13 +00:00
Robert Osfield
4f44dc2b5e Changed all .c++ to .cpp's 2011-03-07 13:45:58 +00:00
Robert Osfield
215fca84f7 Enabled the settng/getting of the Text3D's WallStateSet and BackStateSet along with use of these in the rendering implementation
to allow separate colour and other state to be assigned to the front, wall and back faces.
2011-03-07 12:33:11 +00:00
Robert Osfield
afecdbb46b Moved intial cut of depth partition support into osgViewer::View via two new methods:
/** Convenience method for setting up multiple slave cameras that depth partition the specified camera.*/
        bool setUpDepthPartitionForCamera(osg::Camera* cameraToPartition, DepthPartitionSettings* dps=0);

        /** Convenience method for setting up multiple slave cameras that depth partition each of the view's active cameras.*/
        bool setUpDepthPartition(DepthPartitionSettings* dsp=0);
2011-03-03 15:52:19 +00:00
Robert Osfield
ae51ac8bfb Made parameter a little easier to adjust and commented out verbose debug info 2011-03-02 16:24:07 +00:00
Robert Osfield
1525f3cd4e Added support for an View::Slave::UpdateSlaveCallback 2011-03-01 14:48:48 +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
a7fd352b40 Removed TrapezoidalShadowMap due to discovery of patent on algorithm. 2011-02-24 11:54:44 +00:00
Cedric Pinson
56a8dc7c92 Cedric Pinson: Fix divide by zero when Action has 0 frames, and add a warning message because it means something wrong on input data 2011-02-23 22:52:01 +00:00
Robert Osfield
a25c4e4ab2 From Wojciech Lewandowski, intial cut at new TrapezoidalShadowMap ShadowTechnique 2011-02-23 16:46:34 +00:00
Robert Osfield
9cfb248b46 From Wojciech Lewandowski, various tweaks to osgShadow shadow mapping classes to improve consistency and enable more debug info output 2011-02-23 16:45:44 +00:00
Robert Osfield
c45717fef0 Inverted the orientation of the 't' transparency control so that it's full on at the bottom of the screen, and full transparent at the bottom. 2011-02-23 14:09:29 +00:00