Commit Graph

8927 Commits

Author SHA1 Message Date
Robert Osfield
afcf54b108 Fixed the bounding sphere computation and handling of Drawable as the root of the scene graph 2014-05-14 16:52:18 +00:00
Robert Osfield
74f91037a7 Further work on Bound class/Node::getBound() and Drawable::getBound() and usage in OSG codebase 2014-05-14 16:01:40 +00:00
Robert Osfield
ff21af2b0d Cleaned up code 2014-05-14 16:00:08 +00:00
Robert Osfield
4174d72a52 2014-05-14 10:19:43 +00:00
Robert Osfield
12a737ae02 Changed the Node::ParentList to be a list of osg::Node rather than osg::Group, and added addChild, removeChild, replaceChild virtual method to Node to enable code
to user code compile with minimal modifications to account for the new change to the Node ParentList.
2014-05-13 08:43:07 +00:00
Robert Osfield
b2c7bacfe9 From Farshid Lashkari, "As discussed, I've added the ability to handle Drawable objects within the NodeVisitor class. Here is an overview of the changes:
- Added apply(Drawable) and apply(Geometry) to NodeVisitor

- Added accept(NodeVisitor) method to Drawable/Geometry

- Added traverse(NodeVisitor) to Geode which calls accept(NodeVisitor) on all Drawables

- Updated CullVisitor to use new apply(Drawable) to handle drawables. The apply(Billboard) method still manually handles the drawables since it is depends on the billboard settings. I needed to disable the traverse within billboard to prevent duplicate traversal of drawables.

- Update other osgUtil node visitors (GLObjectsVisitor, IncrementalCompileOperation, ..) to use new apply(Drawable) method.
"
2014-05-12 12:10:35 +00:00
Robert Osfield
ead92353fe Added beginnings of new osgUI library, a replacement for osgWidget that works fully in 3D/stereo and is scriptable. 2014-05-12 11:27:54 +00:00
Robert Osfield
490b351330 Replaced obsolete __linux usage. 2014-05-06 16:38:57 +00:00
Robert Osfield
cf66750d7b From Farshid Lashkari, "fix for the Collada loader where it would access a null string in some cases" 2014-05-02 09:12:36 +00:00
Robert Osfield
1f33e2a2a0 From Ali Botorabi, "recently I ran into a problem with Microsoft's Appverifier while using OpenThreads on win32 platform. The Appverifier complained about an invalid thread handle during starting of a new thread. After looking closer into the problem it seemed that indeed a potential root of problem may be in the thread startup code. See the line below in Win32Thread.cpp (line number 347):
pd->tid.set( (void*)_beginthreadex(NULL,static_cast<unsigned>(pd->stackSize),ThreadPrivateActions::StartThread,static_cast<void *>(this),0,&ID));

