Robert Osfield
31e98b51df
Added support for serailizing and scripting BoundingBox and BoundingSphere objects
2014-02-10 16:44:13 +00:00
Robert Osfield
3dcca431a9
Fixed handling of setting member variables via the Serializers when the value is the default.
...
Added support for more features of the osgDB::Widget class.
Fixed handling of boolean values in the Lua plugin
2014-02-08 17:53:51 +00:00
Robert Osfield
8ad0ab1f6b
Fixed handling of returns when invoking a script, removed some debug messages, added a warning message when detecting erronous types.
...
Added FocusBehaviour enum to osgGA::Widget serialization
2014-02-07 16:06:57 +00:00
Robert Osfield
6f5e5c23df
Added initial Widget wrapper
2014-02-07 10:46:16 +00:00
Robert Osfield
eb56080277
Fixed warnings
2014-01-24 15:40:18 +00:00
Robert Osfield
4886a8941d
Fixed warnings
2014-01-23 19:55:37 +00:00
Robert Osfield
cc99a40b16
Added support for Switch::set/getValue()
2014-01-06 17:19:21 +00:00
Robert Osfield
8ae971bdaa
Added Group::setChild(..) and Geode::setDrawable(..) MethodObjects
2014-01-06 16:58:07 +00:00
Robert Osfield
6490f1b6a5
Moved osgDB::MethodObject from lua plugin into osgDB, added support for running methods via the osgDB::PropertyInterface class.
...
Updated lua plugin to use new osgDB::PropertyInterface to run methods.
Added addChild/removeChild() etc to Group.cpp, and addDrawable/removeDrawable() etc. to Geode.cpp serializers.
2014-01-06 15:45:46 +00:00
Robert Osfield
191eabd3ab
Fixed warning
2013-10-25 09:02:39 +00:00
Robert Osfield
bddeecdbee
From Colin McDonald, "Some missing updates to the serializer static build support."
2013-10-18 07:52:18 +00:00
Robert Osfield
49625a1baf
From Andreas Henne, "in my application I use the TrackballDragger, the ScaleAxisDragger and the TranslateAxisDragger. Unfortunately these draggers are very thin and they do not provide methods to change their visual appearance. Another problem that I noticed is that lighting on the cones and boxes of the TranslateAxisDragger and ScaleAxisDragger is incorrect when the draggers are scaled due to not normalized normals. This small patch adresses these problems, providing methods to make the draggers thicker. I have attached a zip archive containing the corresponding files and also a modified osgManipulator example that makes use of the modifications. I don't want to retain any copyright."
2013-10-18 07:31:22 +00:00
Robert Osfield
898c716841
Added osgPresentation::Show node and implementations with basic property reporting for various internal nodes of presentation graph
2013-09-10 09:23:30 +00:00
Robert Osfield
94735a8364
From Laurens Voerman, "like the "Bug in ProxyNode serializer" Farshid Lashkari found (svn submit 13754) the PagedLOD serializer attempts to read begin and and brackets.
...
Fix is identical (don't read brackets when num_chidren is zero) and applies both to trunk and 3.2 branch."
2013-09-05 10:08:09 +00:00
Robert Osfield
f5deda56a6
From Farshid Lashkari, "The ProxyNode serializer was not correctly reading the "Children" field. It conditionally writes the begin/end brackets, depending on whether it has children. However, during input it unconditionally attempts to read the begin/end brackets. I've modified the code to only read the brackets if it has children."
2013-09-02 10:56:48 +00:00
Robert Osfield
820ba45fab
Added Audio, Image, Movie, Model and Volume class to osgPresentation.
2013-09-01 17:24:35 +00:00
Robert Osfield
fcde15e136
Added test for serializers and fixed serializers
2013-08-22 07:49:22 +00:00
Robert Osfield
c678fed113
Added initial classes for present3D refactor
2013-08-21 19:54:03 +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
90ceb88c12
Replaced deprecatated osg::Geometry::get*Binding() calls.
2013-06-27 14:46:16 +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
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
df075ef9bb
Cleaned up usage of BIND_PER_PRIMITIVE where possible.
2013-06-19 16:24:59 +00:00
Robert Osfield
744960bbf2
Build fixes for new deprecated osg::Geometry functions
2013-06-19 10:56:31 +00:00
Robert Osfield
297a8a221b
Added #define OSG_USE_DEPRECATED_GEOMETRY_METHODS usage into code to allow code to compile enen when CMake configuration has set the #define to off in include/osg/Config.
2013-06-18 19:09:33 +00:00
Robert Osfield
55ae5b1c5f
Moved the set binding and normalize for VertexAttrib to after the VertexAttrib array assignment
2013-06-18 15:03:26 +00:00
Robert Osfield
7d40c7258f
Clean up up osg::Geometry, removing long deprecated support for array indices and BIND_PER_PRIMITIVE binding that forced OpenGL slow paths. osg::Geometry is now smaller and only supports OpenGL fasts paths.
...
New methods osg::Geometry::containsDeprecatedData() and osg::Geometry::fixDeprecatedData() provide a means for converting geometries that still use the array indices and BIND_PER_PRIMITIVE across to complient
versions.
Cleaned up the rest of the OSG where use of array indices and BIND_PER_PRIMITIVE were accessed or used.
2013-06-18 11:18:28 +00:00
Robert Osfield
1a7f2fcb3e
Introduced new osg::PatchParameter StateAttribute class to wrap up glPatchParameter associated state.
...
Note, osg::Program::setParameter(GL_PATCH_VERTICES,num); is nolonger support and should be replaced by using the new PatchParameter class.
2013-06-11 10:52:37 +00:00
Robert Osfield
2dc53ceabb
From Aurelien Albert, Added support for texture swizzle.
2013-06-03 15:10:53 +00:00
Robert Osfield
7bd050e431
From Jan Ciger, "Here is a little patch to fix a bug in the InfluenceMap serialization. The names of the maps weren't quoted properly and therefore it was breaking loading of rigged models exported from e.g. Blender. Also names that contained spaces wouldn't have been parsed properly. "
2013-05-22 11:06:12 +00:00
Robert Osfield
455ebbc5f1
Refactored the support for stereo and keystone RTT setup so that it can be applied to an existing Camera.
2013-05-20 19:24:34 +00:00
Robert Osfield
acb4ba8554
Added support for controlling border and override redirect to the SingleWindow View::Config
2013-05-20 14:17:43 +00:00
Robert Osfield
3b6c2b636a
Renamed osgViewer::Config osgViewer::ViewConfig and moved it's declaration into include/osgViewer.
2013-05-16 10:11:06 +00:00
Robert Osfield
e3ed763c15
Added WoWVxDisplay view config
2013-05-16 09:08:27 +00:00
Robert Osfield
625821a91a
Created a dedicated include/osgViewer/config and src/osgViewer/config directories to place all the Config classes.
2013-05-15 16:15:38 +00:00
Robert Osfield
bcbaaefa02
Introduced osgViewer::Config base class and beginnigs of various Config implementations.
...
Introduced osgViewer serializers plugin for serialization support for osgViewer::Config implementations and Keystone
2013-05-15 11:31:49 +00:00
Robert Osfield
68fdae5761
From Lukasz Izdebski,"added support for gl_SampleMaski."
2013-02-13 16:29:03 +00:00
Robert Osfield
26a8f63212
From Wang Rui, "In the attached files I've added the Compute Shader support for OSG, as well as serializer updates and a new osgcomputeshaders example. My submission also include a setComputeGroups() function in Program for setting compute-shader work groups, and a bindToImageUnit() function in Texture for binding textures as image variables in shaders.
...
All code are tested on Windows 7 + NVIDIA GFX 570 with the latest GeForce 310.70 Driver (BETA), which could support OpenGL 4.3.
Compute shader information can be found at "http://www.opengl.org/registry/specs/ARB/compute_shader.txt "
"
2013-01-25 11:54:03 +00:00
Robert Osfield
a0980734ac
Added LOAD_AND_RETAIN_IN_UPDATE_TRAVERSAL and LOAD_AND_DISCARD_IN_UPDATE_TRAVERSAL ImageSequence::Mode's to allow for ImageSequence usage without using background paging threads, instead loading all the images on demand in the update traversal.
2013-01-18 16:21:17 +00:00
Robert Osfield
3a67eefd9f
Refactored osgDB::Input::readObjectOfType to use a template, and updated associated wrappers to avoid using local static's
2012-11-21 13:38:11 +00:00
Robert Osfield
014f13f774
Refactored ImageSequence to better handle random access usage.
2012-11-08 11:19:31 +00:00
Robert Osfield
1872137d88
Added serializers for osgGA
2012-10-12 14:51:08 +00:00
Robert Osfield
9fab99ddd9
From Wang Rui, "I modified the Serializer header to add a UPDATE_TO_VERSION_SCOPED
...
macro, which could set version within brackets and reset it after
that. All related serializers are also modified so that the
backward-compatibility bug reported by Farshid can be fixed.
"
From Robert Osfield, removed the use of osg::Referenced and creating the proxy object on the heap.
2012-10-09 16:05:50 +00:00
Robert Osfield
8961d45ebf
From Wang Rui, "This patch fixes a problem of the osg::Program serializers that can't
...
save/load GeometryInputType data correctly. The bug is initially found
by John Kelso."
2012-08-29 16:48:27 +00:00
Robert Osfield
2200ebfbe1
From Wang Rui, "A very small but maybe fatal problem was found when I saved models with shader and uniforms (with new double types support) to osgb format and tried to read it again. The application will crash here. And the serializer file should be slightly changed to fix it. Please replace the original file in osgWrappers/serializers/osg/Uniform.cpp."
2012-05-25 16:07:11 +00:00
Robert Osfield
5e315d5fab
From Wang Rui, "I'd like to submit the changes that will put ObjectProperty and ObjectMark variables into the InputStream/OutputStream class instead of static ones. This should avoid the threading problem and won't repeatedly reallocate memory for the properties. Some of the wrappers will be slightly modified to use the property variable stored in the InputStream/OutputStream as well."
2012-04-05 13:53:47 +00:00
Robert Osfield
aab27e106c
From David Callu, "Here an update of osg::Uniform :
...
- add non square matrix
- add double
- add all uniform type available in OpenGL 4.2
- backward compatibility for Matrixd to set/get an float uniform matrix
- update of IVE / Wrapper ReadWriter
implementation of AtomicCounterBuffer based on BufferIndexBinding
add example that use AtomicCounterBuffer and show rendering order of fragments,
original idea from geeks3d.com."
2012-03-29 09:43:12 +00:00
Robert Osfield
14a563dc9f
Ran script to remove trailing spaces and tabs
2012-03-21 17:36:20 +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
1ed3833556
From Terry Welsh, improved support for handling archives
2012-02-03 11:09:45 +00:00