Commit Graph

2131 Commits

Author SHA1 Message Date
Robert Osfield
bff5b0261b Implemented skirt functionality
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14475 16af8721-9629-0410-8352-f15c8da7e697
2014-11-14 16:47:32 +00:00
Robert Osfield
7a33cc00cd Improvements to the ShaderTerrain experiemental terrain rendering technique.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14466 16af8721-9629-0410-8352-f15c8da7e697
2014-11-04 20:07:40 +00:00
Robert Osfield
28a676e105 Replaced use of while(isRunning()) { YieldCurrentThread(); } style loops with use of join() to avoid false positives being reported by valgrind when using the helgrind tool for thread debugging.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14460 16af8721-9629-0410-8352-f15c8da7e697
2014-11-04 10:46:59 +00:00
Robert Osfield
997ee30039 Added experimental osgTerrain::ShaderTerrain TerrainTechnique to osgterrain example to flesh out new shader based displacement mapping approach to osgTerrain databases.
Requires shader files place in OpenSceneGraph-Data/shaders from OpenSceneGraph-Data's svn/trunk to function.

Run osgterrain example with --shader command line option to select displacement mapping shader approach.



git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14458 16af8721-9629-0410-8352-f15c8da7e697
2014-10-21 15:08:44 +00:00
Robert Osfield
acbad2424e Changed osgvolume example to use the new tf plugin rather than having local code for reading transfer function
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14450 16af8721-9629-0410-8352-f15c8da7e697
2014-09-16 17:40:13 +00:00
Robert Osfield
0db0bcdd5e Build fix
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14439 16af8721-9629-0410-8352-f15c8da7e697
2014-09-08 08:53:23 +00:00
Robert Osfield
2032be209a Fixed build
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14411 16af8721-9629-0410-8352-f15c8da7e697
2014-08-19 09:00:42 +00:00
Robert Osfield
50e63ad3ee Added readScript/writeScript methods to ReaderWriter
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14366 16af8721-9629-0410-8352-f15c8da7e697
2014-07-14 15:59:06 +00:00
Robert Osfield
5a7a20d01e Renamed osgDB::PropertyInterface to osgDB::ClassInterface to better reflect it's functionality
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14365 16af8721-9629-0410-8352-f15c8da7e697
2014-07-14 14:09:08 +00:00
Robert Osfield
b8dbebeca7 Changed the default image output format to .osgb as .dds isn't able to represent signed byte, short and int data correctly.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14346 16af8721-9629-0410-8352-f15c8da7e697
2014-07-02 15:34:37 +00:00
Robert Osfield
43a068b156 Add dds no flip on write option to prevent output of .dds volume from being flipped by the dds plugin.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14339 16af8721-9629-0410-8352-f15c8da7e697
2014-06-30 15:31:36 +00:00
Robert Osfield
977ec20751 Refactored Callback system in osg::Node, osg::Drawable, osg::StateSet and osg::StateAttribute to use a new osg::Callback base class.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14244 16af8721-9629-0410-8352-f15c8da7e697
2014-06-05 16:26:13 +00:00
Robert Osfield
6ea4f4a939 From Pjotr Sventachov and Robert Osfield, added callback unit test to osgcallback example, to use test run osgcallback --test, if everything is functioning then test1 to test7 messages should be reported to the console. 2014-06-03 15:05:51 +00:00
Robert Osfield
333a16a88d Reverted change of Node::ParentList from being a vector<Node*> back to a vector<Group*> 2014-06-03 09:52:55 +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
4174d72a52 2014-05-14 10:19:43 +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
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
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
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
958a7d0ab0 Added osg::CallbackObject suport to the experiment Widget base class to enable script language extension of widgets 2014-02-06 17:04:40 +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
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
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
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
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
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
c63bebd8c3 Build fixes for when ref_ptr<> automatic type conversion is turned off 2014-01-21 18:58:52 +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
0ee9f732b8 From Sebastian Messerschmidt, "Original shader was not running on various NVidia cards due to old syntax in shader." 2014-01-07 16:15:50 +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
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
e3bf55a266 Added initial support for 1D transfer functions to MultipassTechnique 2013-12-11 12:00: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
3858acf70f Further work on new MultipassTechnique/VolumeScene. 2013-12-06 19:31:12 +00:00
Robert Osfield
4fcf8d3e86 Added initial render to texture functionality into osgVolume::VolumeScene 2013-11-25 17:36:17 +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
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
d7442e7456 Added panning and zooming functionality to transfer function UI prototype code. 2013-11-18 12:46:00 +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
1a90789402 Added support for assinging and display transfer functions 2013-11-08 12:26:14 +00:00
Robert Osfield
fef39b6215 Re-enabled the disable of the transfer function 2013-11-06 09:50:16 +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
a10e9c6950 Added initial shell of new osgtransferfunction example that will be tested bed for upcomming transfer function editing UI. 2013-10-28 17:46:07 +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
2a9ed125b8 Fixed warning 2013-10-24 20:22:13 +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
7de6a0c9e2 From Stephan Huber, build fix 2013-10-17 14:02:15 +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
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
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
351f98b10d Added test for osgGA::GUIEventAdapter 2013-09-23 14:10:36 +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
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
9201cf8d00 Moved the property test from the model to presentation to test out the property inheritance scheme 2013-09-04 17:27:26 +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
7c78101621 Added IO test for new osgPresentation nodes 2013-09-02 08:29:09 +00:00
Robert Osfield
fcde15e136 Added test for serializers and fixed serializers 2013-08-22 07:49:22 +00:00
Robert Osfield
bd7ec9c5f7 Added initial cut of basic scripting support, introducing an osg::Script object to wrap up the individual scripts, osg::ScriptCallback for assigning a Script as node callback and an osg::ScriptEngine base class that plugins implement to provided support for specific scripting languages.
Provided are lua, python and V8 (for javascript) plugins that just open up enough of a link to the respective libs to run a script, there is no scene graph <-> script communication in current implementation.
2013-08-09 16:51:06 +00:00
Robert Osfield
835ee7aa8e Added osgpresentation example as a test bed for new osgPresentation object model.
First cut of example test bed is to test how easy it is to build against Lua, V8 and Python for purposes of running embedded scripts.
2013-08-07 17:08:38 +00:00
Robert Osfield
a1bda7d39e Removed #if 0 #endif block 2013-07-19 10:11:42 +00:00
Robert Osfield
e7b86099d1 Fixed problem with the osgviewerQt code override the default View::Camera without setting it's default state on it's StateSet like View does by default. 2013-07-19 09:43:54 +00:00
Robert Osfield
592c580721 Replaced deprecated osg::Geometry::set*Binding() usage. 2013-06-27 09:59:33 +00:00
Robert Osfield
4b9aa1fd24 Replaced deprecated osg::Geometry::set*Binding() usage. 2013-06-27 09:54:12 +00:00
Robert Osfield
1793466442 With assistance from Sukender, moved the depreacted osg::Geometry vertex indices and AttributeBinding definitions out into a separated namespace/class so to use
deprecated features you should now use deprecated_osg::Geometry in place of osg::Geometry.
2013-06-25 16:10:24 +00:00
Robert Osfield
ceb97fe230 From Christian Buchner, "Here is a strongly overhauled version of the original osgoit ("order independent transparency") by Mathias Fröhlich. I called this version myosgoit. It looks very nice, just build and run it!
This version adds:

