Commit Graph

7714 Commits

Author SHA1 Message Date
Robert Osfield
e26579b0ec Moved the delete operations to before of the compile operations to ensure that
delete operations don't get pushed out by allocations
2008-02-28 17:59:44 +00:00
Robert Osfield
79276b3169 From He Sicong, "fixed shader calculation of ray tracing" 2008-02-28 10:56:03 +00:00
Robert Osfield
eb46608be4 From Wojciech Lewandowski and Robert Osfield, Support from LightPointNode::s/getPointSprite parameter. 2008-02-27 12:11:02 +00:00
Robert Osfield
a4a39d32ff From Paul Martz, "Per the discussion in osg-users, this change adds code comments to the Matrix* headers to document assumptions in the getRotate() method." 2008-02-27 11:46:05 +00:00
Robert Osfield
3b4af26136 From Paul Martz, fixed get/set methods API 2008-02-27 11:43:58 +00:00
Robert Osfield
335eed204b Added debug message to track cache usage 2008-02-27 11:43:06 +00:00
Robert Osfield
fdb6b31452 From Melchior Franz, fixed handling of modified keys when entering/leaving window 2008-02-25 17:30:30 +00:00
Robert Osfield
a3a5af18b0 From Franz Melchior, "When switching virtual desktops or minimizing a window, keys
remain in pressed state after revealing, even if they are no
longer pressed on the keyboard. This can have bad effects,
especially if the stuck keys are modifier keys. One has to
press and release the stuck keys again to reset the wrong state.

The fix keeps track of all key presses and releases. On FocusOut
and UnmapNotify it releases all keys that are in pressed state,
and on KeymapNotify (following a FocusIn), it sets the currently
pressed keys again. To avoid confusion in the OSG-using application
normal keys are always reported released /before/ and pressed
/after/ modifier keys.

As current key states are returned as char[32] keymap by
XQueryKeymap and XKeymapEvent, this format is also used to
recognize modifier keys and for maintaining the current
internal key state. Functions to set/clear/query bits in
such a keymap are added.

The patch was extensively tested with osgkeyboard and
FlightGear under KDE and fvwm2. It was not tested on a
Xinerama setup or with multiple windows, but as _eventDisplay
is used throughout, there should be no problems. The patch also
makes the following changes:

- removes old and obsolete handling of modifier keys in ::adaptKey().
 This wasn't only unused, but also wrong (and for that reason commented
 out in revision 7066). The modifier states are actually handled
 in ./src/osgGA/EventQueue.cpp (EventQueue::keyPress/keyRelease).
- fixes some spelling"
2008-02-25 16:50:28 +00:00
Robert Osfield
3c2872a36a From Emmanuel Roche, "I'm joining two zip files to this mail for the modified sources and include files of osgIntrospection.
The modifications I made are very small but they are absolutely usefull to use osgIntrospection with visual studio 7.1 or 8 in debug modes.
This should also solve other minor common problems (converter memory leak, virtual destructor for PropertyInfo, etc...).

I choosed two function names : Reflection::uninitialize() and Type::reset(), this can of course be changed if someone has a better idea...

I made the changes against OSG 2.2.0 public release. I tested the result with VS 7.1, VS 7.1 SP1, VS 8.0 SP1 and AQTime 5.0 on Windows XP SP2... All 4 seem to agree : they detected memory leaks before and don't anymore.

Sorry I haven't take the time to test that on linux but the changes are so small I doubt there could be a problem... I let you check that on your side  :-).

I hope this will help making OSG an even more wonderfull library."
2008-02-25 16:26:30 +00:00
Robert Osfield
fb1b58b2e2 From Stephan Huber, "I missed a refactoring of the handling of modifier-keys, so they did not
work on OS X. Attached you'll find the missing implementation for OS X."
2008-02-25 16:05:53 +00:00
Robert Osfield
69d58d6f7c From Paul Martz, "This change adds "GL_NORMALIZE" and "GL_RESCALE_NORMAL" to .osg IO in place of the hex equivalents." 2008-02-25 15:09:56 +00:00
Robert Osfield
359f056c73 Updated wrappers 2008-02-25 15:08:45 +00:00
Robert Osfield
75b9a9c809 From Robert Osfield and Carlo Camporesi, took submission from Carlo for adding LoadingExternalReferenceMode to ProxyNode and extended it
to include a wider range of options, also completed implementation
2008-02-25 15:07:35 +00:00
Robert Osfield
49641debcb Changed method parameter to use const & 2008-02-25 14:27:57 +00:00
Robert Osfield
55de8b03d9 From Wojciech Lewandowski, "----1----
Attached is a fixed version of OverlayNode.cpp. I fixed CustomPolytope::cut( osg::Plane ) method.  Bug was apparent in such scenario:
 
Let P1 be some random frustum polytope
Let P2 be the polytope that was created from P1 bounding box (P2 contains P1 entirely)
 
