Commit Graph

2968 Commits

Author SHA1 Message Date
Robert Osfield
3be239bdb2 Removal of rendundant characters from Camera and Camera.cpp.
Updated wrappers
2009-01-15 10:44:52 +00:00
Robert Osfield
2f7fb53ff7 From Rudolf Wiedemann, "attached is the osg::Camera class (based on revision 9493), where
methods
 getProjectionMatrixAsOrtho()
 getProjectionMatrixAsFrustum()
 getProjectionMatrixAsPerspective()
 getViewMatrixAsLookAt() (2x)
are now const, as they only call const methods of osg::Matrixf/d.
"
2009-01-15 10:36:04 +00:00
Robert Osfield
c28221b06f Changed setVolumeTechnique to setVolumeTechniquePrototype() 2009-01-14 20:43:21 +00:00
Robert Osfield
778f4e321d Added VolumeTechnique to Volume 2009-01-14 20:38:12 +00:00
Robert Osfield
d87ec7cb18 Introduced osgVolume::Property, CompositePropery and TransferFunctionPropety classes 2009-01-14 15:16:29 +00:00
Robert Osfield
f260737cd8 Introduced class interfaces for FixedFunctionTechnique and ShaderTechnique volume rendering techniques. 2009-01-13 17:20:32 +00:00
Robert Osfield
2287f1190b Updated version number for next dev release 2009-01-09 15:25:34 +00:00
Robert Osfield
458993fa88 Moved osgVolume::ImageUtils to osg::ImageUtils, updated wrappers, and started moving osgvolume example across to create osgVolume subgraphs 2009-01-09 15:19:25 +00:00
Robert Osfield
fa499dc55f From Andy Skinner, fixes for Solaris build 2009-01-09 12:17:40 +00:00
Robert Osfield
3b192f5119 Added checked from the ARG version of glDraw*Instanced(). 2009-01-08 11:19:21 +00:00
Robert Osfield
95ebf1fe71 From Andy Skinner, "I added a const_cast for a call to atomic_cas_ptr, which takes a void* and has been given a const void* const." 2009-01-08 11:16:56 +00:00
Robert Osfield
5275c11d06 From Blasius Czink, "It seems there is no atomic_xor_uint_nv(). I
attached a changed version of the Atomic header where a mutex fallback
is used for "xor" on solaris."
2009-01-08 11:15:14 +00:00
Robert Osfield
46eeac4514 Moved supression of VS warning C4706 from the include/osg/Export header into the CMake options list. Added suppression of C4127 as well. 2009-01-08 10:34:05 +00:00
Robert Osfield
fb75c50714 Fixed assingment operator 2009-01-07 15:35:28 +00:00
Robert Osfield
4add5f6fd1 Added supression VS warning "C4706: assignment within conditional expression" thanks gets spat out even for perfectly valid if ((variable=expression)) {} usage. 2009-01-07 15:33:24 +00:00
Robert Osfield
98bd058317 Fixed warnings 2009-01-07 10:32:59 +00:00
Robert Osfield
85c510ba27 Added a protected = operator 2009-01-07 09:49:49 +00:00
Robert Osfield
8745ec7d69 Removed the usage of assert to prevent associated compile warnings and to clean up code 2009-01-06 19:09:50 +00:00
Robert Osfield
4f3b1baee4 Added support for primitive instancing 2009-01-06 14:55:49 +00:00
Robert Osfield
85fffc2e76 From Roland Smeenk, "Attached you will find an improved Collada plugin to properly support camera's.
A Collada camera will be added to the scenegraph as osg::CameraView. This allows the user to create a set of predefined camera viewpoints. I also added a new MatrixManipulator to osgGA called CameraViewSwitchManipulator and added usage of this to the osgviewer example. This manipulator allows switching between the predefined camera viewpoints. The current design limition I ran into is that a MatrixManipulator only manipulates the ViewMatrix, but for this particular  manipulator I also want to update the projectionMatrix of the camera when switching to a new viewpoint. This is not implemented because I don't know what would be the best way to design it. Any ideas?
 
Furthermore Collada also supports orthographic camera's, where an osg::CameraView only supports a perspective camera. Would it be useful to create a CameraView with customizable optics for this?"
2009-01-05 16:53:29 +00:00
Robert Osfield
375253ae8a From Paul Martz, Correction to Timer method comment. 2009-01-05 11:58:08 +00:00
Robert Osfield
c8752d6c18 From Cedric Pinson, added non const getText() method 2009-01-05 11:31:38 +00:00
Robert Osfield
cedffd3adb Introduced osgVolume::Layer and Locator classes mirrroring similar classes in osgTerrain. 2009-01-05 11:26:26 +00:00
Robert Osfield
f4c26f9cc8 Changed VolumeTile::setImage(Image*) to setImage(uint i, Image*) to allow multiple images to be attached to single tile 2008-12-21 20:42:29 +00:00
Robert Osfield
adb7a49c10 Renamed osgVolume::Brick to osgVolume::VolumeTile 2008-12-20 20:55:21 +00:00
Robert Osfield
2cc53e2256 Moved main setSceneData methods in osgViewer::View::setSceneData() 2008-12-19 17:50:58 +00:00
Robert Osfield
502eced994 From Jean-Sebastein Guay, I recently had to reimplement screen capture functionality into our framework (which was broken since the switch from OSG 1.2 to 2.2 over a year and a half ago). I used the ScreenCaptureHandler which I had contributed right before OSG 2.6 shipped, bit I had to trigger the screen capture programatically instead of by a key press in some cases, so I added a convenience method to do that.
It's a minimal change, it just calls an already existing protected method. It was trivial to subclass the handler to do it in our code, but pushing the change into OSG makes sense as it's generally useful to have it in the handler itself.

