Commit Graph

12274 Commits

Author SHA1 Message Date
Robert Osfield
ea2cbee347 Removed spaces from end of line 2013-06-26 12:33:40 +00:00
Robert Osfield
71c1fc87bb Fixed bug in TemplateTargetAttributeDispatch that was causing a crash with the osgsimplegl3 example 2013-06-26 12:33:14 +00:00
Robert Osfield
6377e37e88 From Pjotr Svetachov and Robert Osfield, "the index mesh and vertex pre-transform optimizers can rearrange or change the size of arrays assigned to a geometry. This leads to crashes or corrupt geometry when using shared arrays.
Attached a fix that duplicates shared geometry arrays."
2013-06-26 09:04:20 +00:00
Robert Osfield
b70dfd40aa Removed Geometry::fixDeprecatedData() as it won't work on const Geometry 2013-06-26 08:53:56 +00:00
Robert Osfield
36f48f2227 From Mathias Froehlich, "The attached file replaces the deprecated geometry use in osgSim.
The per primitive use is changed to full per vertex arrays."
2013-06-26 07:08:26 +00:00
Robert Osfield
3de0ec1904 Removed #include<osg/Notify> as it's nolonger required in the header 2013-06-25 16:19:00 +00:00
Robert Osfield
1793466442 With assistance from Sukender, moved the depreacted osg::Geometry vertex indices and AttributeBinding definitions out into a separated namespace/class so to use
deprecated features you should now use deprecated_osg::Geometry in place of osg::Geometry.
2013-06-25 16:10:24 +00:00
Robert Osfield
ceb97fe230 From Christian Buchner, "Here is a strongly overhauled version of the original osgoit ("order independent transparency") by Mathias Fröhlich. I called this version myosgoit. It looks very nice, just build and run it!
This version adds:

- an encapsulation of the entire Depth Peeling procedure into a class (not currently a scene graph node) for easier integration in other projects.

- compositing with opaque (solid) geometry is possible and the opaque model is only rendered once. This needs to performs some depth buffer blitting between FBOs.

- mix and match with GLSL shaders in the transparent objects is possible, as demonstrated with a 3D heat map intersecting an opaque truck model.


Some Drawbacks:

- the display framebuffer does not receive any depth information from the compositing camera. This could be fixed by compositing with a GLSL shader and writing to FragDepth."

From Robert Osfield, ported the code to work under Linux and without the automatic ref_ptr to C* conversion.
2013-06-25 11:13:50 +00:00
Robert Osfield
00acf55571 From Alberto Luacas, "current Doxygen warns against the use of obsolete fields:
DETAILS_AT_TOP, SHOW_DIRECTORIES, HTML_ALIGN_MEMBERS.

I have removed those in the configuration files."
2013-06-25 09:52:38 +00:00
Robert Osfield
ba9ccd91a1 From Cedric Pinson, "I fixed a little issue with the lightwave scene loader. On the version 5 there are id on the command LoadObjectLayer in the scene file and of this version the current code use this field as a part of the filename, and it fails because the file is not found.
I just added a field version_ to read it at the beginning and added extra code to check it and read the extra field if needed and read the good filename"
2013-06-24 12:51:02 +00:00
Robert Osfield
84d7d9a056 From Christian Ruzicka, "when MSAA is activated on iOS, the stencil attachment is not added (Stencil buffer is not working at all). Attached are the needed changes to make MSAA + stencil working on iOS.
Tested with OSG 3.1.7 and iOS SDK 6.1."
2013-06-24 12:31:48 +00:00
Robert Osfield
addf8b1d2d Updatd SO_VERSION to reflect changes in ABI from merging submissions. 2013-06-24 12:30:08 +00:00
Robert Osfield
1e715b6877 From Sukender, "I recently pulled from the GIT mirror and found that "OSG_USE_DEPRECATED_GEOMETRY_METHODS=OFF" hides a little mistake: there is a "#include <osg/Notify>" inside the "osg" namespace, in inlude/osg/Geometry.
"
2013-06-24 12:27:19 +00:00
Robert Osfield
ba2242decb From Mourad Boufarguine, "Attached is a fix for the ply reader to use the output of osgDB::findDataFile.
"
2013-06-24 11:40:16 +00:00
Robert Osfield
6331a54a68 From Luc Frauciel, "You'll find attached a modification of DXWriter to support Material color:
If a material is present, the diffuse color is affected to current layer."
2013-06-24 11:39:26 +00:00
Robert Osfield
0896bd17bd From Lars Nillson, "The change in this submission is to take care of the setting given by a call to
setMaximumNumOfObjectsToCompilePerFrame(…).