Then ignoring precision errors: P1.cut( P2 ) == P2.cut( P1 ) == P1.  But this condition was not always met. Cut failed when some of the polytope reference points happened to lie exactly on some intersecting planes in both P1 & P2  (plane distance was = 0).
 
I only use CustomPolytope for my shadowing stuff so I did not test how this affects rest of OverlayNode.cpp.
 
----2----
 
Also attached is a minor precision improvement for osg::Plane intersect method (double version). 
 
----3----
 
I have also one observation regarding osg::Plane - There are two intersect vertices methods (float and double flavour):
 
inline int intersect(const std::vector<Vec3>& vertices) const
inline int intersect(const std::vector<Vec3d>& vertices) const
 
I guess osg::Plane won't compile when someone changes default vec3 typedef to vec3d. Shouldn't the first method be changed to use vec3f explicitly ? Ie:
 
inline int intersect(const std::vector<Vec3f>& vertices) const"
2008-02-25 14:15:27 +00:00
Robert Osfield
adbc15b5a1 From Glenn Waldron, "As you may recall, we discussed adding ReaderWriter::readObject() overrides to all the image plugins in order to facilitate future archive support. Attached are the necessary modifications. I tested JPEG, but not all the others... the code is identical though. Note that the DDS plugin already contained the readObject() implementations." 2008-02-25 13:25:42 +00:00
Robert Osfield
d003972a5f From Wojciech Lawandowski, "Fixed EllipsoidModel::computeLocalUpVector to use Vec3d instead of Vec3 for
normal computation. Its really small issue, maybe not even worth submitting
;-). But one never knows when inadequate precision hits him.
"
2008-02-25 13:17:30 +00:00
Robert Osfield
847a384101 Updated wrappers 2008-02-25 13:16:36 +00:00
Robert Osfield
c52fdc0c77 Reverted back to previous version of osgtext 2008-02-25 13:07:37 +00:00
Robert Osfield
e869200b3d Refactored the mutex usage in osgText and freetype plugin to prevent multi-thread crash 2008-02-25 12:54:54 +00:00
Robert Osfield
3333ca2b46 From Mathias Froehlich, "I have extended the X11 pbuffer code to use either the complete set of glx 1.3
pbuffer functions or exactly ask for the extensions we need to call the
apropriate glx extension functions for and around pbuffers extensions.
The glx 1.3 version of this functios are prefered. If this is not pressent we
are looking for the glx extensions and check for them.
Prevously we just used some mix of the glx 1.3 functions or the extension
functions without making sure that this extension is present.
"
2008-02-22 18:38:30 +00:00
Robert Osfield
67f1503c7d Refactored osgTerrain so that the interface for setting up layer is more straight forward, and added support into GeometryTechnique for handling multiple layers 2008-02-22 11:52:23 +00:00
Robert Osfield
6516bf4910 Added TextureUnit entry to osg::TransferFunction and osgTerrain::Layer 2008-02-20 12:34:13 +00:00
Robert Osfield
c1a1f742c3 Removed erroneous ; 2008-02-19 16:02:03 +00:00
Robert Osfield
9c24dc7083 Changed the updating of the contextID so that the DisplaySetting::MaxNumberOfGrapicsContexts()
is updated on each new graphics context creation, in keeping with how osgProducer used to do things.
2008-02-19 12:26:19 +00:00
Robert Osfield
61223fa05f Refactor the rendering code to not use iterators, instead using indices as means of avoiding using < and += on STL iterators that have shown to be problematic under Windows 2008-02-19 11:30:39 +00:00
Robert Osfield
fb2726b0db From Philip Lowman, workaround for gcc 3.2.3 bug 2008-02-19 09:49:12 +00:00
Robert Osfield
8e5c3363ef From Stephan Huber, "Attached you'll find some enhancements by Adrian Egli and me for the
carbon-implementation of GraphicsWindow.  Now you can use an AGLDrawable
in conjunction with osgViewer/osgCompositeViewer."

Changes from Robert Osfield, changed std::cout to osg::notify(osg::INFO)
2008-02-18 15:30:55 +00:00
Robert Osfield
e0e862e31a From Rene Molenaar, "Using commandline build system nmake on windows does not work.
This is caused by the OSG_MSVC_VERSIONED_DLL hack.
there are hard-coded paths to place the dll's in the bin /dir that normally would go
in the lib/config (release/debug) dirs. Nmake has different locations for the files (no config dir).
 
 fix: change the macro's in OsgMacroUtils.cmake for the IF(NOT MSVC_IDE) situation.
 Libs go in lib/, and DLLs and executables go in bin/
 To accopmplish this for MSVC_IDE the targets get a "../../bin" prefix,
 for nmake this should be "../bin" (because there are no config folders).

 This fix mimics the behaviour of the MSCV_IDE (visual studio) build system when building with nmake.
 
 Note:
 A change in the main CMakeLists.txt creates the needed plugin directory in the binary dir.
 
 see included files for the changes:
 r7885fix-v2/CMakeModules/OsgMacroUtils.cmake  
 r7885fix-v2/osgWrappers/CMakeLists.txt
 r7885fix-v2/CMakeLists.txt
 
 