- an encapsulation of the entire Depth Peeling procedure into a class (not currently a scene graph node) for easier integration in other projects.

- compositing with opaque (solid) geometry is possible and the opaque model is only rendered once. This needs to performs some depth buffer blitting between FBOs.

- mix and match with GLSL shaders in the transparent objects is possible, as demonstrated with a 3D heat map intersecting an opaque truck model.


Some Drawbacks:

- the display framebuffer does not receive any depth information from the compositing camera. This could be fixed by compositing with a GLSL shader and writing to FragDepth."

From Robert Osfield, ported the code to work under Linux and without the automatic ref_ptr to C* conversion.
2013-06-25 11:13:50 +00:00
Robert Osfield
15fea448d8 Added new osg::Array::Binding parameter to osg::Geometry::set*Array(osg::Array* array, osg::Array::Binding binding=osg::Array::BIND_UNDEFINED) methods to make it easier for the user
to set the binding without the need to call the deprecated osg::Geometry::set*Binding(osg::Geometry::AttributeBinding)
2013-06-21 09:43:15 +00:00
Robert Osfield
d82c62a03b Removed spaces at ends of lines 2013-06-21 09:40:43 +00:00
Robert Osfield
2ab3a1e316 Removed svn:executable property. 2013-06-19 17:28:28 +00:00
Robert Osfield
df075ef9bb Cleaned up usage of BIND_PER_PRIMITIVE where possible. 2013-06-19 16:24:59 +00:00
Robert Osfield
744960bbf2 Build fixes for new deprecated osg::Geometry functions 2013-06-19 10:56:31 +00:00
Robert Osfield
297a8a221b Added #define OSG_USE_DEPRECATED_GEOMETRY_METHODS usage into code to allow code to compile enen when CMake configuration has set the #define to off in include/osg/Config. 2013-06-18 19:09:33 +00:00
Robert Osfield
7d40c7258f Clean up up osg::Geometry, removing long deprecated support for array indices and BIND_PER_PRIMITIVE binding that forced OpenGL slow paths. osg::Geometry is now smaller and only supports OpenGL fasts paths.
New methods osg::Geometry::containsDeprecatedData() and osg::Geometry::fixDeprecatedData() provide a means for converting geometries that still use the array indices and BIND_PER_PRIMITIVE across to complient
versions.