I also noticed that the handle() method was overridden from osgGA::GUIEventHandler but wasn't marked virtual. It wasn't intended that subclasses not be able to override it in turn, so I've added the keyword.""
2008-12-19 17:15:10 +00:00
Robert Osfield
0ea6cdeb96 Added ClipNode::set/getReferenceFrame(); 2008-12-19 15:29:59 +00:00
Robert Osfield
8951acabb7 Fixed warning & error 2008-12-19 12:58:50 +00:00
Robert Osfield
c862344929 Fixed warning 2008-12-19 12:46:21 +00:00
Robert Osfield
4c6511fd50 Updated wrappers 2008-12-19 10:20:23 +00:00
Robert Osfield
4ad20a413a Fixed warnings 2008-12-18 11:06:57 +00:00
Robert Osfield
2225339208 Fixed warnings 2008-12-17 16:13:23 +00:00
Robert Osfield
c85437e967 Fixed warnings 2008-12-17 15:32:35 +00:00
Robert Osfield
26c57f125d Warning fixes 2008-12-17 13:14:17 +00:00
Robert Osfield
8a6e04b84d Introduce NodeVisitor::className and libraryName() 2008-12-17 12:13:15 +00:00
Robert Osfield
a5c32da4ff Warning fixes 2008-12-17 11:00:16 +00:00
Robert Osfield
d01fc6ab1b From Jean-Sebastien Guay, added missing export 2008-12-17 10:01:52 +00:00
Robert Osfield
e7d8a2cfe6 Updated wrappers 2008-12-16 21:16:06 +00:00
Robert Osfield
60fc821764 From Cedric Pinson and Jeremey Moles, Changes to OpenSceneGraph-osgWidget-dev branch.
Notes from Robert Osfield, Merged changes to OpenSceneGraph-osgWidget-dev r9367 (prior to my botched attempt at merged svn/trunk into the branch).
2008-12-16 20:29:00 +00:00
Robert Osfield
bd4b6e9b8c Updated version numbers for 2.8.8 dev release 2008-12-16 16:36:33 +00:00
Robert Osfield
4511281f04 From Sukender and Robert Osfield, introduced GraphicsContext::ScreenSettings & WindowingSystemInterface::enumerateScreenSettings. 2008-12-16 15:08:04 +00:00
Robert Osfield
3ce53b56c7 Added support for a Terrain::s/getTerrainTechniquePrototype() 2008-12-15 22:18:40 +00:00
Robert Osfield
528fdbb75c Aded osg::isGLExtensionOrVersionSupported(uint contextID, char* extensionName, float minVersionRequired) method that
returns true if (the extension string is supported or GL version is greater than or equal to a specified version) and 
non extension disable is used.   This makes it possible to disable extensions that are now
available as parts of the core OpenGL spec.

Updated Texture.cpp is use this method.
2008-12-15 19:37:14 +00:00
Robert Osfield
993ec64657 Added deprecated messages to get/set methods of outgoing expiry schemes. 2008-12-15 16:10:26 +00:00
Robert Osfield
7d719d998e Removed buildMipmaps method that had no implementation. 2008-12-15 12:16:31 +00:00
Robert Osfield
315aeeb557 Where possible moved redundent C header includes from headers to source files 2008-12-12 18:47:30 +00:00
Robert Osfield
946175385f From Ulrich Hertlein, Typo fixes + "optional parameter to RecordCameraPathHandler to control the frame rate for record/playback. Default is 25.0, the environment variable takes preference if set." 2008-12-12 13:41:39 +00:00
Robert Osfield
b038baf676 Updated version number for 2.7.7 release 2008-12-12 10:19:19 +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
5363736caa Refactored computeIntersections() float x,float y, const osg::NodePath& nodePath. 2008-12-10 11:12:37 +00:00
Robert Osfield
905f3673d5 From Sukender, added missing inline keywords 2008-12-09 16:43:38 +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
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
bad3a92fc3 Added GL_ABGR_EXT to fix windows build 2008-12-05 16:41:12 +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
1ff5d3c53d Fixed wrappers 2008-12-01 15:46:50 +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
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
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
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
e9a18a7466 Updated SO version number for 2.5.6 release 2008-11-27 17:30:14 +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
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
e3d1c4ba04 From Piotr Rak, "added bool conversion for ref_ptr, when no implicit conversion to T* is used." 2008-11-25 16:24:50 +00:00
Robert Osfield
1228897b72 Fixed build for when OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION is off 2008-11-25 15:38:11 +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
0d8ae3bd66 From Ferdi Smit, added support for unsigned int typed uniforms 2008-11-25 14:15:35 +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
Robert Osfield
410b90334a From Wojciech Lewandowski, "I have restored MSVC disabled warnings in osg/Export. Difference is they are now disabled only when OSG_DISABLE_MSVC_WARNINGS macro is defined. This macro is set through CMake options and autogenerated in osg/Config. Simon suggested that it would be cool if we had more control over selected warnings. I tried to learn how to make selection of individual warning numbers possible, but had to gave up as my cmake skills were not sufficient. The only way I saw this possible would be adding one define for each MSVC warning number. But many definitions seemed too be to much clutter for osg/Config file so I rejected thar idea. For this it would be cool if autogenerated Config entries could more powerful than simple #define/#undef flags. Maybe Cmake gurus know how to do it.
I have not reverted added Compiler options. I assume that one may want to have warnings enabled for the application but may not want to see them while OSG libraries and examples compile.