The behaviour of visual studio projects (and other build systems) remain unchanged.  
Tested building and installing with nmake and visual studio 8 debug and release.
 "
2008-02-18 15:26:46 +00:00
Robert Osfield
49ef41b373 From Bob Kuehne, "Subject: obj material parse fix
this fix strips whitespace off externally referenced material files.
fixes a bug where the obj listed something like:

 mtllib  FR_PARIS_ESPACE_UNESCO_S.MTL

and then that caused failures in the load later:

 FindFileInPath() : trying /Users/rpk/Downloads/
FR_PARIS_ESPACE_UNESCO_S.MTL ...

this fix simply strips whitespace around that filename before passing
it on to the remainder of the loader."

Changes from Robert Osfield, change std::cout to osg::notify(osg::INFO)
2008-02-18 15:17:42 +00:00
Robert Osfield
e7e8d48980 From Thibault Genessay, "On Dec 16 you introduced a fix to remove internal use of ref_ptr<>'s.
It contained a bug that would cause freed memory to be written again.
Specifically, in FreeTypeLibrary::~FreeTypeLibrary(), calling
font->setImplementation(0); deletes the content pointed to by the
fontImplementation pointer, while the line the immediately follows
tries to access it.

My fix is to make the second instruction part of an else clause rather
than always executed. This way, the fontImplementation->_facade = 0
instruction is only executed when the font implementation is not set
to 0 before (although I have no idea what it is here for and if this
code path is ever followed, since I don't know the plugin's internals
very well).

Attached is the modified FreeTypeLibrary.cpp file."
2008-02-18 15:10:30 +00:00
Robert Osfield
4cf9b9a947 Updated wrappers 2008-02-18 15:02:01 +00:00
Robert Osfield
a97dc84228 Introduced typedef vec_type and value_type into LineSemgment class to allow easier
switching between double and float versions.
2008-02-18 14:51:05 +00:00
Robert Osfield
8b77cc4dac From Bob Kuehne, build fix for OSX/gcc 4.0.1 2008-02-18 14:14:08 +00:00
Robert Osfield
91e35599dc From Brede Johansen, "Here's a fix to the changes regarding the new dispose() function. The
last primary node inside a push-pop level would not get the dispose()
call.  This would result in information from some ancillary records,
like the matrix (transform), being lost.

Changes are made to the latest version in the repository.

Thanks to Terry for the help to find and fix the bug and test the changes."
2008-02-18 13:52:26 +00:00
Robert Osfield
046481ee6e From Bryan Thrall, "moved the prints to a higher notify level
(DEBUG_FP) so they are only printed at the most verbose level."
2008-02-18 13:47:38 +00:00
Robert Osfield
a87c98857c From Paul Martz, "Attached is a modification to OcclusionQueryNode. The copy constructor was failing to initialize all member variables. This change resolves the issue. Thanks to Doug McCorkle for testing and finding the bug." 2008-02-18 13:44:30 +00:00
Robert Osfield
45c6bbb577 Changed constructors to take const pointers 2008-02-15 14:09:44 +00:00
Robert Osfield
3e77fec6c9 Update AUTHORS list for release 2008-01-29 22:14:26 +00:00
Robert Osfield
f945a54203 Updated logs for release 2008-01-29 21:34:38 +00:00
Robert Osfield
cb47e92c26 Updated wrappers 2008-01-29 20:45:51 +00:00
Robert Osfield
ae8713acde Reorganized the static vector used for buffering extensions to prevent an crash on exit. 2008-01-29 12:24:47 +00:00
Robert Osfield
c620786420 Updated versions for OSG-2.3.4 release 2008-01-29 10:28:56 +00:00
Robert Osfield
f0087e821e From Mike Weiblen, "1) best practices suggest that values passed by-reference should be
initialized.
2) explanatory comments are handy when available as notify() messages."
2008-01-28 20:54:14 +00:00
Robert Osfield
e0e98d3426 From Mike Weiblen, "an aesthetic enhancement for displaying important version information." 2008-01-28 20:52:31 +00:00
Robert Osfield
6e0bbbbc6a From Roger James, "A small fix for compiling with OSG_USE_FLOAT_MATRIX" 2008-01-28 20:31:48 +00:00
Robert Osfield
5b9a04997d From Rainer Oder, removed duplicate conditional 2008-01-28 20:27:33 +00:00
Robert Osfield
704a1ac52a Fixed BUILD_REF_DOCS_SEARCHENGINE conditional 2008-01-28 19:54:27 +00:00
Robert Osfield
051259760a Added explict casts to double to prevent VS compiler error 2008-01-28 19:42:16 +00:00
Robert Osfield
1203cb71a7 From Jean-Christophe Lombardo and Robert Osfield, added
BUILD_REF_DOCS_SEARCHENGINE and BUILD_REF_DOCS_TAGFILE options for being
doxygen docs.
2008-01-28 18:29:38 +00:00