Cleaned up the rest of the OSG where use of array indices and BIND_PER_PRIMITIVE were accessed or used.
2013-06-18 11:18:28 +00:00
Robert Osfield
1a7f2fcb3e Introduced new osg::PatchParameter StateAttribute class to wrap up glPatchParameter associated state.
Note, osg::Program::setParameter(GL_PATCH_VERTICES,num); is nolonger support and should be replaced by using the new PatchParameter class.
2013-06-11 10:52:37 +00:00
Robert Osfield
4623c251bb Fixed indentation 2013-06-11 10:49:57 +00:00
Robert Osfield
bdfd18dc03 From Kristofer Tingdahl, with additions from Riccardo Corsi and Robert Milharcic, support for Qt5 build 2013-06-10 14:34:25 +00:00
Robert Osfield
a6e57026b2 From Mathias Froehlich, "attached is a change to osgsharedarray to move completely to the fast geometry
path. Also the arrays are moved back to static storage since this is the data
that is actually referenced in draw. So the change moving this onto the stack
that happend somewhere before broke this."
2013-06-07 10:52:29 +00:00
Robert Osfield
a70318fbd5 Removed now redundent osggeodemo 2013-06-04 14:43:19 +00:00
Robert Osfield
bab251fc59 Cleaned up BIND_PER_PRIMITIVE and array indice usage 2013-06-04 10:06:19 +00:00
Robert Osfield
caa3a06c70 Introduced GeometryNew which is a cleaned up version of Geometry that removes support for array indices.
GeometryNew is only temporary and will be renamed to Geometry on the completion of refactoring work and feedback from community.
Ported osggeometry across to use GeometryNew.
2013-06-04 09:32:59 +00:00
Robert Osfield
4cca5c1d1c Removed deprecated usage of osg::Geometry indices and BIND_PER_PRIMITIVE 2013-06-04 09:29:37 +00:00
Robert Osfield
47f574429a From Marcin Prus and Robert Osfield, moved the key parts of the .dds plugins computeRowWidthInBytes implementation into the osg::Image::computeImageSizeInBytes(..) to
address bugs in the computation of image size.
2013-05-28 14:14:45 +00:00
Robert Osfield
02e4aef5cb From Martin Naylor, "I am receiving 1 build error whilst building the SVN, its in osgforest as follows:
error C2065: 'GL_RGBA32F' : undeclared identifier

Shoudlnt that be GL_RGBA32F_ARB as defined in texture header?

