Commit Graph

8198 Commits

Author SHA1 Message Date
Robert Osfield
9499cfa420 Improved the GLSL implementation. 2008-08-26 17:40:04 +00:00
Robert Osfield
4a5e9e1861 Added ChangeLog target for updating the ChangeLog, and updated the ChangeLog and AUTHORS files 2008-08-26 12:55:26 +00:00
Robert Osfield
6af69a3615 Added wrapper build target for generating the osgWrappers 2008-08-26 12:05:24 +00:00
Robert Osfield
86d2eb1e4a Added provisional block in computePositions() 2008-08-26 09:39:45 +00:00
Robert Osfield
11bd5f39d4 From Ulrich Hertlein, attached is a small fix for a mismatched function signature 2008-08-26 08:41: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
7f042b803a From Doug McCorkle, via Paul Martz who writes : "Summary: Some platforms/configurations cause application crashes if the
occlusion query result is not ready for retrieval when the app tries to
retrieve it. This fix adds an application-level wait loop to ensure the
result is ready for retrieval. This code is not compiled by default; add "-D
FORCE_QUERY_RESULT_AVAILABLE_BEFORE_RETRIEVAL" to get this code.

Full, gory details, to the best of my recollection:

The conditions under which we encountered this issue are as follows: 64-bit
processor, Mac/Linux OS, multiple NVIDIA GPUs, multiple concurrent draw
threads, VRJuggler/SceneView-based viewer, and a scene graph containing
OcclusionQueryNodes. Todd wrote a small test program that produces an almost
instant crash in this environment. We verified the crash does not occur in a
similar environment with a 32-bit processor, but we have not yet tested on
Windows and have not yet tested with osgViewer.

The OpenGL spec states clearly that, if an occlusion query result is not yet
ready, an app can go ahead and attempt to retrieve it, and OpenGL will
simply block until the result is ready. Indeed, this is how
OcclusionQueryNode is written, and this has worked fine on several platforms
and configurations until Todd's test program.

By trial and error and dumb luck, we were able to workaround the crash by
inserting a wait loop that forces the app to only retrieve the query after
OpenGL says it is available. As this should not be required (OpenGL should
do this implicitly, and more efficiently), the wait loop code is not
compiled by default. Developers requiring this work around must explicitly
add "-D FORCE_QUERY_RESULT_AVAILABLE_BEFORE_RETRIEVAL" to the compile
options to include the wait loop."
2008-08-25 16:43:40 +00:00
Robert Osfield
38efb23901 From Liang Aibin, added support for :
osgFX::Effect
    osgFX::AnisotropicLighting
    osgFX::BumpMapping
    osgFX::Cartoon
    osgFX::Scribe
    osgFX::SpecularHighlights.
