Commit Graph

12315 Commits

Author SHA1 Message Date
Robert Osfield
d3c2896651 Added SceneView::Options enum enetries APPLY_GLOBAL_DEFAULTS and CLEAR_GLOBAL_STATESET to control whether a _globalStateSet->clear() and _globalStateSet->setGlobalDefaults() should be called.
osgViewer::Renderer doesn't use these enum settings so now no longer has a calls StateSet::clear() or StateSet::setGlobalDefaults() on the osg::Camera's StateSet.  Previously these were being
called and breaking the ability to attached state to Camera's StateSet.
2013-07-02 09:27:14 +00:00
Robert Osfield
0abbef71e1 From Pjotr Svetachov, "In a submission on June 27th a lot of new array types were added. This modified the osg::Array::Type enum. Because of this s_ArrayNames array in Array.cpp is now not in sync. This can lead to corrupt exports or crashes when writing .osg files because the change added new types in the middle of the enum instead of at the end.
Attached is a new Array.cpp to reflect the new array types."
2013-07-01 16:15:25 +00:00
Robert Osfield
50f3b4a539 Updated AUTHORS, ChangeLog for dev release 2013-07-01 12:16:32 +00:00
Robert Osfield
ff3a6f4eb1 Removed BIND_INSTANCE_DIVISOR as they don't yet have any implementation backend to support them. 2013-07-01 10:22:34 +00:00
Robert Osfield
2768c1b170 From David Callu, "Here a fix for FindFBX.cmake
under linux, library name to look for must be fbxsdk instead of libfbxsdk."
2013-07-01 09:12:11 +00:00
Robert Osfield
5e89121152 From David Callu, "Here a CMakeLists.txt modified with OSG_AGGRESSIVE_WARNING_FLAGS defined when Clang compilator is used" 2013-07-01 09:10:11 +00:00
Robert Osfield
0289b05cd5 Fixed debug build compile problem 2013-07-01 09:09:49 +00:00
Robert Osfield
a64b412885 Reverted the usage of OSG_UNUSED and OT_UNUSED as in hindsight these should never have been merged. Adding code to quieten
inappropriate warnings is a bad programming practice and does not desrve a place in the OSG code base.
2013-07-01 08:21:13 +00:00
Robert Osfield
e876e0bad3 From John Kaniarz, "This patch modifies ReaderWriterPNG.cpp to
1. Check the bit depth of the passed Image and return an error if not 8 or 16. (not fully featured, but still an improvement over hard coded 8bit for everything)
2. Endian swap 16bit image data when on a little endian architecture.
"
2013-06-28 15:44:04 +00:00
Robert Osfield
9eba9df292 From Alberto Luaces, "Documentation for -p and --speed options in osgviewer" 2013-06-28 14:47:02 +00:00
Robert Osfield
88a8423802 From Marcel Pursche, fixed checking of destination dimensions in osg::copyImage. 2013-06-28 14:38:45 +00:00
Robert Osfield
d4e1a8d6a3 From Lilin Xiong, "When writing proxyNode to ive file, we forget "LoadingExternalReferenceMode ". Add some code to fix this.
if (out->getVersion() >= VERSION_0045)
{
    out->writeInt(getLoadingExternalReferenceMode());
}

if (in->getVersion() >= VERSION_0045)
{
   setLoadExternalReferenceFiles( (osg::ProxyNode::LoadingExternalReferenceMode)in->readInt() );
}
"
2013-06-28 14:32:12 +00:00
Robert Osfield
2e41e3f656 From Gill Peacegood, "fix for a memory leak in the DelaunayConstraint class" 2013-06-28 14:21:43 +00:00
Robert Osfield
4493cc817d From Laurens Voerman, "the current version of BufferObject causes a huge amount of warnings in Visual Studio 2012 like:
OpenSceneGraph/include\osg/BufferObject(701): warning C4138: '*/' found outside of comment (E:\osg\osgSvn\OpenSceneGraph\src\osg\Array.cpp)

adding a space before /* fixes the problem
        void removeClient(osg::Object * /*client*/) { --_numClients; }
"
2013-06-28 14:08:36 +00:00
Robert Osfield
5db57cfa34 Fixed handling of DISPLAY=127.0.0.1:2 usage. 2013-06-28 14:07:31 +00:00
Robert Osfield
353b18b27b From Aurelien Albert, Added support for glPrimitiveRestartIndex.
"The idea of this new OpenGL feature is :

- set RestartIndex = "n"
- draw elements strip
  -> when the index is "n", the strip is "stopped" and restarted

It's very usefull for drawing tiles with a single strip and a "restart" at the end of each row.

The idea a an OSG StateAttribute is :