Attached is the easy fix :)."
2013-05-27 08:13:23 +00:00
Robert Osfield
2923c8014a From Jordi Torres, "We must use JNI_FALSE instead of false in JNI code. Otherwise the examples will not compile. This patch should be applied to osgAndroidExampleGLES1/jni and osgAndroidExampleGLES2/jni. the osgNativeLib.cpp is the same. " 2013-05-24 17:06:08 +00:00
Robert Osfield
5de095cb1d From Pawel Ksiezopolski, Added example of using osg::TextureBuffer + GLSL to render forest. 2013-05-23 15:55:22 +00:00
Robert Osfield
455ebbc5f1 Refactored the support for stereo and keystone RTT setup so that it can be applied to an existing Camera. 2013-05-20 19:24:34 +00:00
Robert Osfield
6cb26321a9 Reverted back to changes before experiements with ViewConfig 2013-05-16 14:07:35 +00:00
Robert Osfield
3b6c2b636a Renamed osgViewer::Config osgViewer::ViewConfig and moved it's declaration into include/osgViewer. 2013-05-16 10:11:06 +00:00
Robert Osfield
e3ed763c15 Added WoWVxDisplay view config 2013-05-16 09:08:27 +00:00
Robert Osfield
625821a91a Created a dedicated include/osgViewer/config and src/osgViewer/config directories to place all the Config classes. 2013-05-15 16:15:38 +00:00
Robert Osfield
4e34cadee2 Added to Viewer::realize() automatic setup using Keystone when available and enabled, and when no other window setup has been selected. 2013-05-13 09:18:37 +00:00
Robert Osfield
9402efe38e Added DisplaySettings::KeystoneHint flag that can be set via --keystone-on and --keystone-off command line parameters, and the OSG_KEYSTONE env var 2013-05-10 17:59:07 +00:00
Robert Osfield
5dd07e4d1c Added keystone file handling 2013-05-10 16:06:10 +00:00
Robert Osfield
9eb5465ff5 Added --keystone <filename> command line support into DisplaySettings, and added OSG_KEYSTONE_FILES env var support into osg::DisplaySettings. 2013-05-10 11:56:09 +00:00
Robert Osfield
9c1c34d765 Moved Keystone support from osgkeystone example into osgViewer::View 2013-05-10 10:00:38 +00:00
Robert Osfield
e545627571 Moved Keystone class into osgViewer library. 2013-05-09 15:18:14 +00:00
Robert Osfield
046c3fca7a Cleaned up event handler and namespaces in prep for integrating keystone functionality into osgViewer 2013-05-07 14:43:36 +00:00
Robert Osfield
8810d27f7c Added keystone support for left eye, right eye and quad buffer stereo 2013-05-07 13:34:47 +00:00
Robert Osfield
9bb4ed08e1 Added keystone setup to vertical split stereo suport and cleaned up the horizontal split stereo code 2013-05-07 11:13:50 +00:00
Robert Osfield
668d351765 Introduced new scheme for handling mouse events with osgViewer. The new scheme enables robust event handling even when using distortion correction render to texture Cameras. 2013-05-03 19:26:27 +00:00
Robert Osfield
a2615388db Refactored Keystone setup as a step toward integrating Keystone correction with stereo 2013-04-18 17:02:57 +00:00
Robert Osfield
adea6c9329 Implemented stereo support into osgkeystone as a testbed for moving stereo support from SceneView into osgViewer 2013-04-18 09:47:28 +00:00
Robert Osfield
65f23ba9af Implemented initial cut of anaglyphic stereo 2013-04-17 11:04:12 +00:00
Robert Osfield
bc288d23dc Added support for enable/disabling the keystone editing using the Ctrl-g key to toggle the UI and grid on/off. 2013-04-12 13:01:51 +00:00
Robert Osfield
efbf05cd59 Moved keystone event handler onto the keystone distortion Camera. 2013-04-12 09:05:11 +00:00
Robert Osfield
835a80ae90 Refactoed the grid rendering so that it's now implemented as part of the distortion mesh pass, leaving the main scene graph alone. 2013-04-12 08:52:21 +00:00
Robert Osfield
f79d89e0ce Add support for a finer grained mesh on the distortion mesh for higher quality results. 2013-04-11 17:12:32 +00:00
Robert Osfield
7ff4be954b Moved the keystone geometry computation into a Keystone::compute3DPositions(..) method 2013-04-11 16:07:49 +00:00
Robert Osfield
830d21471b Removed old experimental keystone code to clean up the example 2013-04-10 16:36:49 +00:00
Robert Osfield
18d14065a5 Changed the way that the keystone geometry is calculated. 2013-03-28 10:46:24 +00:00
Robert Osfield
3cccecb79d Added keypad control of corner points 2013-03-27 16:29:01 +00:00
Robert Osfield
b1c342c027 Introduced shearing of the image 2013-03-26 16:47:52 +00:00
Robert Osfield
a5cea75d47 Improved the setup of the keystone distortion correction mesh. 2013-03-26 11:00:05 +00:00
Robert Osfield
6c723df2d6 Added keystone grid to aid editing 2013-03-21 11:35:21 +00:00
Robert Osfield
bc3cff2406 Added arrow key support. Added support for using ctrl and shift keys to modulate how senstive the mouse and key movement is when modifying the keystone parameters. 2013-03-20 14:03:28 +00:00
Robert Osfield
7aad7dfd78 Improve corner point tracking/keystone computation 2013-03-19 16:43:27 +00:00
Robert Osfield
1dba64ac6c Added event handle for interactive setting of keystone variables 2013-03-19 12:44:03 +00:00
Robert Osfield
890ecb6abb Experiments with modifying the projection matrix to provide keystoning. 2013-03-15 17:35:43 +00:00
Robert Osfield
ab55668ff3 Initial skeleton of new osgkeystone example 2013-03-14 16:24:22 +00:00
Robert Osfield
0b3da415ef Fixed warning 2013-02-06 11:16:29 +00:00
Robert Osfield
8ed0780967 Added .get()'s to fix compilation when ref_ptr<> type conversion is disabled 2013-02-05 18:22:46 +00:00
Robert Osfield
9bc3b3316a From Stephan Huber, introduction of message id scheme were osc messages are sent with an unique id, and can be dispatched multiple times to workaround network packet losses. 2013-01-31 11:09:03 +00:00
Robert Osfield
26a8f63212 From Wang Rui, "In the attached files I've added the Compute Shader support for OSG, as well as serializer updates and a new osgcomputeshaders example. My submission also include a setComputeGroups() function in Program for setting compute-shader work groups, and a bindToImageUnit() function in Texture for binding textures as image variables in shaders.
All code are tested on Windows 7 + NVIDIA GFX 570 with the latest GeForce 310.70 Driver (BETA), which could support OpenGL 4.3.