the method "pd->tid.set" sets the thread id, however via the startup function "ThreadPrivateActions::StartThread" that thread id is used (see further down the call hierarchy the line "int status = SetThreadPriority( pd->tid.get(), prio);".

Until now I never ran into any problem in debug or release builds, though. It seems that furtunately the tid.set method was executed always before the tid.get method in the startup code. However, this may make trouble in the furture. A simple solution is the following: just replace the line above with following two lines:

    pd->tid.set( (void*)_beginthreadex(NULL,static_cast<unsigned>(pd->stackSize),ThreadPrivateActions::StartThread,static_cast<void *>(this),CREATE_SUSPENDED,&ID));
    ResumeThread(pd->tid.get());


The trick is just starting the thread in suspended mode so the StartThread function does not get executed and we can safely store the tid by pd->tid.set. Then start the Thread by calling ResumeThread."
2014-05-02 09:11:16 +00:00
Robert Osfield
298f1c65b6 Renamed the new include/osg/OpenGL automatically configured header file to include/osg/GL replacing the original hand built GL header 2014-04-30 13:19:22 +00:00
Robert Osfield
a04232a75a From Pjotr Svetachov, "have added some missing serializers for RigGeomery. Withouth them I
ran into two issues.

At first you get a bunch of warnings that osg::ComputeBoundCallback
and osg::UpdateCallback were unsupported wrapper classes when
converting fbx models with skeletal animation to osg(t/b).

The second issue was that when reading, the readers fail to read the
ComputeBoundCallback and UpdateCallback and set them to NULL which
messes up the RigGeometry.

Because a RigGeometry makes his own classes in the constructor it
might be preferable to not write them at all, because now those
classes are being made two times when reading a RigGeometry. But after
thinking about this that would place too much limits on them (you
won't be able to share or name them and save that information or make
a new inherited class from them and write that one) So I ended up
thinking the best way was to just write the files.
"
2014-04-29 15:14:39 +00:00
Robert Osfield
2bb4e0566c From Pjotr Svetachov, "I had the osgvolume example crash on me when loading large volume
datasets due to an overflow in image.cpp after a unneeded cast from
unsigned int to int. Here is a small fix."
2014-04-28 14:58:36 +00:00
Robert Osfield
4dd3e3562f From Jason Beverage, "Here is a fix for a small race condition in osgDB::makeDirectory. It attempts to create all the directories in the given path and stops attempting to make directories when one of them fails. I've added a check to see if the failure occurred b/c the directory was created by another thread or process.
We were running into issues occasionally in osgEarth where multiple threads were writing out files like /1/2/3.jpg and /1/3/4.jpg.  Both threads would try to create the /1 directory and only one of them would succeed.  So the first thread would write out the full /1/2/3.jpg while the second thread wouldn't create the /1/3 directory b/c /1 was already created and the writing of /1/3/4.jpg would fail.
"
2014-04-28 14:57:05 +00:00
Robert Osfield
f5261b9877 Fixed type error 2014-04-28 11:53:58 +00:00
Robert Osfield
4994b806d2 From Pjotr Svetachov, "For me osgviewer.cpp and Renderer.cpp were not compiling (visual studio 2013 with profile GL2) because they were still using GLuintEXT. So I changed that, see the attached files.
I also noticed that the generated OpenGL header were not copied to the installation directory so my own application could not find it."
2014-04-25 08:57:27 +00:00
Robert Osfield
7b4d7cd221 From Farshid Lashkari, "I've attached a small fix to the Collada loader which prevents a null pointer access in some cases." 2014-04-24 17:26:46 +00:00
Robert Osfield
77f1c58345 From Lionel Lagarde, "In the ::apply method, when the image data need to be re-uploaded, the Texture2DArray checks if the TextureObject can be re-used. The test was made using the constant 1 instead of the real texture depth, so the TextureObject was never re-used." 2014-04-24 17:23:16 +00:00
Robert Osfield
bc5575f83a From Kristofer Tingdahl, "I and my team have gone over the code again, and we feel that we are comfortable in our current proposal for change. It goes deeper than it did before, and I explain why:
There was code in the osgViewer/Viewer.cpp and osgViewer/CompositeViewer.cpp that transformed the Y-coordinates of an event. The code in the composite viewer did however miss the touch-data of the event. I thought that it should really be the GUIEventAdapter that should know about this, and hence I added the
GUIEventAdapter::setMouseYOrientationAndUpdateCoords which is re-computing the coordinates. First I simply added a boolean to the setMouseYOrientation function:

setMouseYOrientation( MouseYOrientation, bool updatecooreds=false );

but then the serializer complained.

This function is called from both the Viewer and the CompositeViewer. We have not tested from the viewer, but I cannot see it would not work from visual inspection.

The other change is in MultiTouchTrackballManipulator::handleMultiTouchDrag. I have removed the normalisation. The reason for that is that it normalised into screen coordinates from 0,0 to 1,1. The problem with that is that if you have a pinch event and you keep the distance say 300 pixels between your fingers, these 300 pixels represent 0.20 of the screen in the horizontal domain, but 0.3 of the screen in the vertical domain. A rotation of the pinch-fingers will hence result in a zoom in, as the normalised distance is changing between them.

A consequence of this is that I have changed the pan-code to use the same algorithm as the middle-mouse-pan.

The rest of it is very similar from previous revision, and there has been some fine-tuning here and there.

"
2014-04-24 17:14:54 +00:00
Robert Osfield
ec658b115c Fixed reference invalidation bug. 2014-04-24 10:38:58 +00:00
Robert Osfield
a1342a6bf6 Added src/osg/OpenGL.in configuration file and include/osg/OpenGL header files 2014-04-23 19:30:33 +00:00
Robert Osfield
5597248895 Introduced new scheme for setting up which version of OpenGL/OpenGL ES the OSG is compiled for.
To select standard OpenGL 1/2 build with full backwards and forwards comtability use:

  ./configure
  make

OR

  ./configure -DOPENGL_PROFILE=GL2

To select OpenGL 3 core profile build using GL3/gl3.h header:

  ./configure -DOPENGL_PROFILE=GL3

To select OpenGL Arb core profile build using GL/glcorearb.h header:

  ./configure -DOPENGL_PROFILE=GLCORE

To select OpenGL ES 1.1 profile use:

  ./configure -DOPENGL_PROFILE=GLES1

To select OpenGL ES 2 profile use:

  ./configure -DOPENGL_PROFILE=GLES2


Using OPENGL_PROFILE will select all the appropriate features required so no other settings in cmake will need to be adjusted.
The new configuration options are stored in the include/osg/OpenGL header that deprecates the old include/osg/GL header.
2014-04-23 09:08:26 +00:00
Robert Osfield
c168887e5e From Paul Cheyrou-Lagreze, "Attached is fix/feature for FBX osgplugins against latest trunk:
- ReaderWriterFBX.cpp: add "z up scene axis" support:  FBX provides facility to convert model scene axis during conversion. Currently fbx plugin convert axis to fbx:opengl axis system (which is arbitrarily at Y up, as opengl is in reality axis agnostic) and sometimes what is needed is Z up so added an option for Z up conversion

- FindFBX.cmake: add support for latest fbx sdk ( 2014.2 )"
2014-04-09 17:40:27 +00:00
Robert Osfield
db6df6fefd Disabled warnings to address issues in FBX headers that generate lots of warnings that we can't fix. 2014-04-09 17:20:26 +00:00
Robert Osfield
a4a5957e2f From Remo Eichenberger, "I have extended the TIFF plugin that allows you to write LZW or JPEG compressed TIFF's. Options are:
tiff_compression = lzw | jpeg"
2014-04-08 12:00:52 +00:00
Robert Osfield
f2b746520b From Pjotr Svetachov, "We had a small problem converting skeleton animations from fbx to osgt
format. Turned out that the serializer didn't handle bone names with
spaces very well (the 3ds studio max biped for instance has spaces by
default). Here is a small fix for the problem."
2014-04-08 11:17:59 +00:00
Robert Osfield
ca4d93652d From Pjotr Svetachov, previous obj "commit broke compilation under visual studio 2013. To use std::not1 you need to include the functional header. Here is a fix." 2014-04-08 11:08:05 +00:00
Robert Osfield
391ab02573 From Jan Peciva, "I am sending four fixes to obj plugin:
- materialName used to be not stripped of whitespace, making number of models
fail to load materials; now fixed
- stripping was considering spaces only, thus models using tabs had problems
to load correctly; fixed
- fixed references to textures; they did not performed conversion to native
directory separators
- make d (dissolve) takes precedence over Tr (transparency); there seems to be
a confusion about the Tr item - some claiming 1 to be opaque and 0
transparent, while number of models uses exactly the opposite. d (dissolve),
if present in the model, does not suffer from this confusion, thus using it
instead fixes the problem for many many models.

I put many comments to the file concerning d and Tr item as others may further
investigate. Let me know in the case of any problems."
2014-04-07 14:17:57 +00:00
Robert Osfield
64979a0c1a From Marcel Pursche, "The problem is that when OpenThreads is build with the Linux pthreads implementation all threads inherit the processor affinity from their parent thread.
This behavior is also described in the pthreads man page (http://man7.org/linux/man-pages/man3/pthread_create.3.html):

>
> Linux-specific details
> The new thread inherits copies of the calling thread's capability
> sets (see capabilities(7)) and CPU affinity mask (see
> sched_setaffinity(2)).
>

To prevent this behaviour I wrote a patch that explicitly sets the affinity mask to all cores of the system, if no specific affinity was defined with PThread::setProcessorAffinity(unsigned int) .

Thank you!
"
2014-04-07 14:11:14 +00:00
Robert Osfield
20c0292e97 From Bjorn Blessing, "I got bored of the constant reports of “missing chunk 0xA08A” when reading 3ds-files. After a bit of research I discovered that this property is related to the advanced transparency settings for the material in 3D studio. In this case the falloff parameter. These controls affect the opacity falloff of a transparent material. And the property chooses whether falloff is in or out. I have added the property to the file reader BUT no changes are made to make this property propagate into the osgMaterial. But at least we get rid of this annoying error message." 2014-04-07 14:03:40 +00:00
Robert Osfield
88aa9ac5de From Bjorn Hein, "please find attached a small fix for RayIntersector.cpp.
* Changes are made against trunk
* Reason: crashes when using specific constructor from RayIntersector
* Info: Line 42:  added in constructor
RayIntersector::RayIntersector(const Vec3d& start, const Vec3d&
direction) missing initialisation of _parent
"
2014-04-07 13:52:01 +00:00
Robert Osfield
67b4d5412b Fixed iso surface shaders 2014-04-04 11:25:51 +00:00
Robert Osfield
d773d358c4 Improved the setting of sample density/ratio so that they are consistent 2014-04-01 18:56:57 +00:00
Robert Osfield
e5fe59799d Fixed handling of volume tiles with a region. 2014-04-01 18:33:02 +00:00
Robert Osfield
27b71e3927 Added cube and hull rendering support 2014-03-27 12:47:44 +00:00
Robert Osfield
2f8b0f7a70 Restructured the handling of TileData to make it more extensible and flexible. 2014-03-19 17:56:40 +00:00
Robert Osfield
d7944b6ca9 Addd ExteriorTransparencyFactorProperty for support of upcomming functionality of rendering a cube volume with a hull volume inside it. 2014-03-18 18:14:15 +00:00
Robert Osfield
ed724a730e Added support for animating volume hulls. 2014-03-17 15:54:52 +00:00
Robert Osfield
d703a2df44 From Stephan Huber, "attached is a fix for the rest-http-plugin which should fix the font-issue reported by Phil. The old implementation did forward all requests to the internal http-server via user-events. This prevented error-reporting for missing files, as the request was accidentally handled by the plugin. As a request for missing font-file succeeds and returned an empty file, the curl-plugin hands the data happily to the freetype-plugin which failed trying to load an empty font-file, obviously.
My fix was to rename the standard request handler to a specialized user-event-handler which handles only requests for "/user-event“

So fonts should work on iOS when loaded remotely, even when a local file is available and with the resthttp-plugin serving the presentation.
"
2014-03-13 14:02:50 +00:00
Robert Osfield
7f206fbf80 From Stephan Huber, fix for building lua plugin from local source 2014-03-13 13:59:34 +00:00
Robert Osfield
ea865d0ff9 Added support for directly invoking scripts using <run-script> and <run-script-file> to enable scripts to interact with each other. 2014-03-13 10:28:18 +00:00
Robert Osfield
75982f3379 Improved support for passing events between scripts and Present3D application 2014-03-12 11:01:09 +00:00
Robert Osfield
8f30a262f4 Added PresentationInterface class to make it more convinient to access the current presentation from scripting languages 2014-03-11 10:52:10 +00:00
Robert Osfield
ee266255eb Added scripting support for JumpData, KeyPosition, HomePosition and parts of SlideEventHandler that enable dispatching of user created events. 2014-03-10 19:08:46 +00:00
Robert Osfield
9b299dc4b9 Added ability to replace callback objects via lua scripts to allow one to override callbacks.
Added fallback for osgGA::Widget::Extents.
2014-03-07 11:09:25 +00:00
Robert Osfield
9319350176 Added support for osg::Image to the lua plugin. 2014-03-06 10:27:26 +00:00
Robert Osfield
076adcbd82 Implement add, set and get methods for StateSet. 2014-03-04 13:36:13 +00:00
Robert Osfield
218e36b12b Relaxed the handling of Image objects 2014-03-04 13:35:27 +00:00
Robert Osfield
c6e72ee00b Fixed handling of OverrideValue 2014-03-04 13:34:23 +00:00
Robert Osfield
2b67196418 From Stephan Huber, fix for handling font paths on a local machine when other files have been source from a remote machine. 2014-02-28 17:38:36 +00:00
Robert Osfield
de09adcaa9 Added MapReverseIterator implementation. 2014-02-27 10:02:55 +00:00
Robert Osfield
46381cb15c Added MapIteratorObject and support for it in the lua plugin to provide map iterator functionality. 2014-02-26 18:18:08 +00:00
Robert Osfield
9394215d31 Added Map serializer size() method and support for it in the lua plugin. Renamed functions in lua plugin to be more consistent. 2014-02-26 11:01:35 +00:00
Robert Osfield
69e9f2c973 Added support for vector and map containers in osgDB::Serailizer's and lua plugin. 2014-02-26 08:26:51 +00:00
Robert Osfield
4ef5d9eb5f Added Vector serialization and support in lua plugin top enable script users to set/get vector properties such as osg::Array, osg::PrimitiveSet and children lists. 2014-02-24 10:19:48 +00:00
Robert Osfield
6d68718fba Fixed handling of enums in Lua plugin.
Fixed computation of getNumPrimitives() so that it returns 0 when PrimitiveSet is zero.

Added missing properties to PrimitiveSet serializers
2014-02-13 18:52:41 +00:00
Robert Osfield
cb805d7be5 Added inital cut of PrimitiveSetSet wrappers to scripting 2014-02-13 11:01:36 +00:00
Robert Osfield
42705bff3f Added full range of Array subclasses to wrappers 2014-02-12 18:10:52 +00:00
Robert Osfield
743a6b049c Added initial support for wrapping osg::Array in a way that can be used via scripting. 2014-02-12 18:03:53 +00:00
Robert Osfield
2797e8cb7c Improved support for setting/getting properties via the osg::UserDataContainer. 2014-02-11 18:07:37 +00:00
Robert Osfield
e3a003a08f Quitened down debug messages 2014-02-11 10:56:51 +00:00
Robert Osfield
a9f8af3fb6 Changed implementation of enums to use strings as lua type to make it easier to do comparisons and track values 2014-02-11 09:43:08 +00:00
Robert Osfield
e21865ee33 Implemented Widget::handle, handleImplementation, traverse and travseImplementation() wrappers to enable them to be extended via scripting 2014-02-10 18:07:26 +00:00
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
1319c2d281 Added support for enum's in the Lua script integration 2014-02-08 10:39:20 +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
4016aed62d Moved experimental Widget class to osgGA
Add computeIntersections() to the osgGA::GUIActionAdapter base class to enable intersection tests without needing to directly link to osgViewer.
2014-02-06 17:32:41 +00:00
Robert Osfield
99eb81e743 Added support for casting objects to allow one to access a parent classes methods. 2014-02-06 11:25:37 +00:00
Robert Osfield
ca3737e002 Tweaked the detection of when the position transform for the hull is required. 2014-02-05 11:08:39 +00:00
Robert Osfield
2b8be97297 Added support for a <hull> tag that can be used within <volume> tag. 2014-02-05 11:07:03 +00:00
Robert Osfield
1909093cac Improved the white space trimming 2014-02-05 11:04:29 +00:00
Robert Osfield
c599189d7d Added lua-5.2.3 as source code so it can be optinally built as part of the lua plugin, making it possible to work out of the box across all platforms with needing lua as an external dependency.
Added the Cmake option OSG_USE_LOCAL_LUA_SOURCE to control whether to build and use the Lua source code in the lua plugin, or look for lua as an external dependency.
2014-02-04 16:49:13 +00:00
Robert Osfield
6bf6d5eeb2 Added test code for nesting a <hull> within a volume tag. 2014-02-04 16:46:33 +00:00
Robert Osfield
488e1692cc From Stephan Huber, added support for compile source code of lua with the lua plugin 2014-02-04 11:24:01 +00:00
Robert Osfield
f44369777f Fixed error in the computation of tex coords of Maximum Intensity Projection + Transfer Function rendering. 2014-02-03 15:35:22 +00:00
Robert Osfield
306a4f2d2d Replaced C cast to long with a static_cast<const void*>() to avoid a build error under Mingw 64. 2014-01-31 19:18:18 +00:00
Robert Osfield
5f8e2bda2f Added osg::CallbackObject to be used to extend C++ class from scripting languages by providing callback objects assigned to the osg::Object UserDataContainer, with the CallbackObject's Name used to map the "method" provided by the CallbackObject. The CallbackObject is implemented by the script engine to provide the neccessary glue to invoking the script with the appropriate input parameters and handling the output parameters.
To the Lua plugin added support for assigned lua functions to C++ osg::Objects via the new osg::CallbackObject mechanism.  To invoke the scripts function from C++ one must get the CallbackObject and call run on it.

Renamed ScriptCallback to ScriptNodeCallback to avoid possibly confusion between osg::CallbackObject and the ScriptNodeCallback.
2014-01-31 16:20:29 +00:00
Robert Osfield
4814a5341e Removed the invocation of gcc on all platforms 2014-01-28 15:28:17 +00:00
Robert Osfield
f7e6f0092c From Kristofer Tingdahl, "the vertical bar is upside down, and hence not as the documentation says it should be. This is corrected with this patch"
From Robert Osfield, changed the example so that the vertical and horizon scalar bars are rotated to the XZ plane so you can see them with the default viewer's camera orientation.
Tweaked the positioning of title text of vertic scalar bar to avoid overlap of text.
2014-01-28 11:01:28 +00:00
Robert Osfield
5292c7ca50 From Laurens Voerman, "I experienced a crash in Geometry::fixDeprecatedData(), on certain files, and brought the problem down to a very simple test file, attached as test3.zip.
There are two problems:
1> for DrawElementsUShortPrimitiveType (and UInt) the source_pindex still equals -1 and causes a crash
     in DrawElementsUBytePrimitiveType source_pindex is incremented, and in DrawElementsU(Short/Int)PrimitiveType primitiveNum is incremented, but never used

2> The drawelements need to be rewritten as the vertices are reordered.

created a patch for osg stable branch(r14038): attached as Geometry-osg-3.2.zip
and for svn brach(r14044): attached as Geometry_osg_svn.zip"
2014-01-24 17:31:09 +00:00
Robert Osfield
70bfad0371 From Aurelien Albert, "In the "apply" method of osg::FrameBufferObject, the draw buffers are always enabled, even if the target is only "READ_FRAMEBUFFER".
This can lead to inconsistency if you bind a framebuffer with multiple attachments in DRAW mode and then a framebuffer with different attachment count in READ mode (for example to manually "blit" from a FBo to another).

On some ATI cards (at least RADEON HD) this also leads to an "incomplete " FBO status

I've added a test to enable drawbuffers only if target is "DRAW" or "READ_DRAW", this solves my problems on ATI cards."
2014-01-24 17:06:32 +00:00
Robert Osfield
fcc34a8b45 From Michael Schanne, "small fix for a duplicate OR operand in KdTree.cpp." 2014-01-24 16:45:45 +00:00
Robert Osfield
1270236715 From Torben Dannhauer, VisualStudio 2013 build fixes 2014-01-24 16:24:59 +00:00
Robert Osfield
8a334e724b From Kristofer, "The osgSim::ScalarBar has a problem in that if the scalarbar has a color in one end that co-incides with the background color, one cannot see where the scalarbar ends. With this patch, we add a line around the perimiter of the bar to mark it.
Secondly, we thought the text-annotation missed ticks that mark out precisely where on the bar the texts relate to, so we added that as well."
2014-01-24 16:19:38 +00:00
Robert Osfield
8ae57c2797 From Marc Helbling, "I am sending a small fix in the PLY pseudo-loader; the extension was checked in plyfile.cpp thus preventing the loading of any .PLY file (extension in uppercase). The extension filtering is already handled by ReaderWriter::acceptsExtension in a case unsensitive way." 2014-01-24 16:01:59 +00:00
Robert Osfield
eb56080277 Fixed warnings 2014-01-24 15:40:18 +00:00
Robert Osfield
91b7104a92 Changed the handling of single window configurations so that simply reuse the View::getCamera() instead of creating a slave. 2014-01-24 14:26:25 +00:00
Robert Osfield
f0df819cbf Fixed crash when reading a viewer configuration file where the EventVisitor was being re-assigned but left a dangling pointer 2014-01-24 11:37:35 +00:00
Robert Osfield
29ab577bc3 From Stephan Huber, "attached is a new zip containing two small fixes:
* forwarded touch-events do have a correct input-range from 0 .. 1
* I refactored sending touch-events per osc so the receiver can detect a TOUCH_ENDED better"
2014-01-24 10:10:43 +00:00
Robert Osfield
4886a8941d Fixed warnings 2014-01-23 19:55:37 +00:00
Robert Osfield
d8482ef1ba From Kristofer Tingdahl,"we have a bunch of classes that inherit osg::Node, and they create their own, internal geometry which is passed into the render bucket at the cull-traversal. Last week, we realised that these classes are not accounted for when doing an ComputeBoundVisitor- traversal, as there is no specialization in ComputeBoundVisitor for them.
One solution is naturally to create a new class that would inherit the osg::ComputeBoundVisitor, and use that. I don't like that idea as the ComputeBoundVisitor does actually have what I need - it is only hidden in a protected function.

I am therefor suggesting a slight generalization of the ComputeBoundVisitor with the attached patch, which is tested.

The patch has two parts:
we add applyBBox() so that one can use that in a customized traverse-function and add a bbox to the visitor. I considered calling this function expandByBBox(), but I though  applyBBox was better.
The MatrixStack is made available to the outside world. That enables a traverse-function to do whatever it wishes.
I do actually only need one of the two, as I can implement what I wish either way, but adding getMatrixStack() will make more generic expansions possible.
"

From Robert Osfield, changed the name of the new applyBBox(..) method to applyBoundingBox(..) to keep it's naming more consistent with the rest of the OSG.
2014-01-23 16:48:29 +00:00
Robert Osfield
a96ad565c7 From Stephan Huber, "attached are some fixes to the osc-plugin and the touch-implementations for iOS and os x and other small bugfixes. These fixes will normalize the orientation of the touch points, and transmitting the touch points over osc via the TUIO-protocol works now more robustly between two osg-applications.
I added a new tag to p3d called forward_touch_event_to_device and renamed the existing forward_event_to_device to forward_mouse_event_to_device. This new tag will transmit touches to the virtual trackpad as touch events. I added the MultitouchTrackball to the p3d-app so zooming and moving a model remotely should now work, if you use forward_touch_event_to_device. I kept (and fixed) forward_mouse_event_to_device for background compatibility, so old presentations works as in previous versions, without the ability to zoom + scale. of course.

forward_touch_event_to_device needs some more testing, (e.g. with image-streams and keystone, afaik there’s no support for touch-events...) but for a first version it works nice.
"
2014-01-23 15:37:48 +00:00
Robert Osfield
09c09628ac Removed debug message 2014-01-23 10:56:17 +00:00
Robert Osfield
15882aae5f Changed the TransprencyProperty range to 0 to 2.0 to enable forcing opaque qualities on fragments 2014-01-23 10:50:55 +00:00
Robert Osfield
8876394c7c Cleaned up debug message. 2014-01-23 10:11:15 +00:00
Robert Osfield
ea429d5d46 Added clean up of osg::Program that are applied by the GLObjectsVisitor, which addresses a state leak that creates GL error once the main scene graph is rendered. 2014-01-23 09:41:09 +00:00
Robert Osfield
7f9f7dd216 Added GL_TEXTURE_2D_MULTISAMPLE to texture mode list. 2014-01-23 07:59:46 +00:00
Robert Osfield
4fef6a3c2f Refactored .p3d loader to make it less strict about the tag, property and value strings when matching them to supported values.
Examples of supported matches are:

   <Slide> and <slide> will be treated the same
   <bgcolor>WHITE</bgcolor> and <bgcolor>White</bgcolor> will be treated the same
   <text alignment="TOP_LEFT"</text> and <text alignment="top left"</text>,  <text alignment="TopLeft"</text> will all be treated the same
2014-01-22 16:29:45 +00:00
Robert Osfield
7fe3244c71 Added support for sampleRatio and sampleRatioWhenMoving <volume> properties 2014-01-22 11:25:54 +00:00
Robert Osfield
1678dc3562 Added support for osgVolue::SampleRatioProperty. Fixed build errors when compiling with ref_ptr<> automatic type conversion. 2014-01-21 18:48:53 +00:00
Robert Osfield
e48d6812fa Build fixes for when ref_ptr<> has no auto type conversion 2014-01-21 18:31:20 +00:00
Robert Osfield
504b42aa61 Fixed build error 2014-01-21 17:27:21 +00:00
Robert Osfield
779bd20fd5 Fixed build error due to typo. 2014-01-21 17:00:56 +00:00
Robert Osfield
752d40b118 Integrated multipass volume rendering shaders from OpenSceneGraph-Data 2014-01-20 17:23:11 +00:00
Robert Osfield
8a0e49d780 Removed nolonger used code paths 2014-01-20 16:21:24 +00:00
Robert Osfield
54a3f76a2b Disable depth test for rendering of hull backface 2014-01-20 15:54:48 +00:00
Robert Osfield
15399bbf35 From Kristofer Tingdahl, reimplement of AntiSquish node to avoid the use of an update callback.
From Robert Osfield, small ammendments to clean up header.
2014-01-20 11:00:09 +00:00
Robert Osfield
6246cd5d85 From Roni Zanolli,Added use of Qt's new devicePixelRatio() method to assist with handling the upscalling of resolution on iPhone for "retina" displays.
From Robert Osfield, changed Roni's code to use a #define GETDEVICEPIXELRATIO to access the versioned Qt devicePixelRatio() method to avoid duplication of the Qt version checking.
2014-01-20 10:40:49 +00:00
Robert Osfield
0d4a448c34 Fixed warning 2014-01-17 18:20:39 +00:00
Robert Osfield
8efe470d07 From Stephan Huber, fix for OSX build issue 2014-01-17 18:20:28 +00:00
Robert Osfield
e968caae80 From Kristoger Tingdahl, "the patch I sent to src/osgQt/CMakeModules.txt did not do the work on windows. I have fixed that, and also made it more generic so there is no special handling of qt5.2, but all qt5 are the same.
I have tested this on:

mac/qt5.2
linux/qt5.2
windows/qt5.2, and
mac/qt5.1

All platforms perform as expected.

The previous fix removed the -f flag to the moc-pre-processor, but on windows, it turned out that -f "osgQt/QGraphicsViewer" was needed.

This becomes an include-statement in the file generated by moc which is needed for compiling it. I ask you consider this patch for the trunk and the 3.2 branch.


Secondly, I wonder if it would be possible to apply my patch for FindRSVG.cmake from 22nd November in the 3.2 branch.

In short, the version of librsvg must be equal or higher to 2.35:

PKG_CHECK_MODULES(RSVG librsvg-2.0>=2.35)
"
2014-01-17 14:02:30 +00:00
Robert Osfield
354d79acd1 From Jordi Torres, "Fixed a typo in ReaderWriterCURL::ReaderWriterCURL() changed Psuedo for Pseudo." 2014-01-17 13:54:14 +00:00
Robert Osfield
235a52405d Fixed handling of background colours. 2014-01-17 12:40:58 +00:00
Robert Osfield
706afaccae Removed old redundent TexGen usage. 2014-01-16 17:26:35 +00:00
Robert Osfield
e8cd06c6e9 Added hull="hul-filename" property support to <volume> tag that can used thus:
<layer>
            <volume renderer="MultiPass" hull="cow.osgt.0,-2,-4.trans.50,50,50.scale">CardiacCT</volume>
        </layer>
2014-01-16 17:17:37 +00:00
Robert Osfield
1264ec736a Added support for controlling the extents of the volume rendering by nesting the hull underneath VolumeTile. Currently only supported by the new osgVolume::MultipassTechnique 2014-01-16 16:08:43 +00:00
Robert Osfield
110fbf89b0 Added per TileData RTT Camera in prep for rendering backface of volume to a depth texture 2014-01-09 09:41:43 +00:00
Robert Osfield
2efd52dda2 Changed near/far values to use CullVisitor::value_type and use std::numeric_limits<>. 2014-01-08 15:56:43 +00:00
Robert Osfield
889e4749ef From Farshid Lashkari, "I've attached a fix for the Collada loader that prevents a crash with some files containing textures. I also converted an OSG_NOTICE to OSG_INFO to be consistent with other log messages within the loader." 2014-01-08 10:33:00 +00:00
Robert Osfield
84d301715e Removed more odd characters 2014-01-08 10:31:36 +00:00
Robert Osfield
32d7a48712 Removed more odd characters 2014-01-08 10:28:24 +00:00
Robert Osfield
db82bb4ab1 Removed odd characters 2014-01-08 10:24:43 +00:00
Robert Osfield
d48091d37e From Farshid Lashkari, "I've attached a small change to the DAE writer to support writing out unknown transform types. It will essentially treat it as a matrix transform, using the the local to world matrix value." 2014-01-07 16:29:22 +00:00
Robert Osfield
7bc373a056 Bumped SO_VERSION number of OpenThreads to avoid conflicts with Debian SO_VERSION bump 2014-01-07 16:18:05 +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
fa7f25d75d Removed the prototype MethodObject classes 2014-01-06 15:46:36 +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
bfdcf4d8d1 Fixed build of V8 and Python plugins 2014-01-03 14:36:58 +00:00
Robert Osfield
afab78ed40 Preliminary support for wrapping methods in the lua script plugin. 2013-12-25 17:36:32 +00:00
Robert Osfield
865a47bd6b Added <switch> tag to .p3d to allow one to provide multiple ways to render children within a layer. 2013-12-20 09:57:35 +00:00
Robert Osfield
a72508bc71 From Kristofer Tingdahl, "the syntax of the moc executable has changed between 5.1.1 and 5.2.0 versions of qt (see below). The difference is that the <file> argument has become mandatory after the -f option.
Hence, moc will complain when osg throws in a -f without anything after it. Hence I propose removing the -f on Qt5 builds. I have tested building without -f on both qt520 and qt511, and that works well.

The attached src/osgQt/CMakeLists.txt that can be patched into 3.2 safely. For the trunk, I would consider dropping the check on the version, and simply remove the option on qt5. I have tested that on qt5.1.1, and that worked fine. Question is however if it works on qt5.0. Probably it does, so the question is simplicity of CMakeList.txt vs safety."
2013-12-19 17:13:24 +00:00
Robert Osfield
3e171414bd From Michal Durkovic, "I’m building current trunk on Mac OS X 10.9 and have encountered this error during linking of osgdb_lua plugin:
Undefined symbols for architecture x86_64:

  "lua::LuaScriptEngine::pushValue(osg::Quat const&) const", referenced from:

      PushStackValueVisitor::apply(osg::Quat const&) in LuaScriptEngine.o

  "lua::LuaScriptEngine::pushValue(osg::Plane const&) const", referenced from:

      PushStackValueVisitor::apply(osg::Plane const&) in LuaScriptEngine.o

ld: symbol(s) not found for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)



Looks like LuaScriptEngine was missing implementation of those 2 member functions. Fixed src/osgPlugins/lua/LuaScriptEngine.cpp file in attachment.

"
2013-12-19 13:53:40 +00:00
Robert Osfield
f16f278fea From Stephan Hunber, "attached you’ll find some changes to osg/p3d:
* a new command-line-option to present3d and a new option to the p3d-plugin to suppress any found <env> tags
* a new command-line-option to present3d to forward mouse-events via osgGA::Device (defaults to off) so we can test the interface-files with present3d better
* I added a new attribute forward_to_devices for click_to_event to forward the event to all attached devices instead of handling the event locally. This will fix the annoyance with the new interface-files when toggling polygon-mode or switching light on/off.

Here’s an example:

<click_to_event forward_to_devices="true">0x72</click_to_event>
"
2013-12-19 13:49:27 +00:00
Robert Osfield
02120e188e From Stephan Hunber, "I found some time and ported osgDB::FileUtils and DarwinUtils across new apis to fix the warnings about deprecated api-usage.
* osgDB::FileUtils uses now the Cocoa-API to determine the paths of the application-support-folder
* DarwinUtils uses now modern functions of the quartz-api to get and set screen-resolutions. Removed some of the osg-deprecated stuff.
"
2013-12-19 13:44:42 +00:00
Robert Osfield
a8dc460085 Implemented support for calling scripts from with Present3D. 2013-12-19 10:02:16 +00:00
Robert Osfield
591c5bae42 Added support for new osgVolume::MultiPassTechnique to Present3D. To use add property renderer="MultiPass":
<volume renderer="MultiPass">MyVolumeData</volume>
2013-12-17 12:18:06 +00:00
Robert Osfield
666aa81185 Added experimental image 3d downsample function. 2013-12-17 10:52:50 +00:00
Robert Osfield
723ecfad8d Removed the unused Texture::Extensions::numTextureUnits() 2013-12-16 11:28:10 +00:00
Robert Osfield
5571c361dc Implemented ability to switch between different shaders with new MultipassTechnique 2013-12-13 12:38:01 +00:00
Robert Osfield
939aa38a2a Added SampleRatioWhenMoving property and support to new osgVolume::MultipassTechnique. 2013-12-12 09:53:24 +00:00
Robert Osfield
a5c0127a6e Applied unquie CullVisitor::Identifier rather than reusing the cloned one. 2013-12-12 09:51:30 +00:00
Robert Osfield
2501f32e9a Changed epsilon to 1e-5 to address picking problems with planaer objects 2013-12-11 17:20:14 +00:00
Robert Osfield
e3bf55a266 Added initial support for 1D transfer functions to MultipassTechnique 2013-12-11 12:00:27 +00:00
Robert Osfield
ff4a0ce1e2 Added support for handling viewports with offset origins, and with it split stereo. 2013-12-10 13:38:27 +00:00
Robert Osfield
bc95ea97fb Introduced SampleRatioValueProperty for more intuitive control of how many samples to take when volume rendering 2013-12-10 10:43:48 +00:00
Robert Osfield
499adba97f Improvements to new MultipassTechnique 2013-12-09 10:39:01 +00:00
Robert Osfield
3858acf70f Further work on new MultipassTechnique/VolumeScene. 2013-12-06 19:31:12 +00:00
Robert Osfield
ed4deeb0fb From Mike Krus, compile fix to enable compiling across a wider set of versions. 2013-12-06 09:35:57 +00:00
Robert Osfield
1b3290221c Added support for using shaders to render the RTT textures with depth 2013-11-26 19:03:46 +00:00
Robert Osfield
477951b924 Replaced readShaderFile() usage to readRefShaderFile() 2013-11-26 10:38:35 +00:00
Robert Osfield
4fcf8d3e86 Added initial render to texture functionality into osgVolume::VolumeScene 2013-11-25 17:36:17 +00:00
Robert Osfield
f02ed3c629 Warning fixes 2013-11-22 10:27:15 +00:00
Robert Osfield
d3a7115c45 Removed trailing spaces, added missing return to last lines 2013-11-22 09:38:50 +00:00
Robert Osfield
5bea13c172 Added new osgVolume::VolumeScene and osgVolume::MultipassTechnique class shells that will be filled out to provide multi-pass volume rendering that handles mixing of
3D meshes with volume rendering and segmentation of volumes via a user defined hull mesh.
2013-11-21 18:17:44 +00:00
Robert Osfield
1b269a7711 From Stephan Huber, "CLang / LLVM on OS X seems to have a problem compiling the osgGA-serializer. (It was reported before on the list, but the error is hard to track as it shows up only sometimes)
I fixed the compile-error with a dedicated destructor of osgGA::GUIEventHandler"
2013-11-21 14:21:55 +00:00
Robert Osfield
a5d78953d4 From Farshid Lashkari, "I recently encountered an issue attempting to load an IVE file generated by an older version of OSG. The file contained dxt1 compressed image data with mipmaps. The loaded model would cause crashes when passing the mipmap data to glCompressedTexImage2D. It seems that the size of the data array within the IVE file did not match the computed size from Image::getTotalSizeInBytesIncludingMipmaps(). This essentially made the mipmap offsets invalid within the Image object.
I'm not sure if the IVE was simply generated incorrectly, or if the Image::getTotalSizeInBytesIncludingMipmaps() was modified since the file was generated. Either way, I added a simple check in the IVE loader so that it clears the mipmap offsets if the actual data size does not match the computed data size. This seems like a safe fallback since the mipmap data can be automatically generated, and it fixes the problem in my case.

Also, while looking into this issue, I noticed that the osgDB::InputStream class applies the serialized image allocation mode. However, since the serializer is allocating the image data itself, it seems like it should force the allocation mode to USE_NEW_DELETE.
"
2013-11-21 13:59:00 +00:00
Robert Osfield
1e2bead9bc Converted std::max to osg::maximum to fix VS2013 build error 2013-11-21 11:02:08 +00:00
Robert Osfield
a54b999ccc Added Geometry::drawVertexArraysomplemetation(..) and drawPrimitivesImplemenation(..) methods that are called from drawImplementation(..). These new vertex methods
allow subclasses from osg::Geometry to specialize the vertex array setup or how the primitives are dispatched to OpenGL.
2013-11-21 10:31:34 +00:00
Robert Osfield
dbf88cc209 From Stephan Huber, "minor ios-fixes/-enhancements
* force _OPENTHREADS_ATOMIC_USE_BSD_ATOMIC for IOS device + simulator as the test does not pick the right implementation
* fixed a small compile-bug for iphone-example
* added a check to prevent multiple realization of a GraphicsWindowIOS-object
"
2013-11-18 14:21:06 +00:00
Robert Osfield
e0d3ab4412 From Stephan Huber, * GUIEventAdapter: add support for getting normalized touch points
* MultiTouchTrackball: some code cleanup and support for normalized touch-points
* oscdevice: receiving and sending multi-touch-events via the Cursor2D-profile from TUIO
* added some documentation
2013-11-18 13:25:55 +00:00
Robert Osfield
c194e92df8 Moved Handled propety from GUIEventAdapter to Event base class.
Added CameraManipulator::finishAnimation() method to allow application code to stop any animation/throw of manipulators.
2013-11-15 16:15:09 +00:00
Robert Osfield
835d9455a9 Restored the rescaleToZeroToOneRange() to address rendering issues. 2013-11-12 14:21:00 +00:00
Robert Osfield
eede49d15c Removed unused variables 2013-11-11 10:55:51 +00:00
Robert Osfield
829cd9718a From Stepan Huber, "attached are my changes for the osc, zeroconf and resthttp-plugin to use the new event-class. I refactored the osgoscdevice-example so that it’s working again. " 2013-11-08 12:28:51 +00:00
Robert Osfield
25b8b8bd16 Quietened down debug messages 2013-11-08 12:25:35 +00:00
Robert Osfield
70c78264dc Changed the LineSegmentIntersector to RayIntersector to provide more reliable intersections with flat meshes. 2013-11-07 12:37:10 +00:00
Robert Osfield
7a2900e238 Added osgUtil::Intersector::PrecisionHint member and set it's default to USE_DOUBLE_COMPUTATIONS, and implemented support for use double or float maths internally in LineSegmentIntersector and RayIntersector classes 2013-11-07 12:35:34 +00:00
Robert Osfield
2ebe81cb0e Fixed handling of web cams 2013-11-06 09:49:51 +00:00
Robert Osfield
6f6c44446c Introduced a cast(T) method into the ImageUtils template functor to allow code reading images to handle casting from source data to a form that a user can use more conviently 2013-11-06 09:23:21 +00:00
Robert Osfield
ef3a65b93f Restructed the call to avformat_open_input to provide more information. 2013-11-06 09:20:35 +00:00
Robert Osfield
2b3665f010 Fixed typo 2013-11-05 15:23:32 +00:00
Robert Osfield
ff8fe4143e From Likasz Izebski, "added support for etc2/eac compression" 2013-10-28 12:03:55 +00:00
Robert Osfield
ac383e15c1 Added explict setting of the PolygonMode to over the distion mesh being toggled to wireframe. 2013-10-25 15:47:41 +00:00
Robert Osfield
4a660f6266 Introduce new osgGA::Event and osgGA::EventHandler base classes that the old GUIEventAdapter and GUIEventHandler now subclass from.
The new osgGA::Event is written to support more generic events than the original GUIEventAdapter which are written for keyboard and mouse events.
2013-10-25 14:54:15 +00:00
Robert Osfield
191eabd3ab Fixed warning 2013-10-25 09:02:39 +00:00
Robert Osfield
b3603f76e4 Removed depreated glib call 2013-10-24 19:56:04 +00:00
Robert Osfield
95e8d2838c Fixed FileInfo self intialization bug 2013-10-24 19:32:00 +00:00
Robert Osfield
1861e025e9 Fixed build problems with the OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION off 2013-10-24 17:43:02 +00:00
Robert Osfield
37fa2d698f From Stephan Huber, add support for controlling the OSXMenubarBehavior set by DisplaySettings. 2013-10-24 10:10:16 +00:00
Robert Osfield
234adf7daf Cleaned up addChild/getChild/setChild/getNumChildren methods and added readNodeFile, readImageFile and readObjectFile functions 2013-10-24 09:06:52 +00:00
Robert Osfield
f548bc79d4 Added support for Group::addChild/setChild/getChild/getNumChildren. 2013-10-23 16:17:26 +00:00
Robert Osfield
c45f3aa4fb Merged changes to DisplaySettings from Stephan Huber in prep for controlling the menu hiding behaviour under OSX.
Added new WindowSystemInterface::setDisplaySettings() method to provide a mechanism for passing settings onto the WindowSystemInterface so it can then set up the system appropriately.

Added assignment of the DisplaySettings to the WindowSystemInterface in Viewer/ComppsiteViewer::realize().
2013-10-22 19:12:34 +00:00
Robert Osfield
b7b7186cf8 Preliminary remapping of internalFormat for GL3 core profile 2013-10-22 18:58:15 +00:00
Robert Osfield
3dba54c10a Fixed warnings 2013-10-22 16:28:20 +00:00
Robert Osfield
1196f153fc From Colin McDonald, "The osgt/osgb file formats output a scenegraph node with the type
set to "SCENE" in the file header.  But if the file is stored and
then extracted again from an osga archive this header info is lost,
and the resulting file is just an "OBJECT".  Possibly other plugin
operations would have the same effect.  The osgt/osgb plugin won't
then return the scenegraph contents.

I have updated the osgt/osgb plugin to return a node from an "OBJECT"
file."
2013-10-22 11:32:21 +00:00
Robert Osfield
c34a8e4ddb From Colin McDonald, "The osgb file reader uses seek to position within the file.
But the nested stream implementation for osga archive files doesn't
support seeking.  So osgb files can't currently be used in an osga
archive e.g. if osgdem is used to output a osgb format database it
can't be packaged in an archive file, in the same manner that ive
files could.

I've added seek support to the osga nested stream implementation."
2013-10-22 11:26:45 +00:00
Robert Osfield
5ed399ca48 Fixed handling of osg::Program so that it's not overriden by shader composition when enabled 2013-10-22 11:18:28 +00:00
Robert Osfield
4493d11ca3 Added State::releaseGLObjects() and ShaderComposer::releaseGLObjects() to avoid problems with cleanup of graphics context 2013-10-21 16:35:12 +00:00
Robert Osfield
074eb8e41c Build fixes for clang 2013-10-21 09:54:41 +00:00
Robert Osfield
a68f0f26a8 From Farshid Lashkari, "previously discussed change to the dae loader which applies the node ID as a "dae_node_id" user value." 2013-10-18 09:57:49 +00:00
Robert Osfield
5bfb2ef26d From Konstantin Matveyev, "Multiple light fix in FBX-importer" 2013-10-18 07:55:26 +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
a97e092619 Fix for error in getting the uniform block max name length, fix suggested by Christopher Fennell. 2013-10-17 18:29:39 +00:00
Robert Osfield
eb7c2ae3f7 Added set/get to the ImageSerializer and removed some redudent comments 2013-10-10 20:43:03 +00:00
Robert Osfield
cd86995d7d From Pjotr Svetachov, "With the new osg::Geometry the binding for arrays now default to undefined. This breaks previously working code in osgAnimation::RigTransformHardware where the arrays got an undefined bounding and because of this the bone indices and weights were not loaded by the shader. Here is a little patch to fix this." 2013-10-10 20:42:24 +00:00
Robert Osfield
4e4d2b35cf Added get/set method to Serializer to allow pointer passing without going through InputStream/OutputStream. 2013-10-10 09:28:26 +00:00
Robert Osfield
9c53794bc7 Implemented preliminary readNode/readImage support in the lua plugin allow a lua script to create a scene graph as return it. 2013-10-09 15:32:56 +00:00
Robert Osfield
e8b5272b02 From Stephan Huber, "attached you’ll find a bunch of fixes + enhancements for iOS and OS X based on current trunk. I incorporated + tested the submission from Colin Cochran, so his submission is not needed anymore.
* fixed a bug with multi-touch and touch-id-generation on iOS and OS X. (will fix a bug reported by Colin Cochran, without ditching the existing logic)
* removed unnecessary warning-flagss when generating xcode-projects via cmake, will enable the usage of OSG_AGGRESSIVE_WARNING_FLAGS
* added support for 10.9 (OS X)
* new cmake-variable: IPHONE_VERSION_MIN, this will set the deployment-target (previously hard-coded) If you set the IPHONE_VERSION_MIN to something like 7.0 osg gets compiled also for 64bit (amd64)
* cmake defaults now to the clang compiler if IPHONE_VERSION_MIN > 4.2
* cmake now sets some xcode-settings so the compiler uses the c++98-standard (clang defaults to c++11, w/o this I got a lot of linking errors)
* removed include-dir for avfoundation-plugin as not needed on OSX/IOS.
* enhanced the ios-example, will now show multitouch-information on a hud (similar to the  osgmultitouch-example), and more importantly, will compile + link out of the box
* small enhancements for the osc-device-plugin (send only one msg for MOVE/DRAG, even if multiple msgs/event is enabled)
* better memory-handling for the zeroconf-plugin
* fixed a possible bug in the rest-http-plugin when receiving mouse-events.
* incorporated a fix from Colin Cochran "forwarded touch events are not transformed into the GL UIView“
"
2013-10-07 10:05:09 +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
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
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
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
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
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
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
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
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
Robert Osfield
0d2825e06f From Alberto Luaces, "current versions of ffmpeg render «url_feof» macro as obsolete. The fix
is very simple and it is contained in the attached file."
2013-09-05 08:42:00 +00:00
Robert Osfield
73250601f0 Added missing Model.cpp 2013-09-05 08:22:27 +00:00
Robert Osfield
856ec46467 Added PrintProperties visitor 2013-09-04 16:25:18 +00:00
Robert Osfield
ccf7bbdb50 Added PrintPropertiesAction to osgPresentation 2013-09-04 15:39:17 +00:00
Robert Osfield
9f5e131203 Added Action class NodeVisitor that supports osgPresentation nodes. 2013-09-04 10:33:11 +00:00
Robert Osfield
3c106e4dd7 Added test for osgPresentatation::Group::getSupportedProperties() 2013-09-03 15:50:28 +00:00
Robert Osfield
fdfe3210ce Added beginings of Text implementation 2013-09-03 10:17:06 +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
b9ecec6452 Refactored the use of epsilon in the clamping of the start/end points of the LineSegmentIntersector to better handle numerical precision issues. 2013-09-02 10:56:14 +00:00
Robert Osfield
698365e47f Fixed double copy in StackedTransform copy constructor 2013-09-02 09:12:24 +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
ef32fab30e Added color property to FontData parsing 2013-08-23 11:42:52 +00:00