Modified files:

osg/Export   - now explicitly includes osg/Config to make sure OSG_DISABLE_MSVC_WARNINGS is read
osg/Config.in  - declares OSG_DISABLE_MSVC_WARNINGS flag to be added to autogenerated osg/Config
CMakeLists.txt - declares OSG_DISABLE_MSVC_WARNINGS as option with default ON setting
"
2008-11-24 16:32:52 +00:00
Robert Osfield
8527492638 From Alberto Luaces, removed #include <cmath> as it was cause a build problem under Cygwin. 2008-11-24 16:09:43 +00:00
Robert Osfield
5b15436935 Added mechanism for tracking when interactive images are being rendered to
enable their backends to only rendered them when they are actively being rendered
in the OpenGL window.
2008-11-23 15:51:43 +00:00
Robert Osfield
8264b31fa1 Introduce osg::asciiToDouble/asciiToFloat function. 2008-11-23 11:35:43 +00:00
Robert Osfield
d0994c4ad3 From Paul Martz, added missing export 2008-11-23 09:57:41 +00:00
Robert Osfield
56a2cc65d0 From Cedric Pinson, Pulled in osgAnimation from OpenSceneGraph-osgWidget-dev into svn/trunk. 2008-11-22 12:14:19 +00:00
Robert Osfield
59df690e3e Added exports 2008-11-21 16:09:28 +00:00
Robert Osfield
344908faad Made the ParticleSystemUpdate::addParticleSystem, removeParticleSystem, replaceParticleSystem and setParticleSystem methods all virtual to allow them to be overriden. 2008-11-21 12:30:12 +00:00
Robert Osfield
05cd6878a5 From Jason Beverage, "The _pluginData member variable is not properly copied when using the copy constructor for ReaderWriter::Options." 2008-11-21 12:10:27 +00:00
Robert Osfield
341abcb315 From Serge Lages, "Here you can find some modifications to osgManipulator to work with double values instead of floats. Indeed I faced problems with the osgManipulator library when working with Earth based scenes, it was impossible to drag objects in a precise way if they were too far from the center of the scene." 2008-11-21 11:23:21 +00:00
Robert Osfield
672a5d14fe Replaced tabs 2008-11-21 11:09:11 +00:00
Robert Osfield
98df67c918 Added DisplaySettings::s/getApplication() to help with gecko plugin initialization when it requires the application name 2008-11-20 12:03:21 +00:00
Robert Osfield
beae8ab67f Clean up osgbrowser after moving browser implementation into gecko plugin 2008-11-20 11:28:20 +00:00
Robert Osfield
eaba09027e Reverted Kyle Centers mistaken patch that removed a _currentContext->valid() that was actually required. 2008-11-19 20:34:53 +00:00
Robert Osfield
5288263528 Moved Browser.h and Browser.cpp from osgbrowser into osgWidget. 2008-11-19 17:16:29 +00:00
Robert Osfield
cac16cb590 Added optional bool keep to BarrierOperation to make it more resuable 2008-11-18 15:18:34 +00:00
Robert Osfield
f6ad4628f4 Added definition of std::wstring as a work around to a lack of wstring under Cygwin. 2008-11-14 20:31:28 +00:00
Robert Osfield
453bbc8608 From Simon Hammett, moved VS #prgama warning disabling from include/osg/Export to CMakeList.txt. 2008-11-14 18:22:01 +00:00
Robert Osfield
10b5f0d041 From Wojciech Lewandowski, "Attached are modifications to GraphicsWindowWin32. By default workaround is
set to off. But could be activated/decativated via CMake as well as system
environment variable. I also modified src\osgViewer\CMakeLists.txt to turn
off this workaround by default as suggested."
2008-11-14 17:03:59 +00:00
Robert Osfield
11388f3519 Updated version number in prep for 2.5.6 dev release 2008-11-13 10:49:33 +00:00
Robert Osfield
2090fb1450 From Jaromir Vitek, "patch contains extension to fbo and camera. Camera can attach new render buffer for depth and stencil logical buffer in packed form." 2008-11-09 11:55:11 +00:00
Robert Osfield
60af3fd6fc Fixed typo 2008-11-07 17:23:55 +00:00
Robert Osfield
18dbdc2e86 Fixed build under gcc 4.3.2 2008-11-07 17:07:43 +00:00
Robert Osfield
720551d549 From Michael Platings, Converted std::fstream/ifstream/ofstream to osgDB::fstream/ifstream/ofstream and
fopen to osgDB::fopen to facilitate support for wide character filenames using UT8 encoding.
2008-11-07 15:08:08 +00:00
Robert Osfield
3455431129 From Tim Moore, removed redundent forward declartion of BoundingBox and BoundingSphere 2008-11-07 13:18:40 +00:00
Robert Osfield
4f5379389d From Martins Innus, "Here is a fix to add requestWarpPointer for OS X. It seems to work for me, I just took what osgProducer had. These are updated files to 2.7.3" 2008-11-07 10:23:57 +00:00
Robert Osfield
7b9474e33e Fixed constness of getTexture/getRenderBuffer() const and added non cost version. 2008-11-06 14:46:11 +00:00
Robert Osfield
b5aa966d12 From Michael Platings, "I've added functions to get the
texture, renderbuffer and other properties from a FrameBufferAttachment."
2008-11-06 14:29:35 +00:00
Robert Osfield
3f9e5dbfaa From Kyle Centers, removed redundent check to _currentContext.valid(). 2008-11-06 14:17:12 +00:00
Robert Osfield
ad2cb03a68 From Csaba Halasz, adding missing export directives 2008-11-06 14:04:26 +00:00
Robert Osfield
70e1c60819 Added sendPointerEvent and sendKeyEvent virtual methods to osg::Image to
facilitate the subclassing of Image providing interactive behaviours so as
used in the vnc interactive VncImage class.