Sometimes if you give a low number, more than the expected number of objects are compiled."
2013-06-24 11:14:13 +00:00
Robert Osfield
ca2688b046 Convert usage to use const versions of containers 2013-06-24 11:03:59 +00:00
Robert Osfield
864e5cb6f0 From Frederic Morin, "Current behaviour uses SDKSettings.plist to determine osx version but
this file is only available when XCode is installed.

This version works also when Command Line Tools for XCode are
installed (minimum build env for osx without XCode)

See https://github.com/openscenegraph/osg/pull/8 for patch details
Patch: https://github.com/openscenegraph/osg/pull/8/files"
2013-06-24 09:59:22 +00:00
Robert Osfield
261db64a9e From Farshid Lashkari, "I've attached a small patch that extends the Image::readImageFromCurrentTexture method to support more depth texture pixel formats (16, 24, 32, 32F). In order to compile, I moved some depth pixel format definitions from FrameBufferObject to Image.
"
2013-06-24 09:51:30 +00:00
Robert Osfield
3c1a89604b From Christian Noon, "Got a simple patch for correcting a problem with the USE_COMPRESSOR_WRAPPER() macro in the osgDB::Registry. The problem is that the wrapper declaration doesn't match the one defined in the REGISTER_COMPRESSOR() method in the osgDB::ObjectWrapper method. This patch fixes the wrapper declaration so they both match properly. I ran into this problem using compressed files in an iOS application where all the libraries and plugins need to be built statically." 2013-06-24 09:31:34 +00:00
Robert Osfield
70ae69648d From Nick Black, "Hey there! avcodec_open() has been deprecated for some time, and indeed has
been removed in the most recent versions of libavcodec/ffmpeg. You're
already using avcodec_open2() elsewhere, but one appears to have been
missed. The change is trivial:

[skynet](0) $ svn diff
Index: src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp
===================================================================
--- src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp        (revision 13355)
+++ src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp        (working copy)
@@ -109,7 +109,7 @@
         //    m_context->flags |= CODEC_FLAG_TRUNCATED;

         // Open codec
-        if (avcodec_open(m_context, p_codec) < 0)
+        if (avcodec_open2(m_context, p_codec, NULL) < 0)
             throw std::runtime_error("avcodec_open() failed");
     }

[skynet](0) $

I've applied similar changes this year to many other packages, including
cheese, blender, linphone, ad nauseam. It's been tested by verifying that
with my patch, OSG builds against the newest libavcodec and ffmpeg, whereas
otherwise it does not.

The modified src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp is attached. It
originates in svn trunk revision 13355. Thanks!"
2013-06-24 09:12:58 +00:00
Robert Osfield
48020eed9e Introduced typedef's to make the code more readble and maintanable 2013-06-24 09:02:32 +00:00
Robert Osfield
4044fd5a74 From Wang Rui, "The file attached includes two new features for the serialization IO functionality. First, custom serializer version control should work now, just by defining a new REGISTER_CUSTOM_OBJECT_WRAPPER macro. For example:
// A custom class
namespace CustomDomain {

class MyGroup : public osg::Group
{
public:
    META_Node( CustomDomain, MyGroup );

    void setMyName( const std::string& n );
    const std::string& getMyName() const;

    void setMyID( int id );
    int getMyID() const;

    ...
};

}

