Commit Graph

5761 Commits

Author SHA1 Message Date
Robert Osfield
4896fe6e05 From Mattias Helsing, "When building osg static on Windows the _declspec's wasn't escaped for
applications, examples or wrappers. Attached are the CMakeLists I had
to change to make these compile.
"
2008-12-11 17:00:40 +00:00
Robert Osfield
3a623717a9 Cleaned up layout 2008-12-10 17:08:21 +00:00
Robert Osfield
c3611c5875 Added mechanism for registering proxy objects in the .osg plugin in a way that is compatible with static linking. 2008-12-10 16:26:02 +00:00
Robert Osfield
1b55a56731 Removed #if 0'd out reference to osgDB 2008-12-10 15:01:49 +00:00
Robert Osfield
5363736caa Refactored computeIntersections() float x,float y, const osg::NodePath& nodePath. 2008-12-10 11:12:37 +00:00
Robert Osfield
69f5e5c5e5 From Andreas Goebel, (submitted by Paul Martz) "A fix for the FLT exporter. This change adds support for normals with OVERALL binding (and improves support for normals with PER_PRIMITIVE binding -- still not correct, but at least it doesn't index off the end of the array anymore)." 2008-12-10 10:13:58 +00:00
Robert Osfield
33782a5177 From Marcin Prus, "some time ago there was an optimization fix including change in DirectionalSector::computeMatrix().
Rotation matrices were replaced with quaternions but incorrect contructor was used. There was a call to Quat(angle, xAxis, yAxis, zAxis ) but there is no such constructor in Quat class to create quaternion for rotation. As a result we got this values being written into quaternion directly.

I've replaced Quat contructor calls with the ones creating rotation quaternions Quat( angle, Vec3( axis ) )."
2008-12-10 10:10:45 +00:00
Robert Osfield
3297702173 Added return 2008-12-10 09:34:45 +00:00
Robert Osfield
9a554f7eec Fixed cull callback usage to ensure that the lazy updating of the browser image functions automatically. 2008-12-09 14:07:59 +00:00
Robert Osfield
c8190d9c54 Cleaned up osgWidget::VncClient and osgWidget::Browser so that their implementations are all more consitent with the osgWidget::PdfReader. 2008-12-09 11:05:04 +00:00
Robert Osfield
d8c17e4c4c Added support for setting background colour of Pdf document. 2008-12-09 09:26:51 +00:00
Robert Osfield
c0ac01c576 Added setImageToColour function 2008-12-09 09:25:12 +00:00
Robert Osfield
45160a2129 Added ability to customize keyboard events for controlling osgWidget::PdfImage/PdfReader 2008-12-07 17:37:26 +00:00
Robert Osfield
6f356aeb97 Intoduce new osgWidget::PdfReader and osgWidget::VncClient front ends to osgWidget,
with new pdf plugin and updated vnc plugin that now support these front ends.

Updated osgpdf and osgvnc examples to new these new interfaces.
2008-12-07 17:02:30 +00:00
Robert Osfield
0114ac4734 Fixed build problem 2008-12-06 11:03:32 +00:00
Robert Osfield
25eff6e27c From Jason Daly, added support for reading Valve's texture format files 2008-12-04 10:27:29 +00:00
Robert Osfield
4957d7bb55 From Ferdi Smit, "Image.cpp didn't handle the integer data types correctly in the function:
unsigned int Image::computeNumComponents(GLenum pixelFormat)

so I added these types to the switch statement:

      case(GL_RED_INTEGER_EXT): return 1;
      case(GL_GREEN_INTEGER_EXT): return 1;
      case(GL_BLUE_INTEGER_EXT): return 1;
      case(GL_ALPHA_INTEGER_EXT): return 1;
      case(GL_RGB_INTEGER_EXT): return 3;
      case(GL_RGBA_INTEGER_EXT): return 4;
      case(GL_BGR_INTEGER_EXT): return 3;
      case(GL_BGRA_INTEGER_EXT): return 4;
      case(GL_LUMINANCE_INTEGER_EXT): return 1;
      case(GL_LUMINANCE_ALPHA_INTEGER_EXT): return 2;

That's all... now it computes the number of components and, thus, the image size
correctly."
2008-12-03 12:09:21 +00:00
Robert Osfield
9d92a26693 Revised the DYNAMIC vs STATIC library setup of COLLADA. 2008-12-02 10:42:58 +00:00
Robert Osfield
b58efff175 From Jean-Sebastien Guay, build fix 2008-12-02 09:00:53 +00:00
Robert Osfield
1ff5d3c53d Fixed wrappers 2008-12-01 15:46:50 +00:00
Robert Osfield
91f8dbb583 From Wang Rui, "Attachment is a plugin reading Biovision hierarchical files (.BVH) to generate character motion animations. BVH format is widely used by Character Studio of 3dsmax, MotionBuilder and other softwares, also supported by most motion capture devices. The plugin is based on the latest osgAnimation library of OSG 2.7.6 and will return a osgAnimation::AnimationManager pointer if using readNodeFile() to load it.
Source and CMake files are:
 