2008-08-25 15:57:17 +00:00
Robert Osfield
d3dda658a8 From Liang Aibin, removed redundent spaces 2008-08-25 15:37:48 +00:00
Robert Osfield
5c2a4b014e From Michael Guerrero, Fixed crash that occurred when openning an new movie file after all previous movie ImageStream had been closed. Also add a missing close of the movie file. 2008-08-25 15:20:42 +00:00
Robert Osfield
0c9214636f From Paul Martz, "This change fixes a problem with PAT nodes during FLT export."
Note, Paul Martz has merged this patch into OpenSceneGraph-2.6.
2008-08-25 15:03:31 +00:00
Robert Osfield
43d19c11cf From Guillaume Chouvenc, "I have added the file StateAttribute.cpp in src/osgPlugins/osg
to support the reading and writing of StateAttribute Callback
in osg files.
"
2008-08-25 14:59:06 +00:00
Robert Osfield
8d5bfeddee From Guillaume Chouvenc, "I have modified Uniform.cpp and StateSet.cpp in src/osgPlugins/osg
to support the reading and writing of Uniform Callback and
StateSet Callback in osg files."
2008-08-25 14:54:11 +00:00
Robert Osfield
6c047f7abe Added testing of max texture size using a realize operation 2008-08-25 11:37:53 +00:00
Robert Osfield
94c6c9d32a Added support for event handler for non shader path, enable alpha func 2008-08-25 10:38:39 +00:00
Robert Osfield
a2c1dc85dc Removed debug info 2008-08-25 10:38:07 +00:00
Robert Osfield
ff35465a33 Moved _stateset = new StateSet instances to setStateSet(new StateSet) to make
sure the wiring up of the StateSet parents is done consistently
2008-08-25 10:20:20 +00:00
Robert Osfield
8d8852bc23 Added command line arguments to Viewer constructor, and added meaningful error message when no 3d image is provided 2008-08-25 09:53:24 +00:00
Robert Osfield
78e22f24c2 Introduced initial cut of a dicom loader, which uses ITK to do the loading. 2008-08-22 16:39:17 +00:00
Robert Osfield
8c8421e7a2 Added warning message 2008-08-22 16:37:56 +00:00
Robert Osfield
f5105510f3 Added support for reading the image transform from UserData in the form of a Matrix. 2008-08-22 16:35:49 +00:00
Robert Osfield
f930e707e8 Added checked against an empty _kdNodes list before commensing with intersection 2008-08-19 17:41:55 +00:00
Robert Osfield
3cec676d98 Added --mip command line option which enables Maximum Intensity Projection filtering 2008-08-18 15:08:04 +00:00
Robert Osfield
8303f03b24 Added .ive support for BlendEquation 2008-08-18 15:06:41 +00:00
Robert Osfield
4adb68c802 Added BlendEquation .osg support 2008-08-18 14:49:16 +00:00
Robert Osfield
1efe363137 Updated AUTHORS file for 2.7.0 release 2008-08-18 12:39:18 +00:00
Robert Osfield
f17fe26c64 Updated ChangeLog for 2.7.0 release 2008-08-18 11:55:17 +00:00
Robert Osfield
9bc5d7f000 Updated wrappers 2008-08-18 11:48:07 +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
0b39044666 Ran fixtabs to enforce four space tabs 2008-08-18 11:17:44 +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
0c234e7997 From Jason Beverage, "I've got a few machines that OSG incorrectly believes support FRAME_BUFFER_OBJECTS so I am manually trying to set the renderTargetImplementation to PIXEL_BUFFER or PIXEL_BUFFER_RTT. I noticed that this call wasn't setting the camera's overlay data properly because the setRenderTargetImplementation simply calls init() which only does anything for OBJECT_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY. Any subsequent calls to getOverlayData will simply return the cached OverlayData instead of setting it up.
My fix updates the camera's render target implementation for all OverlayData objects in the OverlayDataMap."
2008-08-17 16:45:09 +00:00
Robert Osfield
f0c2b89fc5 From Paul Palumbo, "Fixes a typo in coverage antialiasing code... Without this fix, get incorrect antialiasing results. " 2008-08-15 17:35:04 +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
0448b31f93 From Frashid Larshkari, "I modified the vertical/horizontal interlace stereo modes so that they
use the osg::State::applyMode for enabling/disabling certain while
rendering the stencil mask. Previously some of these calls were
overriding the scene graph states because the global state was not
aware of this change.

"
2008-08-15 17:25:42 +00:00
Robert Osfield
5400e570c7 Added support for geometry shader attributes 2008-08-15 17:18:10 +00:00
Robert Osfield
7cd4641ece From Stephane Lamoliatte, "I added the osg::Program parameters support for the osg plug'in.
Now we could correctly configure geometry shaders in osg files."

Notes from Robert Osfield, renamed the names of the parameters to be less GL centric and more human readable.
2008-08-15 16:43:56 +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
b6292f4537 Fixed the name of _playToggle 2008-08-15 13:07:04 +00:00
Robert Osfield
c6c5cdaf89 Updated wrappers 2008-08-15 13:06:18 +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
56001f3d82 Added event handler to toggling looping and play/pause 2008-08-14 16:28:45 +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
760ccdf2ef From Eric Sokolowski, added OSX release notes to READEME 2008-08-05 20:05:25 +00:00
Robert Osfield
367c107c11 Added osgWidget to doc building 2008-08-05 20:05:07 +00:00
Robert Osfield
6f6f56c795 Improved the doxygen docs over the various namespaces 2008-08-05 19:17:09 +00:00