osgViewer::InteractiveImageHandler provides an event handler that convertes osgGA 
mouse and keyboard events into the coordinate frame of an image based on ray intersection with geometry in
the associated subgraph.

Changed the ordering of events processing in Viewer and CompositeViewer to allow
scene graph event handlers to take precidence over viewer event handlers and camera manipulators
2008-11-03 15:08:04 +00:00
Robert Osfield
545a5d02c7 Changed version number to 2.7.5 in prep for dev release 2008-11-03 15:03:49 +00:00
Robert Osfield
ae61033a32 Removed renduent osgDB::Registry DatabasePager methods 2008-10-30 13:05:08 +00:00
Robert Osfield
b28612bce2 Various warning fixes 2008-10-27 13:09:43 +00:00
Robert Osfield
d703c58936 From Blasius Czink, "Among other things I added support for atomic operations on BSD-like systems and additional methods (for "and", "or", "xor").
"

and a later post the same osg-submissions thread:

"it's been a while since I have made the changes but I think it was due to problems with static builds of OpenThreads on windows. I was using
OpenThreads in a communication/synchronisation library (without
OpenSceneGraph). It seems I forgot to post a small change in the CMakeLists file of OpenThreads. If a user turns DYNAMIC_OPENTHREADS to OFF (static build) OT_LIBRARY_STATIC will be defined in the Config.
Without these changes a windows user will always end up with a "__declspec(dllexport)" or "__declspec(dllimport)" which is a problem for static builds."

And another post from Blasius on this topic:

"I tested with VS2005 and VS2008. For 32 bit everything works as expected. For x64 and VS2008 I could successfully do the cmake-configure and then the compilation but I had occasional crashes of cmTryCompileExec.exe (during the cmake-configure phase) which seems to be a cmake bug. With VS2005 and 64bit cmake does not set _OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED although the interlocked functionality should be there. If I place the source snippet from the CHECK_CXX_SOURCE_RUNS macro to a separate sourcefile I can compile and run the resulting executable successfully. Forcing OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED (on VS2005/x64) reveals a bug in "intrin.h" which seems to be fixed in VS2008 but not in VS2005.

In case anyone is interested the lines:
__MACHINEI(unsigned char _interlockedbittestandset(long *a, long b))
__MACHINEI(unsigned char _interlockedbittestandreset(long *a, long b))
__MACHINEX64(unsigned char _interlockedbittestandset64(__int64 *a, __int64 b))
__MACHINEX64(unsigned char _interlockedbittestandreset64(__int64 *a, __int64 b))

should be changed to:
__MACHINEI(unsigned char _interlockedbittestandset(long volatile *a, long b))
__MACHINEI(unsigned char _interlockedbittestandreset(long volatile *a, long b))
__MACHINEX64(unsigned char _interlockedbittestandset64(__int64 volatile *a, __int64 b))
__MACHINEX64(unsigned char _interlockedbittestandreset64(__int64 volatile *a, __int64 b))

The worst thing that can happen is that interlocked funtionality is not detected during cmake-configure and the mutex fallback is used.
Which reminds me another small glitch in the Atomic header so I attached a corrected version.



    Why is the OT_LIBRARY_STATIC added to the config file? It is not needed anywhere.

OT_LIBRARY_STATIC is needed if you are doing static-builds on Windows. See my previous post on that.
"
2008-10-27 10:42:58 +00:00
Robert Osfield
0ff3f48693 Improved the support for no pre compile, and configuring the number of threads in the DatabasePager. 2008-10-26 22:22:38 +00:00
Robert Osfield
c1fd14fb2c Introduced new method of management the number of PagedLOD active, by using
a capping the number of PagedLOD to a sepcified maximum, with pruning of inactive
PagedLOD when the total number of inactive and active PagedLOD goes above the maximum.