CMakeLists.txt
ReaderWriterBVH.cpp
 
Also there are 3 example BVH files. The first two are captured from motions of human beings - maybe a kung-fu master here. PLEASE use command below to see the results:
 
# osgviewer example1.bvh -O solids
 
This will demonstrate the animating of a skeleton and render bones as solid boxes. Note that the motion assumes XOZ is the ground and has an offset from the center, so we should adjust our view to get best effects.
 
You may also use "-O contours" to render bones as lines. The viewer shows nothing if without any options because osgAnimation::Bone does not render itself. User may add customized models to each named bones as osganimationskinning does to make uses of this plugin in their own applications.

I was wondering to support a BvhNode in my osgModeling peoject before, but soon found it better be a plugin for animation. A problem is, how to bind real geometry models to the skeleton. Maybe we could have a bindingToNode() visitor in future to find geodes matching names of bones and add them as bones' children."
2008-12-01 14:07:20 +00:00
Robert Osfield
d6845c4c7d Updated wrappers 2008-12-01 13:47:48 +00:00
Robert Osfield
f2c1a3ea8a From Art Tevs, "here is a submission of an additional class of PixelBufferObejct, which implements more general way of handling with PBOs. Current osg implementation of PBO does use an attached osg::Image to copy data from. This is somehow only one way of using it and doesn't provide full functionality of PBOs.
--------------------------------------------
Descripton:

The patch does provide a new class PixelDataBufferObject which is capable of allocating memory on the GPU side (PBO memory) of arbitrary size. The memory can then further be used to be enabled into read mode (GL_PIXEL_UNPACK_BUFFER_ARB) or in write mode (GL_PIXEL_PACK_BUFFER_ARB). Enabling the buffer into write mode will force the driver to write data from bounded textures into that buffer (i.e. glGetTexImage). Using buffer in read mode give you the possibility to read data from the buffer into a texture with e.g. glTexSubImage or other instuctions. Hence no data is copied over the CPU (host memory), all the operations are done in the GPU memory.


--------------------------------------------
Compatibility:

The new class require the unbindBuffer method from the base class BufferObject to be virtual, which shouldn't break any functionality of already existing classes. Except of this the new class is fully orthogonal to existing one, hence can be safely added into already existing osg system.

--------------------------------------------
Testing:

The new class was tested in the current svn version of osgPPU. I am using the new class to copy data from textures into the PBO and hence provide them to CUDA kernels. Also reading the results back from CUDA is implemented using the provided patch. The given patch gives a possibility of easy interoperability between CUDA and osg (osgPPU ;) )


