Commit Graph

12450 Commits

Author SHA1 Message Date
Robert Osfield
20fbad6c29 Cleaned up line endings 2013-10-07 09:33:46 +00:00
Robert Osfield
da2d7e2dde Added support for automatically select Lua 5.2 is it's available, then falling back to checking for Lua 5.1 otherwise. 2013-10-04 20:42:23 +00:00
Robert Osfield
d260b16981 Moved code across to use lua_userdata to manage pointer to osg::Object that is ref()/unref() 2013-10-04 19:48:03 +00:00
Robert Osfield
79e2d1309f Added support for Lua 5.2 and osg::Object creation from within Lua scripts. 2013-10-04 16:30:25 +00:00
Robert Osfield
c77dc4fe9e Added createObject() interface 2013-10-04 16:29:45 +00:00
Robert Osfield
b5b020a138 Updated version number after 3.3.0 dev release 2013-10-04 16:28:49 +00:00
Robert Osfield
910cfeea60 Fixed errors in Contributors list 2013-10-03 16:20:29 +00:00
Robert Osfield
83c396b13b From Jan Peciva, RayIntersector implementation 2013-10-03 08:45:57 +00:00
Robert Osfield
69f2fb56b3 From Colin McDonald and Robert Osfield, "When a serializer shared library is loaded it registers all of
the wrappers it contains.  The registration creates a prototype
object for all of the wrapped classes.  For some of the higher-level
classes this can be a bit heavy.

I noticed a problem with a model which required a single class from
osgSim.  When osgdb_serializers_osgsim.so was loaded it registered
wrappers and created prototype objects for all of the osgSim classes,
including osgSim::ScalarBar.  The constructor for that class creates
several drawables, and loads arial.ttf using the freetype plugin.  I
don't need that, and don't even ship the font or plugin with my
application, resulting in an unexplained warning message loading
the model.

I've modified the ObjectWrapper class to defer the prototype object
creation until if & when actually required."
2013-10-02 13:59:00 +00:00
Robert Osfield
0ec35d5a5d From Dmitry Marakasov, "These are FreeBSD bits for src/osgPlugins/osc/osc/OscHostEndianness.h,
required to build newever OSG on this OS. Also corrects file name
in the error message - I was confused not to find OSCHostEndianness.h
after I've got this error.

Tested by successfully building OSG 3.2.0 with this patch on FreeBSD
9.1."
2013-10-02 11:29:58 +00:00
Robert Osfield
0eb435e118 Re-ordered the public/protected sections to keep the public section all together 2013-10-02 11:28:38 +00:00
Robert Osfield
60d4b71d2b From Björn Hein, "it seems that for generating "per vertex normals" as stated in the
comment, two of them are missing. This results in wrong display of
STL-files regarding normals. Following simple fix seems to work:

Index: ReaderWriterSTL.cpp
===================================================================
--- ReaderWriterSTL.cpp    (Revision 13797)
+++ ReaderWriterSTL.cpp    (Arbeitskopie)
@@ -108,6 +108,8 @@
                     ++itr)
                 {
                     perVertexNormals->push_back(*itr);
+                    perVertexNormals->push_back(*itr);
+                    perVertexNormals->push_back(*itr);
                 }

                 geom->setNormalArray(perVertexNormals.get(),
osg::Array::BIND_PER_VERTEX);
"
2013-10-02 11:09:29 +00:00
Robert Osfield
59caf4a48e Fixed build with no automatic ref_ptr<> conversion 2013-10-01 19:34:21 +00:00
Robert Osfield
fcc14e467a Updated AUTHORS files 2013-10-01 19:31:48 +00:00
Robert Osfield
11168fea66 Updated ChangeLog in prep for dev release 2013-10-01 19:00:02 +00:00
Robert Osfield
5015ec4b5d From Aurelien Albert, "I'm working with OSG and a customer low-level OpenGL library.
To make easier "lazy apply" on the customer OpenGL shaders, the easiest way was to add an accessor to current OSG state's UniformMap.

I've also added accessors for modes and texture, since it could be usefull in the same way.

All methods are const, so I think there is no side-effects."
2013-10-01 17:01:21 +00:00
Robert Osfield
270883d3f4 From Björn Blissing, "I propose making the following outputs a little bit more silent. In my mind it would suffice with OSG_DEBUG (compared to OSG_NOTICE) for these information messages." 2013-10-01 16:20:20 +00:00
Robert Osfield
c399db82a3 From Christopher Baker, submitted by Alberto Luacas, "there is a bug report in the Ubuntu tracker that points to a bug when
loading multiple VRML files in parallel.  Christopher R. Baker has
detected this bug and crafted a patch.  In addition, libcoin has to be
also built with the "--enable-threadsafe" option.

