changed extensions from .c to .cpp and got compiling as C files as part of the osg core library.
Updated and cleaned up the rest of the OSG to use the new internal GLU.
change was to use doubles for reading and writing matrices regardless of type of Matrix
being serialized.
Change does break backwards compatibility though, so code
path supporting original format has been left in for the
time being. However, this code is not reliable enough and
is over complicated compared to the simplified handling. Once
the new code has been bedded down for a while I'll remove this code block.
a discrepancy in getOrCreateObserverSet. For the atomic- and
mutex-codepaths the newly created observerset gets manually ref'ed, but
not in the codepath used when OPENTHREADS_ATOMIC_USE_MUTEX is defined. I
added the manual ref and tadaaa, the crash went away."
I also uderstand that there is a need to select system wide default method and have also modified DisplaySettings to contain swapMethod parameter. Swap method in Traits uses value set in DisplaySettings as default. Proper environment and command line args were added. Its possible to define default DeisplaySettings swap method in standard way via system flags or with comand line.
Env Vars:
OSG_SWAP_METHOD = DEFAULT | COPY | EXCHANGE
or Command Line:
--swap-method DEFAULT | COPY | EXCHANGE
I also added handling of WM_ERASEBKGND in GraphicsWindowWin32. It may be unneccessary but code should be safer this way than without handling it. I have placed a comment explaining the reason above the change.
Changes were made against today trunk.
PS. I tested only Windows code. I briefly checked X11 & Cocoa files but have not noticed SwapMethod to be used there.
"
compatability regression that was introduced almost 2 years ago in
r8834. The IVE version number was bumped to 32 because of the change
in binary layout, but the guard for reading/writing the new field was
checked against 31. Of course this only causes a problem (as for us)
when you've produced IVE files at version 31, which no longer load (or
crash) when loaded by newer OSG/IVE versions."
I also fixed a possible bug in osgDB::XmlParser that doesn't handle control characters (like " to ") when reading node attributes, because the writeWrappedString() and readWrappedString() now depend heavily on control characters. An additional improvement is that osgx now supports comments."
/Users/uli/Projects/osg/OpenSceneGraph/src/osgPlugins/3ds/WriterNodeVisitor.cpp: In
function ?std::string getFileName(const std::string&)?:
/Users/uli/Projects/osg/OpenSceneGraph/src/osgPlugins/3ds/WriterNodeVisitor.cpp:88:
warning: comparison is always false due to limited range of data type
/Users/uli/Projects/osg/OpenSceneGraph/src/osgPlugins/3ds/WriterNodeVisitor.cpp: In
function ?bool is83(const std::string&)?:
/Users/uli/Projects/osg/OpenSceneGraph/src/osgPlugins/3ds/WriterNodeVisitor.cpp:102:
warning: comparison is always false due to limited range of data type
/Users/uli/Projects/osg/OpenSceneGraph/src/osgPlugins/3ds/WriterNodeVisitor.cpp: In
function ?bool is3DSpath(const std::string&, bool)?:
/Users/uli/Projects/osg/OpenSceneGraph/src/osgPlugins/3ds/WriterNodeVisitor.cpp:118:
warning: comparison is always false due to limited range of data type
/Users/uli/Projects/osg/OpenSceneGraph/src/osgPlugins/3ds/WriterNodeVisitor.cpp:121:
warning: comparison is always true due to limited range of data type
The code was using 'unsigned int' in places where it should've used 'size_t' for correct
comparison with 'std::string::npos' (which is size_t).
"