Commit Graph

4034 Commits

Author SHA1 Message Date
Robert Osfield
199506296a Implemented basic frame graphic 2014-05-30 16:44:36 +00:00
Robert Osfield
a45ba05bdd Added beginnings of ComboBox popup functionality. 2014-05-29 10:51:26 +00:00
Robert Osfield
26a7c30229 Added cached Depth and ColorMask to reduce the amount of duplicate state in the osgUI subgraph 2014-05-28 10:18:57 +00:00
Robert Osfield
1fcb91900a Replaced Widget::GraphicsSubgraph with GraphicsSubgraphMap to allow finer control of when the rendering subgraphs are done. 2014-05-28 10:06:14 +00:00
Robert Osfield
faced0a896 Removed Dialog/Popup::open/close() methods as they are replaced by the setVisible() method 2014-05-26 16:32:20 +00:00
Robert Osfield
5d635287c0 Implemented Widger::Visible and Enabled usage 2014-05-26 16:27:33 +00:00
Robert Osfield
b04a4813ba Added Visible and Enalbed properties to Widget 2014-05-26 16:15:33 +00:00
Robert Osfield
f50ec0fe8e Implemented clipping of widget to the widgets extents. 2014-05-23 18:59:16 +00:00
Robert Osfield
cca18e82e8 Implemented scheme for making sure nested widgest overdraw parent widgets graphics 2014-05-23 15:00:49 +00:00
Robert Osfield
bda5ec4875 Added osgUI::Widget::set/getGraphicsSubgraph() to hold the subgraph that does the rendering portion of widgets 2014-05-22 10:02:35 +00:00
Robert Osfield
0b5b3213fe Addd method implementation in serializers 2014-05-21 16:15:02 +00:00
Robert Osfield
20fd80de3a Improved handling of callback object to open the door to use of general osg::CallbackObject as mechnisms for something simialr to Qt's signal/slot mechanism. 2014-05-21 09:45:11 +00:00
Robert Osfield
28c36d615b Added osg::runNamedCallbackObjects(..) convinience method for run all named osg::CallbackObjects attached to an osg::Object 2014-05-21 09:07:25 +00:00
Robert Osfield
9859f3110b Renamed callbacks to avoid overlap with Node callbacks 2014-05-21 09:06:17 +00:00
Robert Osfield
30b54e3af2 Moved the _boundingSphere set method into the update section of the Drawable::getBoundingBox() method
Added an UpdateVisitor::apply(Drawable&) implementation.
2014-05-20 16:09:34 +00:00
Robert Osfield
e70acf4c51 From Pjotr Svetachov, "I stumbled on a little bug with the new drawables. I was distributing points data into different drawables that I used in a LOD later. When simplifying the system to not use geodes anymore I came upon the following bug:
If Drawable::getBoundingBox would compute an invalid bounding box (if it was for example empty) it would make a bounding sphere with a infinite radius which counts as a valid sphere in osg.

Attached is a small fix."
2014-05-20 15:34:12 +00:00
Robert Osfield
8346f0ebe1 Improved the handling of updating of text 2014-05-20 08:35:39 +00:00
Robert Osfield
d917987938 Added shell of Popup class 2014-05-20 08:35:19 +00:00
Robert Osfield
4ce2e075c4 Add shell of Dialog class 2014-05-19 10:11:50 +00:00
Robert Osfield
87fd1d38fb Added initial cut of ComboBox 2014-05-16 19:24:58 +00:00
Robert Osfield
3e00764649 Added initial shell of PushButton implementation 2014-05-16 10:38:40 +00:00
Robert Osfield
03fc0c3662 Added support for intesecting Drawable that are attached directly to the scene graph without an osg::Geode 2014-05-15 16:30:17 +00:00
Robert Osfield
d8a06f827e From Pjotr Svetachov, build fixes for VisualStudio 2014-05-15 14:45:28 +00:00
Robert Osfield
4f199e36c9 Placed the #include<osg/Node> within #ifdef OSG_USE_BOUND to prevent unncessary inclusion of Node header when OSG_USE_BOUND is false. 2014-05-15 13:22:47 +00:00
Robert Osfield
20b9f3ff88 Added Node::asDrawable() and Node::asGeometry() methods to provide a low cost way of casting a node to Drawable and Geoemtry.
Changed the Group::computeBound() method so that it takes account of the a Drawable's BoundingBox.
2014-05-15 09:26:59 +00:00
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
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
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
e16eb147a1 From Sebastian Messerschmidt, "attached is the compile/linker fix for multiple definitions of getTypeEnum when compiling the Lua with VisualStudio and potentially other compilers.
"
2014-04-30 11:51:40 +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
b6404d18c3 From Pjotr Svetachov, "Today I found a bug in the IutputStream class when saving array
attributes in vec3b format. It looks like my compiler takes the wrong
overload and outputs integers instead of characters. The problem is
that vec3b is of type signed char and that is not the same as char (
see http://stackoverflow.com/questions/436513/char-signed-char-char-unsigned-char
) and visual studio 2013 will promote it to integer when choosing an
overload.
It looks like that the InputStream class already takes care of this
issue (if it didn't it would have read everything ok and I would have
not even stumbled upon this bug. :) )"
2014-04-29 13:41:35 +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
ef76994c05 Removed header as this CMake generated configuration file is not required to be part of svn repository 2014-04-24 07:20:44 +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
560587c88f Fixed comment 2014-04-14 16:16:08 +00:00
Robert Osfield
25ddbf8f1f From Sebastian Messerschmidt, "n the trunk version the osgGA::GUIActionAdapter has additional functions for lineIntersection which use osgGA::GUIEventAdapter&, but the class declaration is neither forwarded, nor is the header included.
Using the trunk together with osgEarth 2.5 will fail to build, due to the missing type.

Attached is the file forward declaring osgGA::GUIEventAdapter."
2014-04-08 11:48:34 +00:00
Robert Osfield
efc493cfa0 Fixed build when using of double BoundingBox/BoundingSphere 2014-04-07 15:04:34 +00:00
Robert Osfield
ac380e03c4 From Paul Martz, "We discussed the issue of GL_RED_SNORM and GL_RG_SNORM some time ago, but the issue was never completely resolved. Please see the attached submission to fix the issue.
osg/GL2Extensions was incorrectly defining GL_RED_SNORM and GL_RG_SNORM as part of the definitions for OpenGL v3.1. However, a quick review of the 3.1 spec indicates that these are not part of the 3.1 standard.

My attached change moves these definitions out of the #ifndef GL_VERSION_3_1 conditional block, and defines them conditionally if not already defined. This allows the DDS plugin to build for GL3.
"
2014-04-07 13:48:15 +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
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
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