Usually we use to build geometry from code, because software modelers rarely support it (and 3d file formats doesn't support it) :

-RootNode <= "PrimitiveRestartIndex=0"     // So now, we know that our restart index is 0 for all drawables under this node
|
- Drawable 1 : triangles => as usual
|
- Drawable 2 : triangles strip => as usual
|
- Drawable 3 : triangles strip + "GL_PRIMITIVE_RESTART" mode = ON => use the restart index
|
- Drawable 4 : triangles strip + "GL_PRIMITIVE_RESTART" mode = ON => use the restart index
|
- Drawable 5 : triangles strip => as usual


With a StateAttribute, it's easy for the developper to say "0 will be my restart index for all this object" and then activate the mode only on some nodes.

The main problem is if you set and restart index value which is not included in the vertex array (for exemple set restart index = 100 but you have only 50 vertex). There is no problem with OpenGL, but some OSG algorithms will try to access the vertex[100] and will segfault.

To solve this, I think there is two ways :

1/ add restart index in osg::PrimitiveSet and use this value in all algorithms. It's a lot of work, maybe dangerous, and it concern only a few situations : developpers who use this extension should be aware of advanced OpenGL (and OSG) data management

2/ use a StateAttribute, and choose a "correct" restart index. In my applications, I always use "0" as a restart index and duplicate the first vertex (vertex[0] = vertex[1]). So there is no difference for OpenGL and all OSG algorithms works properly.
"
2013-06-28 13:43:46 +00:00
Robert Osfield
b2c838033d Added handling of an odd number rows in the capsule rendering and primitive calculation. 2013-06-28 12:45:39 +00:00
Robert Osfield
097aedf23c From David Callu, warning fixes and removal of spaces at end of lines. 2013-06-28 12:00:43 +00:00
Robert Osfield
d82768417d From David Callu, "in osgViewer::WoWVxDisplay::WoWVxDisplay(unsigned int type=20, unsigned int screenNum=0)
screenNum is unused.

fix attached.
"
2013-06-28 10:59:01 +00:00
Robert Osfield
db1f2c5eb1 From David Callu, added support for glVertexAttribLPointer and glVertexAttribIPointer, utilized via osg::Array::setPreserveDataType(true); 2013-06-28 10:51:22 +00:00
Robert Osfield
4fd6566e00 From David Callu, serializer support for new Vec* and Vec*Array classes 2013-06-28 08:57:42 +00:00
Robert Osfield
f2c1a7597c 2013-06-28 08:11:46 +00:00
Robert Osfield
775c1443eb From David Callu, "Added Vec3ub, Vec3us, Vec4us, Vec2ub and Vec2us classes" 2013-06-27 17:37:03 +00:00
Robert Osfield
9f13e2fcb9 From Lionel Lagarde, "Support for paging and shared PBO"
"The attached file contains:
- a per-context read counter in GLBufferObject::BufferEntry
- a global client counter in BufferData
- the glue between Texture* and Image client counter
"
2013-06-27 16:44:32 +00:00
Robert Osfield
57947ea75c From Aurelien Albert, added passing on of the gl array normalize to OpenGL when uses vertex attribute aliasing. 2013-06-27 15:18:38 +00:00
Robert Osfield
90ceb88c12 Replaced deprecatated osg::Geometry::get*Binding() calls. 2013-06-27 14:46:16 +00:00
Robert Osfield
dfc1a899db Added Geometry::containsDeprecatedData() / fixDeprecatedData() 2013-06-27 13:37:26 +00:00
Robert Osfield
092dd93be8 Removed deprecated usage of osg::Geometry::get*Binding() 2013-06-27 10:58:26 +00:00
Robert Osfield
592c580721 Replaced deprecated osg::Geometry::set*Binding() usage. 2013-06-27 09:59:33 +00:00
Robert Osfield
87add5f508 Replaced deprecated osg::Geometry::set*Binding() usage 2013-06-27 09:54:45 +00:00
Robert Osfield
4b9aa1fd24 Replaced deprecated osg::Geometry::set*Binding() usage. 2013-06-27 09:54:12 +00:00
Robert Osfield
c1ebc3ac0c Replaced deprecated osg::Geometry::set*Binding() usage 2013-06-27 08:44:15 +00:00
Robert Osfield
38bb71460a Replaced deprecated Geometry::set*Binding() 2013-06-27 08:30:51 +00:00
Robert Osfield
8e65ab7e45 Replaced deprecated Geometry::set*Binding() usage 2013-06-26 18:06:09 +00:00
Robert Osfield
5a25a93bdd Removed deprecated Geometry::set*Binding() usage 2013-06-26 17:58:57 +00:00
Robert Osfield
9f0bbbf831 Added osg::getBinding(osg::Array* array) convinience function that returns the Array::getBinding() is the array is not NULL, otherwise returns BIND_OFF. 2013-06-26 17:54:35 +00:00
Robert Osfield
7ee05a345a Replaced deprecated osg::Geometry::set*Binding() usage 2013-06-26 17:45:19 +00:00
Robert Osfield
55416d83b3 Replaced deprecated osg::Geometry::set*Binding() calls. 2013-06-26 17:44:30 +00:00
Robert Osfield
a459033eff From Sebastian Messerschmidt, "I've taken some time and refactored some places where the old set*Binding were used." 2013-06-26 16:16:23 +00:00
Robert Osfield
bead0740f2 From Aurelien Albert, "This submission allow the user to specify how to setup VertexAttributeAliasing.
I think this is necessary on OpenGL 3.2+ since this is no more "default" locations in the OpenGL specs.

The default behaviour stay the same.

There is a few new methods on osg::State :

- resetVertexAttributeAlias : reset all vertex alias to osg's default ones
- set**Alias : set a vertex attribute alias configuration
- setAttributeBindingList : set the attribute binding list (allow to specify an empty list if you're using "layout" qualifier in glsl code to specify the bindings. This save some CPU operations)"
2013-06-26 13:00:12 +00:00
Robert Osfield
831a552dfa Removed unused methods 2013-06-26 12:59:40 +00:00
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