Commit Graph

12616 Commits

Author SHA1 Message Date
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
661f0e69ef Updated ChangeLog 2014-01-29 11:01:24 +00:00
Robert Osfield
d63c6f6978 From Kristofer Tingdahl, made method virtual 2014-01-28 16:49:20 +00:00
Robert Osfield
fba7a65fb4 Fixed MingW build's handling of debug d postfix. 2014-01-28 16:48:47 +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
4f19237467 Removed unimplemented method 2014-01-27 15:43:36 +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
1ec3ec1247 From Torben Dannahuer, "modified findcollada.cmake which can now detect Boost 1.55 libraries, which are used by Collada in my 3rdParty package" 2014-01-24 16:28:34 +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
15f44c8736 Added a getModeUsage() method that prevents any mode being automatically associated with these Texture types that are only usable using non fixed function pipeline. 2014-01-24 12:01:37 +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
fd85542d8f Cleaned up the Qt find package, and made changed the default threading model to SingleThreaded when using Qt5 to avoid crash due to regresssion since Qt4. 2014-01-23 10:09:53 +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
405cb0d828 Made protected methods virtual to allow subclassing to customize more aspects of the window setup. 2014-01-22 17:29:44 +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
c63bebd8c3 Build fixes for when ref_ptr<> automatic type conversion is turned off 2014-01-21 18:58:52 +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
b41e5ccc77 Changed the default directory for the output files to be the current working directory,
with the --write-to-source-file-directory added to allow one to have the original behaviour
of writing to the same directory as the original source file.
2014-01-20 17:03:29 +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
5cb305041d From Stephan Huber, "recent commits regarding GLuint64EXT broke the build for GLES1 and GLES2. Attached you’ll find a fix which hopefully work for every platform." 2014-01-20 15:10:49 +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