--------------------------------------------
I think in general it is a better way to derive the PixelBufferObject class from PixelDataBufferObject, since the second one is a generalization of the first one. However this could break the current functionality, hence I haven't implemented it in such a way. However I would push that on a stack of wished osg 3.x features, since this will reflect the OpenGL PBO functionality through the classes better.
"
2008-12-01 13:28:13 +00:00
Robert Osfield
5178a0ec66 Added OpenThreads to link lists 2008-12-01 11:19:11 +00:00
Robert Osfield
78a808e444 Changed OPENEXR_LIBRARY to OPENEXR_LIBRARIES to pick up on Ulrich's changes to the FindOpenEXR.cmake 2008-11-30 16:33:55 +00:00
Robert Osfield
47f518d1c7 From Art Tevs, "here are a small extension to the osg::Image class, which do computes data type from the given format, i.e. (GL_RGB32F_ARB -> GL_FLOAT). The method is very usefull to find out which data type a texture or an image have based on the internal/pixel format." 2008-11-30 15:56:47 +00:00
Robert Osfield
16bae8830e Updated wrappers 2008-11-28 14:35:47 +00:00
Robert Osfield
9748fdd605 From Jeremy Moles, updates to osgWidget
Merged my Robert Osfield from OpenSceneGraph-osgWidget-dev.
2008-11-28 14:35:33 +00:00
Robert Osfield
d3b2d9b074 From Cedric Pinson, updates toosgAnimation.
Merged by Robert Osfield, from OpenSceneGraph-osgWidget-dev.
2008-11-28 14:34:38 +00:00
Robert Osfield
37682c6668 From Cedric Pinson, "updated the CMakelist.txt of curl plugin to compile with the static library of curl.
I added the external dependency wldap32"
2008-11-27 17:31:49 +00:00
Robert Osfield
cf440dfec3 Changed unsigned long to unsigned int to avoid 64bit portability issue. 2008-11-27 14:05:30 +00:00
Robert Osfield
25ec33d863 Enabled the build of exr plugin 2008-11-27 09:36:35 +00:00
Robert Osfield
db572a9142 Build fixes 2008-11-27 09:36:18 +00:00
Robert Osfield
c0e7e733ec Removed the use of = operator. 2008-11-27 09:33:06 +00:00
Robert Osfield
c470752182 Updated wrappers 2008-11-26 16:40:01 +00:00
Robert Osfield
d952172559 From Tim Moore, "Double precision versions of BoundingBox and BoundingSphere are useful for doing computations in world coordinates, especially when working with a geocentric scene. By default, these classes are built using floats, so templated versions fill a need. I've used the double precision templates to fix some problems with ViewDependentShadow, which will follow shortly.
"
2008-11-26 16:39:52 +00:00
Robert Osfield
98c197edad added workaround of compile issues with templated version of BoundingBox 2008-11-26 16:00:27 +00:00
Robert Osfield
b813d1b31b Updated wrappers 2008-11-26 13:18:54 +00:00
Robert Osfield
d7c2d6863d From Andy Preece,
"To reproduce the bug:

   1. Create a template osg::Sequence node (and underlying geometry) but do not attach the node to the current active scenegraph.
   2. At some point during the rendering loop (perhaps on a keystroke) clone the sequence node (I use the call:

       dynamic_cast<osg::Node*>(templateNode -> clone( osg::CopyOp( (osg::CopyOp::CopyFlags)osg::CopyOp::DEEP_COPY_NODES ) ) )

   3. Set the cloned sequence node duration to a value that makes the animation run slower (i.e. 2.0).
   4. Start the cloned sequence (using setMode()).
   5. Repeat steps 2 \u2013 4 and observe that the cloned sequences do not run slow but run as fast, appearing to ignore the duration that has been set on them.

 

Looking at the \u2018good documentation\u2019 (2.4 source code), I see that _start is being set to _now (osg::Sequence::setMode(), line 192). Should this not _start not be set to -1.0?"
2008-11-26 12:50:12 +00:00
Robert Osfield
51fee6f75c From Ragnar Hammarqvist, "I wrote an EXR image plug-in to osg, I would like to contribute this plug-in to the osg project if you find it useful.
The plug-in is a wrapper around open-exr (http://www.openexr.com) that consists of two projects, ilmbase-1.0.1 and openexr-1.6.1.

I have only tested it on windows XP 32 machine. So there might be some work making it work on other platforms.

The plug-in supports writing and reading EXR files. When writing it can use the data type GL_HALF_FLOAT_ARB(se ilmbase-1.0.1) and GL_FLOAT. When reading the data type always becomes GL_HALF_FLOAT_ARB. It supports textures with three and four channels.

When reading an exr file it automatically removes Alfa channel if it didn't store any information."

--

From Robert Osfield, started work on ported it to other platforms, but could fix some problems relating to error: 

        ?Imf::OStream::OStream(const Imf::OStream&)? is private

I'm checking in now so that others can have a bash at completing the port.
2008-11-26 12:35:25 +00:00
Robert Osfield
b147a22af1 From BjornHein, "attached a proposal for an extension for the the stl-File ReaderWriter. It allows saving of an osg node tree as stl file in ASCII-Format.
Standard is to generate one stl file.

With an additional option it is possible to write one file per Geode. This option is not very "useful" for typical application, I use it for separating and conversion of geometric data. So it could be removed if considered to special."
2008-11-26 11:45:33 +00:00
Robert Osfield
b2762c4788 Added DatabasePager::getRequestsInProgress() that return true if there are still tiles to load.
Added DatabasePager::setTargetMaximumNumberOfPageLOD(..) that sets the target number of PagedLOD to try and maintain
2008-11-26 11:12:19 +00:00
Robert Osfield
8ea639f564 Updated wrappers 2008-11-25 14:40:02 +00:00
Robert Osfield
017b4315bc From Joakim Simmonsson, fix for handling of billboards in FLATTEN_STATIC_TRANSFORMS_DUPLICATING_SHARED_SUBGRAPHS 2008-11-25 14:31:19 +00:00
Robert Osfield
b6fe330b85 Added support for unsigned int uniforms 2008-11-25 14:15:55 +00:00
Robert Osfield
0d8ae3bd66 From Ferdi Smit, added support for unsigned int typed uniforms 2008-11-25 14:15:35 +00:00
Robert Osfield
a751eb0326 From Urlich Hertlein, "Attached is a patched version that replaces calls to atof() with osg::asciiToFloat()." 2008-11-25 13:45:27 +00:00
Robert Osfield
b7882c57f8 Fixed warning and some unitialized variables. 2008-11-25 12:22:33 +00:00
Robert Osfield
a1f59b6241 Fixed warning 2008-11-25 11:09:40 +00:00
Robert Osfield
d08d778608 From Jaromir Vitek, "In attachment are another fixes for using packed depth+stencil (PDS).
* When used PDS RenderStage::runCameraSetUp sets flag that FBO has already stencil,depth buffer attached. Prevents adding next depth buffer.
* Sets correct traits for p-buffer if used PDS and something goes wrong with FBO setup or p-buffer is used directly.
* Adds warning to camera if user add depth/stencil already attached through PDS.
* Sets blitMask when use blit to resolve buffer.

There is also new example with using multisampled FBO."
2008-11-25 10:57:14 +00:00