To enable the mode set the env var OSG_MAX_PAGEDLOD to a value something like 1000.
2008-10-23 16:33:14 +00:00
Robert Osfield
24eb2f6c43 Introduce osgDB::FileCache, and updated osgfilecache and DatabasePager to use it. 2008-10-20 16:24:57 +00:00
Robert Osfield
10186190f6 Introduced support for controlling mipmapping of osgTerrain::ImageLayer and compression of osgTerrain::HeightFieldLayer. 2008-10-20 08:43:25 +00:00
Robert Osfield
351ac1614c From Paul Melis, fixed typo 2008-10-17 09:16:02 +00:00
Robert Osfield
ac975bf79a Added a Refrenced::getGlobalReferencedMutex, and OpenThreads::ScopedPointerLock() and use of this in add/removeParent() codes
to avoid threading problems when using atomic ref counting.
2008-10-14 14:27:41 +00:00
Robert Osfield
af13e84093 UPdated version numbers 2008-10-14 14:25:54 +00:00
Robert Osfield
c47d63ba1c Added friend struct ViewData to try and avoid compile issues under HP-UX 2008-10-08 12:29:43 +00:00
Robert Osfield
5e95d6e3b5 Added Texture1D(Image*) and Texture3D(Image*) constructors 2008-10-08 11:30:18 +00:00
Robert Osfield
29c0e913d7 From Mathias Froehlich, fixes for HP-UX, SGI and Solaris build 2008-10-08 10:10:34 +00:00
Robert Osfield
b7fa3f6f3c Replaced IntersectVisitor usage with IntersectionVisitor 2008-10-07 14:19:28 +00:00
Robert Osfield
ff8c6aa32b From Mathias Froehlich, build fixes 2008-10-07 12:31:42 +00:00
Robert Osfield
8c98220878 Added the ability to release OpenGL objects in PagedLOD subgrphs that are no longer being rendered. 2008-10-07 11:35:41 +00:00
Robert Osfield
400e6eb09a Updated to reflect changes in NodeVistor::ImageRequestHandler. 2008-10-06 17:02:56 +00:00
Robert Osfield
8147bd4df8 Refactored ImageSequence to provided a cleaner and more robust implementation 2008-10-06 17:02:20 +00:00
Robert Osfield
7e43decf4c From Wojciech Lewandowski, build fixes for handling Matrix::value_type == float 2008-10-06 14:18:27 +00:00
Robert Osfield
df12c7bc68 Ran dos2unix 2008-10-06 14:15:27 +00:00
Robert Osfield
236832f669 Ran dos2unix on headers 2008-10-06 08:53:54 +00:00
Robert Osfield
eb01f3365f Added include <osg/Config> to take advantage of OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION 2008-10-03 16:57:01 +00:00
Robert Osfield
e7bfc59f5a From Neil Groves, addition on a T* implicit output conversion method and removal of comparison methods that are replaced by the single conversion method.
From Robert Osfield, optional compilation of above.
2008-10-03 15:13:11 +00:00
Robert Osfield
eb5a656f4e From Neil Groves, added intrusive_ptr_add_ref and intrusive_ptr_release methods to enable
usage of boost::intrusive_ptr<> with osg::Referenced objects.
2008-10-03 13:34:32 +00:00
Robert Osfield
99fd6ed93a From Neil Groves, "Frequently I would like code that has a signature like: void foo(osg::ref_ptr<osg::Node> node) to work for osg::ref_ptr<osg::Group>, osg::ref_ptr<osg::Geode> etc. The behaviour of osg::ref_ptr does not mimic the behaviour of a raw pointer in this regard.
To facilitate this possibility I have added a template copy constructor and a template assignment operator. These work for safe conversions like those in my previous example, but fail as desired for non-safe conversions since the template instantiation fails during the raw pointer copy/assignment.

The lack of this facility has appreciably handicapped development of generic algorithms applied to the scene graph, and I believe that this alteration will be welcomed by most of the community. If there are issues with antiquated compilers not supporting template member functions then perhaps a small piece of conditional compilation is in order.

I have made the change using the latest release version (2.6) as the base. The full file is attached.

I have not tested building the osg wrappers and the script binding code. I have tested the legal and illegal conversions of both copying and assignment to ensure that behave as expected on MSVC7.1, MSVC8, MSVC9, GCC 4.3."
2008-10-03 09:55:20 +00:00
Robert Osfield
4bde492d8c From Stephan Huber, removed now redundent setEventQueue method 2008-10-03 09:19:53 +00:00
Robert Osfield
fb9181ff17 From Roland Smeenk, A year ago Stephan Maximilian Huber sent in a submission with enhanced statistics. Because I was interested in the scene statistics of his submission I tried to merge his changes with the current CVS head. I made a few changes to the way the statistics are displayed. Attached you will find the new StatsHandler and a screenshot of the statistics in the compositeviewer example.
This code will add two extra statistics options:
-Camera scene statistics, stats for the scene after culling (updated at 10 Hz)
-View scene statistics, stats for the complete scene (updated at 5 Hz)
 
Each camera and each view will expand the statistics to the right.
 