// The serialization wrapper using a custom domain name
REGISTER_CUSTOM_OBJECT_WRAPPER( MyDomain,
                                CustomDomain_MyGroup,
                                new CustomDomain::MyGroup,
                                CustomDomain::MyGroup,
                                "osg::Object osg::Node osg::Group CustomDomain::MyGroup" )
{
    ADD_STRING_SERIALIZER( MyName, std::string() );
    {
        UPDATE_TO_VERSION_SCOPED( 1 );  // Updated for a new domain version
        ADD_INT_SERIALIZER( MyID, 0 );
    }
}

Save the class instance as follows:
osgDB::writeNodeFile( *myGroup, "serializer_test.osgt", new osgDB::Options("CustomDomains=MyDomain:1") );

The output file will include the domain version definition and all the class data, and can be read back. We can also force setting the domain version by the CustomDomains option while reading the saved files. If we save the class instance without any options, MyID will be ignored because the default domain version is 0.

This may help third-party libraries like osgEarth to maintain their own serializers without regarding to the OSG soversion changes.

Another feature added is a more robust binary format, which in fact adds a size-offset at each block's beginning. When there are problems or unsupported data types while reading, we can now directly jump to the block end indicated by the offset value. So a .osgb file will automatically ignore bad data and read remains as normal (at present it will fail at all). This feature will not break the backward compatibility, and can be disabled by setting "RobustBinaryFormat=false" while writing out.

Hope these changes can work smoothly with present and future community projects. Maybe we should also consider have an osgserializer example to test and demonstrate all things we can do now."
2013-06-24 08:48:55 +00:00
Robert Osfield
b3f0479118 From Wang Rui, "Sorry for my very slow response because of some personal issues. I found that new Geometry serializers can't work with old .osgb files. The modified FastPathHint serializer doesn't correctly read from the stream and thus jumbles following inputs. The file attached can be placed in osgWrappers/serializers/osg to fix that problem.
"
2013-06-24 08:22:50 +00:00
Robert Osfield
340a47dc66 From Wang Rui, "The osgdb_ffmpeg plugin may not work with latest ffmpeg windows sdk and will say "The procedure entry point xxx could not be located in xxx.dll" instead. The following link describes the reason (maybe a certain optimization problem of the VS compiler):
http://forum.videolan.org/viewtopic.php?f=32&t=98097

After adding the /OPT:NOREF, the problem has gone.

"
2013-06-24 08:19:34 +00:00
Robert Osfield
db4b7584fb From Farshid Lashkari, "In many game engines it is common to set the W component of the tangent vector to -1 if the UVs are mirrored and 1 if not. I've updated the osgUtil::TangentSpaceGenerator class to do the same." 2013-06-24 08:18:08 +00:00
Robert Osfield
0a4bf71fbb Updated version number after dev release 2013-06-21 19:35:56 +00:00
Robert Osfield
b40c3fc0aa Removed spaces from end of lines 2013-06-21 19:35:26 +00:00
Robert Osfield
df3626be27 Fixed author name error introduced by xxdiff 2013-06-21 14:37:35 +00:00
Robert Osfield
d707983905 Reapplied AUTHORS changes 2013-06-21 14:30:45 +00:00
Robert Osfield
717c4f785c Update ChangeLog and AUTHORS.txt for release 2013-06-21 14:29:00 +00:00
Robert Osfield
59d53b40a1 Removed unneccessary handling of BIND_PER_PRIMITIVE on output code 2013-06-21 14:17:42 +00:00
Robert Osfield
9d9543ca0a From Pjotr Svetachov, introduced use of osg::observer_ptr<osg::Camera> in place of osg::Camera* 2013-06-21 13:59:18 +00:00
Robert Osfield
da134aa8ed From Stephan Huber, "attached you'll find the missing readObject-implementations for the imageio-plugin as suggested by Remo Eichenberger." 2013-06-21 13:41:03 +00:00
Robert Osfield
cb09fff797 From Laurens Voerman, build fix 2013-06-21 12:10:44 +00:00
Robert Osfield
18d6d298bf Build fixes for new osg::Geometry 2013-06-21 10:59:03 +00:00
Robert Osfield
deb074120e Converted osg::Geometry::ArrayData usage across to osg::Array. 2013-06-21 10:14:18 +00:00
Robert Osfield
25f0d2ccde From Laurens Voerman, "I just tested openGL quadbuffered stereo with the osgviewer, the mouse works again, so does the keystonecorrection, but the right-eye render to texture camera appears not to clear it's color buffer.
I found the problem in src\osgViewer\View.cpp, fix attached."
2013-06-21 10:03:49 +00:00
Robert Osfield
5a93c9100b From Mathieu Marache, I needed to modify the FindCOLLADA.cmake to enable its compilation under macosx. 2013-06-21 09:53:57 +00:00
Robert Osfield
6eabca211b Converted ArrayData usage across to set*Array() usage with new binding parameter 2013-06-21 09:47:04 +00:00
Robert Osfield
15fea448d8 Added new osg::Array::Binding parameter to osg::Geometry::set*Array(osg::Array* array, osg::Array::Binding binding=osg::Array::BIND_UNDEFINED) methods to make it easier for the user
to set the binding without the need to call the deprecated osg::Geometry::set*Binding(osg::Geometry::AttributeBinding)
2013-06-21 09:43:15 +00:00
Robert Osfield
d82c62a03b Removed spaces at ends of lines 2013-06-21 09:40:43 +00:00
Robert Osfield
d0f4086a57 From FrancoisTigeot, "OpenSceneGraph 3.0.1 doesn't build out of the box on DragonFly and needs
a few modifications to these files:
  - applications/present3D/Cluster.cpp
  - src/osgDB/FileUtils.cpp