Compute shader information can be found at "http://www.opengl.org/registry/specs/ARB/compute_shader.txt"
"
2013-01-25 11:54:03 +00:00
Robert Osfield
a9fff529c7 Fixed compile warning 2013-01-25 10:36:42 +00:00
Robert Osfield
c15d07caa1 Added support for RGBA colour buffer in osgframerenderer using the --rgba command line option (--rgb selects the standard non colour frame buffer which is the default). 2012-12-17 15:58:57 +00:00
Robert Osfield
f7bee82e99 Added handling of aspect ratio for vertical/horizontal split stereo. 2012-12-16 17:10:37 +00:00
Robert Osfield
e57e6c5409 Added setting of the fusion distance. 2012-12-10 11:11:19 +00:00
Robert Osfield
8d999a07cf Added --flip and --no-flip command line options to enable/disable a vertical flip of the captured image before writing out to disk. 2012-12-08 16:11:00 +00:00
Robert Osfield
8df5440a26 Added naming of root of presentation and used this in the setup of the position of the camera. 2012-12-07 13:59:57 +00:00
Robert Osfield
ccdca3d9bf Fixed handling of window size/projection matrix 2012-12-07 12:47:42 +00:00
Robert Osfield
66a11037ae Added creation of directory path for ouput if one is required 2012-12-06 11:36:13 +00:00
Robert Osfield
eed71f647d From Stephan Huber, "* imageio: removed ReaderWriterImageIO_IOS.cpp, refactored ReaderWriterImageIO to work on OS X and IOS
* avfoundation: added support for IOS (CoreVideo-support is still in development, works only for SDK >= 6.0, set IPHONE_SDKVER in cMake accordingly)
* zeroconf: added ZeroConf-device-plugin (Mac/Win only, linux implementation missing) to advertise and discover services via ZeroConf/Bonjour, on windows you'll need the Bonjour SDK from Apple
* osgosc: modified the example to demonstrate the usage of the ZeroConf-plugin (start the example with the command-line-argument --zeroconf)
* SlideShowConstructor: enable/disable CoreVideo via a environment variable (P3D_ENABLE_CORE_VIDEO)
* RestHttp: mouse-motion-events get interpolated
* RestHttp: unhandled http-requests get sent as an user-event to the event-queue, all arguments get attached as user-values to the event
* modified some CMakeModules to work correctly when compiling for IOS
* fixed a compile-error for IOS in GraphicsWindowIOS
* some minor bugfixes"
2012-12-05 17:15:53 +00:00
Robert Osfield
ce0f928f6f Added --screen-distance <distance>, --screen-height <height> and --screen-width <width> command line support and associated settings to the configuration file. 2012-12-05 11:41:27 +00:00
Robert Osfield
ea00708026 Fixed default camera position 2012-12-04 19:02:45 +00:00
Robert Osfield
761229f8f4 Changed the -w and -h options to --width and --height respectively. 2012-12-04 18:51:21 +00:00
Robert Osfield
32cffe2094 Cleaned up command line usage 2012-12-04 18:30:33 +00:00
Robert Osfield
b4af638af9 Tidied up command line docs. 2012-12-04 18:28:28 +00:00
Robert Osfield
9363aa5a89 Tidied up CaptureSettings and added command line docs 2012-12-04 18:21:53 +00:00
Robert Osfield
b6d19d1052 Added CameraProperty and associated command line parameters for controlling camera position and animation.
--center x y z
  --eye x y z
  --up x y z 
  --rotation-center x y z
  --rotation-axis x y z
  --rotation-speed degreesPerSecond