I also added the requests and objects to compile of the databasepager to the databasepager statistics.""
2008-10-03 09:02:23 +00:00
Robert Osfield
82318cfd04 Added missing dirtyBound() calls 2008-10-03 08:33:17 +00:00
Robert Osfield
3b4184295e Various improvements to the dicom loader to be able to handle a broader range of dicom files 2008-10-02 15:45:08 +00:00
Robert Osfield
0fdb54d8bb Changed loadLibrary so that it retusn a LoadStatus variable to enable calling
codes to differentiate between whether a library is already loaded, or is newly loaded
2008-09-26 13:51:18 +00:00
Robert Osfield
3bbd4bbfd6 Removed unused methods 2008-09-25 15:19:42 +00:00
Robert Osfield
a3314e35a7 Added convinience methods for parse shader source files 2008-09-25 14:41:06 +00:00
Robert Osfield
5c264c7c74 Added mutex usage to protect access to plugin and readerwriter containers 2008-09-23 17:29:28 +00:00
Robert Osfield
48fe06fec3 Added getExtensionIncludingDot to provide more efficient handling of extensions 2008-09-22 14:46:54 +00:00
Robert Osfield
922b85b386 Changed the macro usage so that the quotes are now added inside the .cpp 2008-09-22 13:16:29 +00:00
Robert Osfield
00f6622ac8 Create initial class placeholders for main volume rendering classes 2008-09-21 11:05:03 +00:00
Robert Osfield
ae08a5b261 Change TileID::layer to TileID::level 2008-09-20 15:43:38 +00:00
Robert Osfield
bf15614df6 From Wojciech Lewandowski, a range of new ShadowMap implementations include View Dependent Shadow Maps - LispSM
From Robert Osfield, refactored Wojciech's submission to integrated with osgShadow and use coding sytle more consistent with rest of OSG.
2008-09-19 19:51:27 +00:00
Robert Osfield
90d5c9d0c6 Moved Serializer header from VPB into osgDB. 2008-09-18 15:50:22 +00:00
Robert Osfield
91f7895735 refactored the getWindows(..) and getContexts(..) methods so that they produce
consistent ordering based on the order Camera/slave camera ordering.
2008-09-18 15:18:59 +00:00
Robert Osfield
1d328ba0d4 From Christopher Blaesius,
"Soft shadow mapping is basically the same as hard shadow mapping beside that
it uses a different fragment shader.
So for me it makes sense that osgShadow::SoftShadowMap is derived from
osgShadow::ShadowMap, this makes it easier to maintain the two classes.
Additional SoftShadowMap also provides the same Debug methods as ShadowMap."
2008-09-18 14:48:28 +00:00
Robert Osfield
9510df9c2e From Alan Dickinson, change methods to virtual. 2008-09-18 13:54:13 +00:00
Robert Osfield
0969a5384b Improved the constness of parameters the Node::getWorldMatrices(..) method.
Added Drawable::getWorldMatrices(const Node*) method.
2008-09-18 10:38:18 +00:00
Robert Osfield
22eae68e48 From Mathias Froehlich, "This is a generic optimization that does not depend on any cpu or instruction
set.

The optimization is based on the observation that matrix matrix multiplication
with a dense matrix 4x4 is 4^3 Operations whereas multiplication with a
transform, or scale matrix is only 4^2 operations. Which is a gain of a
*FACTOR*4* for these special cases.
The change implements these special cases, provides a unit test for these
implementation and converts uses of the expensiver dense matrix matrix
routine with the specialized versions.

Depending on the transform nodes in the scenegraph this change gives a
noticable improovement.
For example the osgforest code using the MatrixTransform is about 20% slower
than the same codepath using the PositionAttitudeTransform instead of the
MatrixTransform with this patch applied.

If I remember right, the sse type optimizations did *not* provide a factor 4
improovement. Also these changes are totally independent of any cpu or
instruction set architecture. So I would prefer to have this current kind of
change instead of some hand coded and cpu dependent assembly stuff. If we
need that hand tuned stuff, these can go on top of this changes which must
provide than hand optimized additional variants for the specialized versions
to give a even better result in the end.

An other change included here is a change to rotation matrix from quaterion
code. There is a sqrt call which couold be optimized away. Since we divide in
effect by sqrt(length)*sqrt(length) which is just length ...
"
2008-09-17 16:14:28 +00:00
Robert Osfield
5c5ab84420 Tweaks to facilitate osgWrapper build 2008-09-17 14:21:47 +00:00
Robert Osfield
7ec5632bcc Introduce new templated clone(..) methods that return the correct type of object cloned. 2008-09-17 14:21:19 +00:00
Robert Osfield
6ea2adf1f5 Introduced beginings of osgVolume NodeKit. 2008-09-16 15:32:23 +00:00
Robert Osfield
c7b66322be From Ralf Habacker, removed redundent SwitchLayer::clear() 2008-09-15 11:27:30 +00:00
Robert Osfield
d71a6f6cab Introduced Geometry::containsSharedArrays() and Geometry::duplicateSharedArrays() to
support a fix to the osgUtil::Simplifier that couldn't handle shared arrays
2008-09-14 10:31:27 +00:00
Robert Osfield
995ead176a Introduced TransferFunction1D::assign(ValueMap&). 2008-09-13 09:09:51 +00:00
Robert Osfield
dc1b52aa7c Updated version numbers in prep for up comming dev release 2008-09-11 16:11:51 +00:00
Robert Osfield
e1930d127e Refinements to SwitchLayer and WhiteListTileLoadedCallback 2008-09-11 14:28:42 +00:00
Robert Osfield
ff299eb104 Introduced osgTerrain::WhiteListTileLoadedCallback for the management of options terrain layers 2008-09-11 13:21:58 +00:00
Robert Osfield
b4b5b5ea41 Introduced TerrainTile::TileLoadedCallback 2008-09-10 18:11:54 +00:00
Robert Osfield
45ccf11161 Added osg::Image::set/getWriteHint() that allows images themselves to control how
they are written to disk, either inline or as an external file.  Added support for
this in the .ive plugin.  Default of WriteHint is NO_PREFERNCE, in which case it's
up to the reader/writer to decide.
2008-09-10 11:26:30 +00:00
Robert Osfield
08883dbf6c Added setSetName/getSetName() methods 2008-09-02 12:55:26 +00:00
Robert Osfield
13878d9a2e Changed curr and min to current and minimum respectively, to avoid compile problems under Windows 2008-09-01 14:03:41 +00:00
Robert Osfield
4a18b9cee1 Updated version for 2.7.2 dev release 2008-09-01 11:09:03 +00:00
Robert Osfield
6d9206224d Added call to free in setValue methods to prevent potential memory leak 2008-09-01 10:48:28 +00:00
Robert Osfield
2582e0342a From Mathias Froehilch,"Current include/osgSim/ShapeAttribute also misses string.h include because of
strdup.
Attached is the changed file."
2008-09-01 10:46:50 +00:00
Robert Osfield
2ce8fbdcf9 From Wojciech Lewandowski, "Most recent changes to CameraPathEventHandler change path writing method. Now control points are written on the fly. But default stream precision is not adjusted as it used to and remains set to 6 digits (at least with VS 2008) so larger coordinates like positions on Earth Ellipsoid loose lots of fidelity. This patch fixes this issue.
"
2008-09-01 10:06:19 +00:00
Robert Osfield
8fec858b49 Build fixes for Windows 2008-09-01 09:57:35 +00:00
Robert Osfield
bc747b0935 Added CompositeLayer::addLayer(setname,filename) convinience function 2008-08-29 09:28:28 +00:00
Robert Osfield
ed617f87df Introduce the concept of layer set name, using the osg::Object::s/getName() to store
the setname, and using a compound string (set:setname:filename) in place of standard filename when reading and writing
files.
2008-08-28 16:15:57 +00:00
Robert Osfield
c8ef144532 Converted AutoTransform to use doubles. 2008-08-28 09:43:00 +00:00
Robert Osfield
95a359bdab Introduced SwitchLayer which will form the basis of provided support for varients 2008-08-27 10:13:30 +00:00
Robert Osfield
908f49f6e3 Updated version number for 2.7.1 release, and added OSG_FORCE_QUERY_RESULT_AVAILABLE_BEFORE_RETRIEVAL Cmake option
that enables the occlusion query workaround for an OpenGL driver crash
2008-08-25 16:44:48 +00:00
Robert Osfield
8ecf508fda From Sergey Leontyev, "1. In StyleManager
when applying styles to a Label element the code below runs in a infinite loop.