The changes are needed to fix a few platform specific things such as the
absence of stat64, int/socklen_t differences, etc... and are in the same
line as Linux, Apple and FreeBSD specific checks.

I have attached the modified files; the original patches to 3.0.1 are
also visible here if you find it more convenient:
http://dl.wolfpond.org/dports/graphics.osg/dragonfly/patch-applications_present3D_Cluster.cpp
http://dl.wolfpond.org/dports/graphics.osg/dragonfly/patch-src_osgDB_FileUtils.cpp

With these changes, osg 3.0.1 is able to be built and packaged on DragonFly
whereas it previously failed to compile."
2013-06-21 09:17:28 +00:00
Robert Osfield
c3f28a52e4 From Matthias Helsing, "Here is the changed source to prefer using _NET_WM_STATE_ABOVE but fall back to XRaiseWindow should the Atoms not be supported. I'm not sure how many might be using the raiseWindow feature but I needed it for a splash on Ubuntu 12.04." 2013-06-21 08:56:24 +00:00
Robert Osfield
4738a2607b From Farshid Lashkari, "I've updated the dds, png, and jpeg plugins to support writing images with the GL_DEPTH_COMPONENT pixel format. They will simply treat it the same as the GL_LUMINANCE pixel format." 2013-06-21 08:37:47 +00:00
Robert Osfield
fe461c77fc From Jan Ciger, " I have put there in the comment a nicer way of doing version
checks, but that needs at least CMake 2.6.2."
2013-06-21 08:03:56 +00:00
Robert Osfield
715dd4e930 Fixed the handling the mouse min/max ranges of slave Cameras that have a parent Camera with a viewport. 2013-06-20 16:44:14 +00:00
Robert Osfield
a2b2ba5860 Temporarily commented out call to view.assignStereoOrKeystoneToCamera() for implementing stereo as this was causing problem in trackball manipulation 2013-06-20 15:48:14 +00:00
Robert Osfield
603c280b62 Added local namespace for util functions, and fixed the return type of checkDeprecatedData() 2013-06-20 15:18:51 +00:00
Robert Osfield
64b0e1afd0 From Vladimir Chebaev, "I worked with osg::Particle and see that this class has setter osgParticle::setTextureTileRange and has no getters for startTile and endTile. This can be very uncomfortable.
I attached file with two getters."
2013-06-20 12:15:57 +00:00