2012-12-04 12:47:46 +00:00
Robert Osfield
35d17d4654 Renamed souce file 2012-12-03 11:31:13 +00:00
Robert Osfield
8b231ba8e3 From Stephan Huber, added event sending support into osgGA::Device along with implementation on this into the osc plugin. Added osgoscdevice example to demonstate this in action. 2012-11-28 10:43:58 +00:00
Robert Osfield
8b30807ef1 From Paul Martz, build fixes 2012-11-19 11:25:52 +00:00
Robert Osfield
933baf5db4 Changed COLOUR to COLOR to be consistent with OpenGL spelling 2012-11-13 13:32:01 +00:00
Robert Osfield
92975a01fd Moved colour space conversion of volumes from the osgvolume example into osg/ImageUtils and added support for colorSpaceConversion="MODULATE_ALPHA_BY_LUMINANCE","MODULATE_ALPHA_BY_COLOUR","REPLACE_ALPHA_WITH_LUMINANCE" and "REPLACE_RGB_WITH_LUMINANCE" to .p3d <volume> tag 2012-11-13 13:16:10 +00:00
Robert Osfield
79ae9cd8a3 Added osgframerenderer example 2012-11-12 15:26:30 +00:00
Robert Osfield
014f13f774 Refactored ImageSequence to better handle random access usage. 2012-11-08 11:19:31 +00:00
Robert Osfield
17b372ec38 Tweaked casts/types to fix build under Linux 2012-11-06 17:49:32 +00:00
Robert Osfield
679956e79a Added f qualifer to 1.0 to fix build problem under MSVS 2012-11-06 14:25:28 +00:00
Robert Osfield
18d66619b0 Added static cast to float to avoid compile error under MSV 2012-11-05 09:36:00 +00:00
Robert Osfield
94e8c42569 Added a static_cast to avoid build issues under Windows 2012-10-08 16:12:59 +00:00
Robert Osfield
03a9786b11 Fixed warning 2012-10-08 16:03:16 +00:00
Robert Osfield
77bd6cbfe9 From Stephan Huber and Robert Osfield, addded interactive setting of the ImageSequence::seek() based on the mouse x position. 2012-10-05 10:35:06 +00:00
Robert Osfield
1796d55bea From Stephan Huber, OSX and iOS Video support via a QTKit plugin from OSX 10.7 and before, and an AVFoundation plugin for iOS and OSX10.8 and later. 2012-10-02 14:07:12 +00:00
Robert Osfield
67abc66d8a Added handling of directory names in osgimagesequence commandline.
From Stephan Huber, added support for controlling the ImageSequence seek position via mouse x position, toggled on/off via 'i' key.
2012-09-12 16:35:12 +00:00
Robert Osfield
5a99e4672e From Fredric Bouvier, fix to CMake build selection of FLTK 2012-09-06 10:32:07 +00:00
Robert Osfield
39dcea9ebb From Colin McDonald and Robert Osfield, converted Traits::sharedContext from GraphicsContext* to osg:observer_ptr<GraphicsContext> to prevent dangling pointer issues. 2012-09-05 21:03:41 +00:00
Robert Osfield
284f410436 Added ShadowSettings::s/getMaximumShadowMapDistance(double) property, usage of these property in ViewDependentShadowMap,
and setting of it with --max-shadow-distance <double> in the osgshadow example.
2012-08-15 12:40:48 +00:00
Robert Osfield
fb83c2b061 Introduced --near-far-mode into osgshadow and ShadowSettings::setComputeNearFarModeOverride(..) to allow user control of how the cull traversal is optimized for computing the depth range of the shadow map. 2012-08-03 16:14:14 +00:00
Robert Osfield
35816e6b25 Removed the erronous creation of a local ShadowSettings object 2012-08-03 15:23:44 +00:00
Robert Osfield
ec3ad89041 Changed settings of masks to use ShadowSettings. 2012-07-10 16:11:15 +00:00
Robert Osfield
4d86f8dc79 Added --fps support 2012-06-07 10:08:42 +00:00
Robert Osfield
aea3d6855b Removed trailing spaces 2012-05-02 14:13:29 +00:00
Robert Osfield
b86c87d1a8 From Christophe Herreman, Added viewer.setCameraManipulator( keyswitchManipulator.get() ) to fix problem with master Camera not being updated 2012-04-26 10:07:36 +00:00
Robert Osfield
d37eff5c2b Ran dos2unx on file 2012-04-20 09:40:29 +00:00
Robert Osfield
b0c510ab08 From John Kaniarz, "Here is an example of using tessellation shaders in osg. With permission from the author, I adapted it from this tutorial:
http://prideout.net/blog/?p=48"
2012-04-20 09:38:51 +00:00
Robert Osfield
25989e73f5 From Martin Naylor, "I have been experiencing a crash in the example osgtexture2D.
Not sure why my system seems to be so sensitive to these problems.