The reason for this is that nothing increments the Reader "r" in the case when applying a style to label,

so I advance the reader when no match was found. 

( To replicate the error apply style to any label)

 

replaced this:

                while(!r.eof()) if(_styles[style]->applyStyle(t, r)) inc = true;

 

with this:

                while(!r.eof())

                 {

                                if(_styles[style]->applyStyle(t, r))

                                    inc = true;

                                else

                                    r.advanceOverCurrentFieldOrBlock();

                 }            

 

 

I tested it and it works well for me, I did not find any problems with it.

 

 

2.  Added style support for Canvas element, event though there is no styles to apply yet.

It is usefull for someone who inherits from Canvas class to develop another element.

 If applyStyle(Canvas) does not exist

there is no way to apply style to the  element that inherited from Canvas element.

 

Added virtual

     bool applyStyle(Canvas).

 

and in added call to apply style if the Object is of type Canvas:

StyleManager::_applyStyleToObject(osg::Object* obj, const std::string& style) {

...

 

else if(!std::string("Canvas").compare(c))

return _coerceAndApply<Canvas>(obj,style,c);

 "
2008-08-18 11:21:41 +00:00
Robert Osfield
9c8e44659f From Erik van Dekker,
"I made several modifications:

 

    * The cause of my errors was that my OSG source directory path contains spaces. To fix this issue I wrapped all paths with quotes, as stated in doxygen documentation.

 

    * I also received some warning messages about deprecated doxygen settings, which I fixed by updating the doxygen file, i.e. running \u2018doxygen \u2013u doxygen.cmake\u2018. By running this command deprecated doxygen options are removed, some option comments have changed and quite some options have been added (I kept their default settings unless mentioned).

 

    * I was surprised to find that the doxygen OUTPUT_DIRECTORY was set to \u201c${OpenSceneGraph_SOURCE_DIR}/doc\u201d, which does not seem appropriate for out of source builds; I changed this to \u201c${OpenSceneGraph_BINARY_DIR}/doc\u201d. (On the other hand, maybe a cmake selectable option should be given to the user?)

 

    * Fixed two warnings I received about unexpected end-of-list-markers in \u2018osg\AnimationPath and \u2018osgUtil\CullVisitor due to excess trailing points in comments.

 

    * Fixed a warning in osgWidget\StyleInterface due to an #include directive (strangely) placed inside a namespace.

 

    * Fixed a warning in osg\Camera due to the META_Object macro that confused doxygen. Adding a semi-colon fixed this.

 

    * Removed auto_Mainpage from the INCLUDE option, because I am positive that this file does not belong there; It never generated useful documentation anyway.

 

    * I added the OSG version number environment variable to the PROJECT_NUMBER option so that the version number is now shown on the main page of generated documentation (e.g. index.html).

 

    * Changed option FULL_PATH_NAMES to YES, but made sure STRIP_FROM_PATH stripped the absolute path until the include dir. This fixed an issue that created mangled names for identical filenames in different directories. E.g. osg/Export and osgDB/Export are now correctly named.

 

    * Changed option SHOW_DIRECTORIES to yes, which is a case of preference I guess.

 "
2008-08-18 11:00:40 +00:00
Robert Osfield
87b79bd221 Removed todo entry 2008-08-18 10:47:43 +00:00
Robert Osfield
3de3b2dccc From Maceij Krol, "I have implement frame based expiration of PagedLOD children.
New attribute DatabasePager::_expiryFrames sets number of frames a PagedLOD child is kept in memory. The attribute is set with DatabasePager::setExpiryFrames method or OSG_EXPIRY_FRAMES environmental variable.

New attribute PagedLOD::PerRangeData::_
frameNumber contains frame number of last cull traversal.

Children of PagedLOD are expired when time _AND_ number of frames since last cull traversal exceed OSG_EXPIRY_DELAY _AND_ OSG_EXPIRY_FRAMES respectively. By default OSG_EXPIRY_FRAMES = 1 which means that nodes from last cull/rendering
traversal will not be expired even if last cull time exceeds OSG_EXPIRY_DELAY. Setting OSG_EXPIRY_FRAMES = 0 revokes previous behaviour of PagedLOD.

Setting OSG_EXPIRY_FRAMES > 0 fixes problems of children reloading in lazy rendering applications. Required behaviour is achieved by manipulating OSG_EXPIRY_DELAY and OSG_EXPIRY_FRAMES together.

Two interface changes are made:

DatabasePager::updateSceneGraph(double currentFrameTime) is replaced by DatabasePager::updateSceneGraph(const osg::FrameStamp &frameStamp). The previous method is in #if 0 clause in the header file. Robert, decide if You want to include it.

PagedLOD::removeExpiredChildren(double expiryTime, NodeList &removedChildren) is deprecated (warning is printed), when subclassing use PagedLOD::removeExpiredChildren(double expiryTime, int expiryFrame, NodeList &removedChildren) instead. "
2008-08-17 16:52:35 +00:00
Robert Osfield
dceb3cbe88 From Jutta Sauer, "We added a raise window method to GraphicsWindow. And added two
implementations for Win32 and X11.

"
2008-08-15 17:32:26 +00:00
Robert Osfield
b6886cdbb2 Updated version numbers in prep for next dev release 2008-08-15 17:26:06 +00:00
Robert Osfield
38f6cddc2c Changed osg::ImageSequence::set/getDuration to set/getLength() to be in keeping with the
osg::ImageStream's getLength().
2008-08-15 16:21:44 +00:00
Robert Osfield
927942a0f8 Further work on osg::ImageSequence, improving pause functionality, and introducing new seek(double time) method 2008-08-15 12:45:20 +00:00
Robert Osfield
49e7358bf6 Added initial looping and pause play support 2008-08-14 16:29:12 +00:00
Robert Osfield
bcbd50af39 Implemented a reference eye point and associated methods in support of intersecting billboards 2008-08-14 14:22:39 +00:00
Robert Osfield
6f6f56c795 Improved the doxygen docs over the various namespaces 2008-08-05 19:17:09 +00:00
Robert Osfield
7f8183f64c Merged changes to OpenSceneGraph-2.6 into trunk using :
svn merge -r 8729:8734 http://www.openscenegraph.org/svn/osg/OpenSceneGraph/branches/OpenSceneGraph-2.6 .
2008-08-05 11:17:48 +00:00
Robert Osfield
fe207a09c1 From Sherman Wilcox, "Minor change to bool setGLExtensionFuncPtr(T& t, const char* str1) and
setGLExtensionFuncPtr(T& t, const char* str1, const char* str2) -
functions returned false even on success."
2008-08-04 17:08:28 +00:00
Robert Osfield
02f131c7fe From Philip Lowman, workaround of Centos 5's missing definition of GL_MAX_SAMPLES_EXT. 2008-08-04 14:01:42 +00:00
Robert Osfield
f81ff952a2 merged 2.6 branch changes back into trunk using : svn merge -r 8699:8706 http://www.openscenegraph.org/svn/osg/OpenSceneGraph/branches/OpenSceneGraph-2.6 . 2008-08-03 16:57:09 +00:00
Robert Osfield
5b5e3e5f78 Updated version numbers to 2.6.0 2008-07-25 21:01:57 +00:00
Robert Osfield
5cac386fa6 Renamed enums in osgWidget from ALLCAPITALS to normal OSG conventional of AllCapital 2008-07-25 20:50:42 +00:00
Robert Osfield
f4d74b66cf Added OSGPL Copyright notices 2008-07-25 20:04:41 +00:00
Robert Osfield
ff5da51dcb Restructured classes to better fit with style of the rest of the OSG. 2008-07-25 19:57:17 +00:00
Robert Osfield
727925a1c2 Added include to help wrapper building 2008-07-25 19:53:18 +00:00
Robert Osfield
65d5ef608d Reverted back to using std::list<std::String> 2008-07-25 17:42:37 +00:00
Robert Osfield
d0890ab250 Updated wrappers, and further refined the ImageSequence API 2008-07-25 16:11:51 +00:00
Robert Osfield
ec4d189b64 Added ImageSequence to .ive plugin, added support for multiple ImageThreads in osgDB::ImagePager 2008-07-25 13:45:07 +00:00
Robert Osfield
0d1656055c Moved PluginQuery from osgconv into osgDB 2008-07-25 10:18:36 +00:00
Robert Osfield
2cf44741d7 Added getCurrentCamera/getCurrentRenderStage methods 2008-07-24 12:47:55 +00:00
Robert Osfield
ec9218ad1f Refactored OverlayData so that its possible to subclass OverlayNode/OverlayData. 2008-07-23 22:19:29 +00:00