Commit Graph

8629 Commits

Author SHA1 Message Date
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
6b3704ce09 Added asSwitch and asGeode convinience methods to Node 2008-12-09 09:24:47 +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
bad3a92fc3 Added GL_ABGR_EXT to fix windows build 2008-12-05 16:41:12 +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
fe439b3707 From Sukender, (Benoit Neil) "adding a few convinience methods to osg::Node (ouch!). Just tell me if you find them useful:
/** Convinience method that sets the update callback of the node if it doesn't exist, or nest it into the existing one. */
void addUpdateCallback(NodeCallback* nc);

/** Convinience method that removes a given callback from a node, even if that callback is nested. There is no error return in case the given callback is not found. */
void removeUpdateCallback(NodeCallback* nc);

... and the same for Event and Cull callbacks methods."
2008-12-03 14:13:59 +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
eba1072dfa From Ulrich Hertlien, "'m was getting a build failure from the OpenEXR reader on Mac OS X. It was complaining about undefined references to half::convert(int). I believe this is because the EXR plugin doesn't explicitly link against the Half library.
Attached is a modified FindOpenEXR.cmake module that locates IlmIlf and Half, as well as a modified exr/CMakeLists.txt that picks up this change.

Also attached are some typo fixes for CMakeModules.

Cheers,"
2008-11-30 16:33:11 +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
fd90f1a6ef Updated ChangeLog, and AUTHORS lists for 2.7.6 dev release 2008-11-29 12:16:04 +00:00
Robert Osfield
3c611dcf30 Build fix for when implicit conversion in ref_ptr<> is switched off. 2008-11-29 11:35:03 +00:00
Robert Osfield
a14b6b9e24 Fixed build for when ref_ptr<> impicit cast is not built 2008-11-29 11:10:56 +00:00
Robert Osfield
b021f0c518 Removed cmath include as it was causing build problems under Cgwin 2008-11-28 17:18:08 +00:00
Robert Osfield
cd4b4b8bfe Added new examples 2008-11-28 14:37:58 +00:00
Robert Osfield
070b9c2cd9 From Cedric Pinson, updates to osganimation examples.
Merged by Robert Osfield, from OpenSceneGraph-osgWidget-dev
2008-11-28 14:37:16 +00:00
Robert Osfield
9b1841d009 From Jeremy Moles, updates to osgwidget examples.
Merged by Robert Osfield from OpenSceneGraph-osgWidget-dev
2008-11-28 14:36:39 +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
e9a18a7466 Updated SO version number for 2.5.6 release 2008-11-27 17:30:14 +00:00
Robert Osfield
57a543b683 Updated ChangeLog 2008-11-27 17:29:12 +00:00
Stephan Maximilian HUBER
799801c201 From Stephan Huber:
updated XCode project, added osgAnimation framework + one example using it (osganimationviewer). 
Added _OPENTHREADS_ATOMIC_USE_BSD_ATOMIC to local OpenThreads/Config when compiling for the 10.5 SDK.
Some minor fixes on some of the configurations/targets
2008-11-27 16:58:43 +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
12bfb6d79a From Jean-Sebastien Guay, "osgautocapture uses M_PI to convert degrees to radians, which didn't compile on Win32. Switched to using osg::DegreesToRadians. Also removed the "convert to radians" comment on each line, as the code clearly conveys this without needing a comment now." 2008-11-27 09:45:41 +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
89ea6d596c Added searching for OpenEXR 2008-11-26 12:35:49 +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
e02ae68aa9 From Gino van den Bergen, "The FindGDAL.cmake seems to be broken in OSG 2.6.1 for locating gdal.h through enviroment variable GDAL_DIR.
Also, I've modified the FindCOLLADA.cmake to locate the current 2.1 versions of the COLLADA DOM in the build directories under VC8. I've also added a COLLADA_LIBRARY_DEBUG spec. Other flavors may be added depending on compiler version and DOM version."
2008-11-26 12:07:03 +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
270fd48536 From John Vidar Larring, osgautocapture example that captures an image from a paged database by frame loop to the paging is complete, then takes a snapshot. 2008-11-26 11:23:06 +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