But attached is a fix which seems to stabilise the example.
Note: it only seems to crash intermittently when spinning the object with
your mouse.

So I assume this is a threading issue because of the data variance missing
in some of the text node setups in the example.
"
2012-04-18 09:51:39 +00:00
Robert Osfield
aab27e106c From David Callu, "Here an update of osg::Uniform :
- add non square matrix
- add double
- add all uniform type available in OpenGL 4.2
- backward compatibility for Matrixd to set/get an float uniform matrix
- update of IVE / Wrapper ReadWriter

implementation of AtomicCounterBuffer based on BufferIndexBinding

add example that use AtomicCounterBuffer and show rendering order of fragments,
original idea from geeks3d.com."
2012-03-29 09:43:12 +00:00
Robert Osfield
055e1258ea Removed trailing spaces 2012-03-23 16:09:30 +00:00
Robert Osfield
7c278ce5d6 From Christian Buchner, "The attached openscenegraph example is much simpler than
osgshaders.cpp and demonstrates the use of GLSL vertex and fragment
shaders with a simple animation callback. I found the osgshaders.cpp
too complex to serve as a starting point for GLSL programming"
2012-03-06 10:29:47 +00:00
Robert Osfield
8d3790d594 Added RotateCylinderDragger and RotateSphereDragger to list of manipulators for testing purposes 2012-03-06 10:06:00 +00:00
Robert Osfield
f59f4d2929 From Paul Martz, "Just a minor update and typo fix.
"
2012-03-05 14:17:01 +00:00
Robert Osfield
f86efdcd31 Cleaned up CMake warning 2012-02-24 10:56:48 +00:00
Robert Osfield
981182fb01 From Kim Bale, "The application description for osg2cpp was cut and pasted from osgconv and not changed.
I've added a more relevant description."
2012-02-17 16:51:10 +00:00
Robert Osfield
9244ea7603 From Paul Martz, a simple GL3 example 2012-02-09 15:51:20 +00:00
Robert Osfield
3b4333ec9a Fixed silly compiler warning that was being produced in error. 2012-02-06 12:05:36 +00:00
Robert Osfield
85bce8b8ad From Stephan Huber, "attached you'll find a first version of multi-touch-support for OS X (>=
10.6), which will forward all multi-touch events from a trackpad to the
corresponding osgGA-event-structures.

The support is switched off per default, but you can enable multi-touch
support via a new flag for GraphicsWindowCocoa::WindowData or directly
via the GraphicsWindowCocoa-class.