I copy here his report, extracted from
(https://bugs.launchpad.net/ubuntu/+source/openscenegraph/+bug/1211993)
and attach his fix.  All credit is due to him:

«
There are three instances of a classical method-local-static
multithreaded initialization bug in the Inventor plugin for OSG that
trigger various memory faults when reading multiple VRML files in
parallel via osgDB::readNodeFile. These bugs are of the form:

static std::map<Stuff,OtherStuff> myHandyMap;
static bool once = true;
if(once) { ...fill myHandyMap; once = false }
... use myHandyMap;

To repeat: try loading multiple VRML files from multiple threads. The
liklihood of the bug depends on many factors, but my application, which
parallel-loads some dozens of small (<100K) VRML files on startup,
triggers this problem 25% of the time or more.

The attached patch (inventor-plugin-multithread.patch) rectifies this
problem by:

1 - Inheriting MyHandyMap from std::map, then
2 - Moving the map initialization into the derived constructor, which
3 - Is intrinsically protected from multithread issues by g++ (and is
part of the C++ standard), unless you pass -fno-threadsafe-statics,
which is strongly discouraged by the man page.
»
"
2013-10-01 09:37:56 +00:00
Robert Osfield
76d833f332 From Adrien Grandemange, "On Windows 7 and 8, mouse messages are generated in addition to touch messages, which leads to duplicate PUSH, DRAG and RELEASE events in OSG. Besides, the mouse and touch messages referring to the same user input are not necessarily sent at the same time, due to gesture translation done by Windows by default, such as double-tap => double-click and long-push => right-click.
The delay between the 2 types of messages is more noticeable on Windows 8 and leads to serious disruptions in our application.

Mouse messages generated by touch input are only present for legacy support. I think they should be filtered out by OSG (real click events originating from a physical mouse will of course still go through).

This is what this patch does, according to this suggestion: http://msdn.microsoft.com/en-us/library/dd693088%28v=VS.85%29.aspx (third issue in this page)."
2013-10-01 09:11:26 +00:00
Robert Osfield
68c22efa58 From Thomas Hogarth, "Attached is a small build fix for PointSprite when compiling under GLES2 (r13788)
GL_POINT_SPRITE_OES does not exist in GLES2, instead you just draw using GL_POINTS then use gl_PointSize in a vertex shader to set the size."
2013-10-01 09:05:18 +00:00
Robert Osfield
c626b0e1f6 From Jeffrey Kinross, "I ran into an issue with case sensitivity on OS X and the OSXAVFoundation code.
In CMakeList.txt there is a case sensitivity issue which a fix was posted by Robert Osfield in the users forum.

I also had to rename the files OSXAvFoundationCoreVideoTexture.h and OSXAvFoundationCoreVideoTexture.cpp to OSXAVFoundationCoreVideoTexture.h and OSXAVFoundationCoreVideoTexture.cpp

Finally in OSXAvFoundationCoreVideoTexture.cpp the include OSXAVFoundationVideo.H was updated to OSXAVFoundationVideo.h"
2013-09-30 18:32:41 +00:00
Robert Osfield
d304ed7d73 From Farshid Lashkari, "I have a scene that makes heavy use of the StateSet::compare method and my profiler showed that a lot of time was being spent inside it. I made a small change to the method so that it performs a quick size comparison between the attribute/mode lists and bin mode before iterating through all the attributes. This made a noticeable improvement in my scene. I've attached the change." 2013-09-30 18:15:51 +00:00
Robert Osfield
0ba856a637 2013-09-30 10:28:14 +00:00
Robert Osfield
8bc85764ff Unified Vec/Plane/Quat handling code. 2013-09-27 18:43:35 +00:00
Robert Osfield
ff925f1d86 Added support for getting Vec* and Matrix objects from Lua stack and assigning them as OSG object properties. 2013-09-27 13:04:04 +00:00
Robert Osfield
43cb1b3a41 Initial cut of setting and getting osg::Object properties within Lua scripts 2013-09-26 17:27:49 +00:00
Robert Osfield
6d8f40d13a Added support for passing parameters in and out of scripts.
Implemented support for osg::ValueObject in LuaScriptEngine.
2013-09-24 15:17:42 +00:00
Robert Osfield
796314c339 Changed NodeVisitor so that is subclasses from osg::Object rather than osg::Referenced to enable it to be used with serialization and scripting 2013-09-24 15:08:23 +00:00
Robert Osfield
874a7ed3b3 Removed redundent spaces 2013-09-24 08:56:47 +00:00
Robert Osfield
351f98b10d Added test for osgGA::GUIEventAdapter 2013-09-23 14:10:36 +00:00
Robert Osfield
3af70f13a3 Removed unnceccesary setNumChildrenRequiringUpdateTraversal from VolumeTile constructor. 2013-09-20 15:43:24 +00:00
Robert Osfield
8f3ee7c649 Added initial cut of white and black lists 2013-09-20 10:44:24 +00:00
Robert Osfield
6bc413530e Added compoundClassName() convinience method to standardize the generation of the compoundClassName. 2013-09-20 10:25:23 +00:00
Robert Osfield
6e3f893a0e Added type maps to help with querrying supported type names 2013-09-20 10:04:50 +00:00
Robert Osfield
250d9f2ed7 Introduce osgDB::PropetyInterface class that provided a generic interface for get/setting properties on scene graph objects, utilizing the osgDB serializers to do
the actual interface query and set/gets.
2013-09-19 16:19:32 +00:00
Robert Osfield
f42481b60f Removed unneccessary return 2013-09-19 16:18:20 +00:00
Robert Osfield
24ecfb1a48 Added access methods to Serializer to help with using wrappers for other purposes such as script integration.
Added Vec*i and Vec*ui support to serializers
2013-09-11 15:44:08 +00:00
Robert Osfield
31cd80cea7 From Giuseppe Donvito, "I'm using OSG 320 and I need to flush a DDS 3D texture on disk.
I found a bug on DDS ReaderWriter that generates a false positive on a guard for the size check on writing operation. This is due to a wrong imageSize computation that uses img->getImageSizeInBytes() method instead of img->getTotalSizeInBytes(), that actually ignores the r() dimension, contrariwise taken into account by the function ComputeImageSizeInBytes() later.

The line 1062 on file ReaderWriterDDS.cpp should be fixed with:
[code]unsigned int imageSize = img->getTotalSizeInBytes();[/code]
"
2013-09-10 15:17:59 +00:00
Robert Osfield
82bbcef117 From Giuseppe Donvito, Fixed typo of "CLEAR_GLOBAL_STATESET = 0x16," to indended "CLEAR_GLOBAL_STATESET = "0x10". 2013-09-10 13:29:28 +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
085bfd83d7 From Wang Rui, "The Python header will look for its libraries using "#pragma comment(lib,"python32_d.lib")" for MSVC. So user-specified libraries will not really be set for the osgdb_python plugin. This small fix may help locate the Python libraries after putting the CMakeLists.txt into src/osgPlugins/python
"
2013-09-09 16:02:32 +00:00
Robert Osfield
27b57dbf0c From Colin Cochran, OES support for point sprites 2013-09-09 14:58:25 +00:00
Robert Osfield
e9697859bd From Colin McDonald, "Add test for GL_EXT_framebuffer_object extension : osg uses osg::FBOExtensions to check if Frame Buffer Objects are
available.  But this just checks if the fbo functions can be called.
It doesn't check if the OpenGL renderer supports fbos.  For indirect
rendering on linux the client side capability may be different from
the display server, which can lead to mipmapped textures failing to
render.  I've added a fbo extension check.
"
2013-09-09 13:33:13 +00:00
Robert Osfield
b20a74b017 From Ulrich Hertlein, "Patch for FindAVFoundation to work with OS X 10.9" 2013-09-09 12:44:36 +00:00
Robert Osfield
80456598e0 From Wang Rui, "Some developers report that the osgviewerMFC example is broken in 3.2, in which depth test is not enabled by default so all models loaded look awkward. I submit this patch to make it work again. I haven't gone deep to check why previous example goes wrong in newer version but I believe the problem was because the newly created camera object missed some important global statesets before set as the main camera." 2013-09-09 12:37:52 +00:00
Robert Osfield
61ccd56d25 From Laurens Voerman, "two minor fixes, both in a CMakeList.txt file,
1> osgmultiplemovies example does not use SDL so needs no link to SDL

2> Added header files to "Plugins osg" project, so visual studio can find the source of
   OSG_WARN <<  "AsciiInputIterator::readProperty(): Unmatched property "
"
2013-09-09 12:33:18 +00:00
Robert Osfield
7050c59cae Initial cut of Audio/Volume/Movie/Image presentation objects 2013-09-06 09:35:56 +00:00
Robert Osfield
df48d440e4 From Colin McDonald, "Attached are some fixes to build osg using the Solaris Studio compiler.
I've also checked the modified files still build ok with other
compilers (Linux gcc, Windows Visual Studio).

osgDB/OutputStream.cpp and osgPlugins/lws/SceneLoader.cpp require
stdlib.h for atoi use.

In osg/Uniform.cpp the compiler complains that base_class is unknown
unless I add a class name qualifier.

Not a build fix, but I spotted a typo in osgUtil/SceneView."
2013-09-05 10:23:05 +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
19f84b52e7 Fixed warnings 2013-09-05 10:04:56 +00:00