OpenWalnut  1.4.0
WStaticOSGSetup.cpp
00001 //---------------------------------------------------------------------------
00002 //
00003 // Project: OpenWalnut ( http://www.openwalnut.org )
00004 //
00005 // Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
00006 // For more information see http://www.openwalnut.org/copying
00007 //
00008 // This file is part of OpenWalnut.
00009 //
00010 // OpenWalnut is free software: you can redistribute it and/or modify
00011 // it under the terms of the GNU Lesser General Public License as published by
00012 // the Free Software Foundation, either version 3 of the License, or
00013 // (at your option) any later version.
00014 //
00015 // OpenWalnut is distributed in the hope that it will be useful,
00016 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 // GNU Lesser General Public License for more details.
00019 //
00020 // You should have received a copy of the GNU Lesser General Public License
00021 // along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
00022 //
00023 //---------------------------------------------------------------------------
00024 
00025 ///////////////////////////////////////////////////////////////////////////////
00026 // Static OSG Setup
00027 //
00028 // When linking OpenSceneGraph statically, we are required to register the
00029 // osgDB plugins and serializers manually. Please add all plugins and
00030 // serializers you will need here.
00031 //
00032 // NOTE: If you add plugins, be careful to also add the dependent OSG libs in
00033 //       out CMake files (osgFX and similar)
00034 ///////////////////////////////////////////////////////////////////////////////
00035 
00036 #ifdef OSG_LIBRARY_STATIC
00037 
00038 // NOTE: This code was originally taken from OSG's Android example.
00039 
00040 //osg
00041 #include <osg/GL>
00042 #include <osg/GLExtensions>
00043 #include <osg/Depth>
00044 #include <osg/Program>
00045 #include <osg/Shader>
00046 #include <osg/Node>
00047 #include <osg/Group>
00048 #include <osg/Notify>
00049 //osgText
00050 #include <osgText/Text>
00051 //osgDB
00052 #include <osgDB/DatabasePager>
00053 #include <osgDB/Registry>
00054 #include <osgDB/ReadFile>
00055 #include <osgDB/WriteFile>
00056 //osg_viewer
00057 #include <osgViewer/Viewer>
00058 #include <osg/ShapeDrawable>
00059 #include <osgViewer/Renderer>
00060 #include <osgViewer/ViewerEventHandlers>
00061 //osgGA
00062 #include <osgGA/GUIEventAdapter>
00063 #include <osgGA/MultiTouchTrackballManipulator>
00064 #include <osgGA/TrackballManipulator>
00065 #include <osgGA/FlightManipulator>
00066 #include <osgGA/DriveManipulator>
00067 #include <osgGA/KeySwitchMatrixManipulator>
00068 #include <osgGA/StateSetManipulator>
00069 #include <osgGA/AnimationPathManipulator>
00070 #include <osgGA/TerrainManipulator>
00071 #include <osgGA/SphericalManipulator>
00072 
00073 #include "WStaticOSGSetup.h"
00074 
00075 //Static plugins Macro
00076 // USE_OSGPLUGIN( ive );
00077 // USE_OSGPLUGIN( osg );
00078 // USE_OSGPLUGIN( osg2 );
00079 // USE_OSGPLUGIN( terrain );
00080 // USE_OSGPLUGIN( rgb );
00081 // USE_OSGPLUGIN( OpenFlight );
00082 // USE_OSGPLUGIN( dds );
00083 
00084 //Static DOTOSG
00085 USE_DOTOSGWRAPPER_LIBRARY( osg );
00086 // USE_DOTOSGWRAPPER_LIBRARY( osgFX );
00087 // USE_DOTOSGWRAPPER_LIBRARY( osgParticle );
00088 // USE_DOTOSGWRAPPER_LIBRARY( osgTerrain );
00089 // USE_DOTOSGWRAPPER_LIBRARY( osgText );
00090 // USE_DOTOSGWRAPPER_LIBRARY( osgVolume );
00091 // NOTE: although we need the osgViewer, uncommenting the below line causes an segfault (at least on Android).
00092 // USE_DOTOSGWRAPPER_LIBRARY( osgViewer );
00093 
00094 //Static serializer
00095 USE_SERIALIZER_WRAPPER_LIBRARY( osg );
00096 // USE_SERIALIZER_WRAPPER_LIBRARY( osgAnimation );
00097 // USE_SERIALIZER_WRAPPER_LIBRARY( osgFX );
00098 // USE_SERIALIZER_WRAPPER_LIBRARY( osgManipulator );
00099 // USE_SERIALIZER_WRAPPER_LIBRARY( osgParticle );
00100 // USE_SERIALIZER_WRAPPER_LIBRARY( osgTerrain );
00101 USE_SERIALIZER_WRAPPER_LIBRARY( osgText );
00102 // USE_SERIALIZER_WRAPPER_LIBRARY( osgVolume );
00103 
00104 #endif // OSG_LIBRARY_STATIC