After switching multi-touch-support on, all mouse-events from the
trackpad get ignored, otherwise you'll have multiple events for the same
pointer which is very confusing (as the trackpad reports absolute
movement, and as a mouse relative movement).

I think this is not a problem, as multi-touch-input is a completely
different beast as a mouse, so you'll have to code your own
event-handlers anyway.

While coding this stuff, I asked myself if we should refactor
GUIEventAdapter/EventQueue and assign a specific event-type for
touch-input instead of using PUSH/DRAG/RELEASE. This will make it
clearer how to use the code, but will break the mouse-emulation for the
first touch-point and with that all existing manipulators. What do you
think? I am happy to code the proposed changes.

Additionally I created a small (and ugly) example osgmultitouch which
makes use of the osgGA::MultiTouchTrackballManipulator, shows all
touch-points on a HUD and demonstrates how to get the touchpoints from
an osgGA::GUIEventAdapter.

There's even a small example video here: http://vimeo.com/31611842"
2012-02-03 14:25:08 +00:00
Robert Osfield
95f93e3bf5 Renamed selection to transform to make it clear to understand what is being done. 2012-02-01 17:16:44 +00:00
Robert Osfield
c3b7f6debe Added example usage of teh new DraggerTransforCallback's HandleCommandMask which is tied to the TabPlaneDragger example. 2012-02-01 17:10:48 +00:00
Robert Osfield
7664d90504 Improved the handling of osgManipulator::Constraint, DraggerCallbacks and Command so that they now use a Visitor Pattern
to ensure the correct methods on constraints and callbaks are called for each Command.  Also fixed the handling of
Constraints when applied to composite Draggers.
2012-01-31 10:56:52 +00:00
Robert Osfield
0381914b42 Added support for Scale1DDragger, Scale2DDragger and TranslatePlaneDragger to --dragger command line option 2012-01-30 12:26:28 +00:00
Robert Osfield
6d66e1abaa Added support for using GL_UNPACK_ROW_LENGTH in conjunction with texture's + osg::Image via new RowLength
parameter in osg::Image.  To support this Image::setData(..) now has a new optional rowLength parameter which
defaults to 0, which provides the original behaviour, Image::setRowLength(int) and int Image::getRowLength() are also provided.

With the introduction of RowLength support in osg::Image it is now possible to create a sub image where
the t size of the image are smaller than the row length, useful for when you have a large image on the CPU
and which to use a small portion of it on the GPU.  However, when these sub images are created the data
within the image is no longer contiguous so data access can no longer assume that all the data is in
one block.  The new method Image::isDataContiguous() enables the user to check whether the data is contiguous,
and if not one can either access the data row by row using Image::data(column,row,image) accessor, or use the
new Image::DataIterator for stepping through each block on memory assocatied with the image.

To support the possibility of non contiguous osg::Image usage of image objects has had to be updated to
check DataContiguous and handle the case or use access via the DataIerator or by row by row.  To achieve
this a relatively large number of files has had to be modified, in particular the texture classes and
image plugins that doing writing.
2012-01-24 14:34:02 +00:00
Robert Osfield
c225f2758c Added --num-sm and --parallel-split and --cascaded command line options to set the appriopriate ViewDependentShadowMap settings. 2011-12-19 09:09:30 +00:00
Robert Osfield
74fb1f42d9 Moved osgshaders example across to use the new osgUtil::PerlinNoise example 2011-12-13 21:14:33 +00:00
Robert Osfield
22ef706e32 Fixed build under Tiny Core. 2011-11-30 19:14:14 +00:00
Robert Osfield
116b9a978c From Trajce Nikolov, "Here is extended version of the osgforest example - technique with geometry shader added, was doing it for a project so I thought might be useful to update the example as well
"
2011-11-18 08:20:04 +00:00
Robert Osfield
c7542d5cd8 Fixed indentation 2011-11-18 08:15:36 +00:00
Robert Osfield
9995cb70a9 Added password support into osgvnc example and vnc plugin 2011-10-26 12:29:38 +00:00
Robert Osfield
62888dba38 Added check against build type to avoid the build of the osgviewerWX example with debug build as this fails with unresolved symbols within the internals of WxWidgets. 2011-10-20 11:50:04 +00:00