Show
Ignore:
Timestamp:
11/11/10 12:47:24 (3 years ago)
Author:
robert
Message:

From Wang Rui, "I've finally completed the static build support for dotosg wrapper and
serialization libraries. My submission mainly includes:
1. Add two new macros USE_DOTOSGWRAPPER_LIBRARY and
USE_SERIALIZER_WRAPPER_LIBRARY. Applications using static OSG must
include corresponding static-link libraries and use these two macros
to predefine native format wrappers. Please see osgstaticviewer and
present3D in the attachment for details.

2. Add a LibraryWrapper?.cpp file in each
osgWrappers/deprecated-dotosg/... and osgWrappers/serializers/...
subfolder, which calls all USE_...WRAPPERS macros inside. The
LibraryWrapper? file is automatically generated by the
wrapper_includer.cpp (with some slight fixes), which is also attached
for your reference. The deprecated-dotosg/osgAnimation is not included
because it doesn't us REGISTER_DOTOSGWRAPPER to define its wrappers.

3. Modify the ReaderWriterOSG.cpp to prevent calling loadWrappers()
when static build.

4. An uncorrelated fix to Serializer and ObjectWrapper?.cpp, which
ensures version variables of serialziers are initialized, and
serializers out-of-version are not written to model files.
"

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/examples/osgstaticviewer/osgstaticviewer.cpp

    r10282 r11912  
    3939// include the plugins we need 
    4040USE_OSGPLUGIN(ive) 
    41 USE_OSGPLUGIN(freetype) 
    4241USE_OSGPLUGIN(osg) 
     42USE_OSGPLUGIN(osg2) 
    4343USE_OSGPLUGIN(rgb) 
    4444USE_OSGPLUGIN(OpenFlight) 
     45 
     46#ifdef USE_FREETYPE 
     47    USE_OSGPLUGIN(freetype) 
     48#endif 
     49 
     50USE_DOTOSGWRAPPER_LIBRARY(osg) 
     51USE_DOTOSGWRAPPER_LIBRARY(osgFX) 
     52USE_DOTOSGWRAPPER_LIBRARY(osgParticle) 
     53USE_DOTOSGWRAPPER_LIBRARY(osgShadow) 
     54USE_DOTOSGWRAPPER_LIBRARY(osgSim) 
     55USE_DOTOSGWRAPPER_LIBRARY(osgTerrain) 
     56USE_DOTOSGWRAPPER_LIBRARY(osgText) 
     57USE_DOTOSGWRAPPER_LIBRARY(osgViewer) 
     58USE_DOTOSGWRAPPER_LIBRARY(osgVolume) 
     59USE_DOTOSGWRAPPER_LIBRARY(osgWidget) 
     60 
     61USE_SERIALIZER_WRAPPER_LIBRARY(osg) 
     62USE_SERIALIZER_WRAPPER_LIBRARY(osgAnimation) 
     63USE_SERIALIZER_WRAPPER_LIBRARY(osgFX) 
     64USE_SERIALIZER_WRAPPER_LIBRARY(osgManipulator) 
     65USE_SERIALIZER_WRAPPER_LIBRARY(osgParticle) 
     66USE_SERIALIZER_WRAPPER_LIBRARY(osgShadow) 
     67USE_SERIALIZER_WRAPPER_LIBRARY(osgSim) 
     68USE_SERIALIZER_WRAPPER_LIBRARY(osgTerrain) 
     69USE_SERIALIZER_WRAPPER_LIBRARY(osgText) 
     70USE_SERIALIZER_WRAPPER_LIBRARY(osgVolume) 
    4571 
    4672// include the platform specific GraphicsWindow implementation.