OpenWalnut  1.5.0dev
WStaticOSGSetup.cpp
1 //---------------------------------------------------------------------------
2 //
3 // Project: OpenWalnut ( http://www.openwalnut.org )
4 //
5 // Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
6 // For more information see http://www.openwalnut.org/copying
7 //
8 // This file is part of OpenWalnut.
9 //
10 // OpenWalnut is free software: you can redistribute it and/or modify
11 // it under the terms of the GNU Lesser General Public License as published by
12 // the Free Software Foundation, either version 3 of the License, or
13 // (at your option) any later version.
14 //
15 // OpenWalnut is distributed in the hope that it will be useful,
16 // but WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 // GNU Lesser General Public License for more details.
19 //
20 // You should have received a copy of the GNU Lesser General Public License
21 // along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
22 //
23 //---------------------------------------------------------------------------
24 
25 ///////////////////////////////////////////////////////////////////////////////
26 // Static OSG Setup
27 //
28 // When linking OpenSceneGraph statically, we are required to register the
29 // osgDB plugins and serializers manually. Please add all plugins and
30 // serializers you will need here.
31 //
32 // NOTE: If you add plugins, be careful to also add the dependent OSG libs in
33 // out CMake files (osgFX and similar)
34 ///////////////////////////////////////////////////////////////////////////////
35 
36 #ifdef OSG_LIBRARY_STATIC
37 
38 // NOTE: This code was originally taken from OSG's Android example.
39 
40 //osg
41 #include <osg/GL>
42 #include <osg/GLExtensions>
43 #include <osg/Depth>
44 #include <osg/Program>
45 #include <osg/Shader>
46 #include <osg/Node>
47 #include <osg/Group>
48 #include <osg/Notify>
49 //osgText
50 #include <osgText/Text>
51 //osgDB
52 #include <osgDB/DatabasePager>
53 #include <osgDB/Registry>
54 #include <osgDB/ReadFile>
55 #include <osgDB/WriteFile>
56 //osg_viewer
57 #include <osgViewer/Viewer>
58 #include <osg/ShapeDrawable>
59 #include <osgViewer/Renderer>
60 #include <osgViewer/ViewerEventHandlers>
61 //osgGA
62 #include <osgGA/GUIEventAdapter>
63 #include <osgGA/MultiTouchTrackballManipulator>
64 #include <osgGA/TrackballManipulator>
65 #include <osgGA/FlightManipulator>
66 #include <osgGA/DriveManipulator>
67 #include <osgGA/KeySwitchMatrixManipulator>
68 #include <osgGA/StateSetManipulator>
69 #include <osgGA/AnimationPathManipulator>
70 #include <osgGA/TerrainManipulator>
71 #include <osgGA/SphericalManipulator>
72 
73 #include "WStaticOSGSetup.h"
74 
75 //Static plugins Macro
76 // USE_OSGPLUGIN( ive );
77 // USE_OSGPLUGIN( osg );
78 // USE_OSGPLUGIN( osg2 );
79 // USE_OSGPLUGIN( terrain );
80 // USE_OSGPLUGIN( rgb );
81 // USE_OSGPLUGIN( OpenFlight );
82 // USE_OSGPLUGIN( dds );
83 
84 //Static DOTOSG
85 USE_DOTOSGWRAPPER_LIBRARY( osg );
86 // USE_DOTOSGWRAPPER_LIBRARY( osgFX );
87 // USE_DOTOSGWRAPPER_LIBRARY( osgParticle );
88 // USE_DOTOSGWRAPPER_LIBRARY( osgTerrain );
89 // USE_DOTOSGWRAPPER_LIBRARY( osgText );
90 // USE_DOTOSGWRAPPER_LIBRARY( osgVolume );
91 // NOTE: although we need the osgViewer, uncommenting the below line causes an segfault (at least on Android).
92 // USE_DOTOSGWRAPPER_LIBRARY( osgViewer );
93 
94 //Static serializer
95 USE_SERIALIZER_WRAPPER_LIBRARY( osg );
96 // USE_SERIALIZER_WRAPPER_LIBRARY( osgAnimation );
97 // USE_SERIALIZER_WRAPPER_LIBRARY( osgFX );
98 // USE_SERIALIZER_WRAPPER_LIBRARY( osgManipulator );
99 // USE_SERIALIZER_WRAPPER_LIBRARY( osgParticle );
100 // USE_SERIALIZER_WRAPPER_LIBRARY( osgTerrain );
101 USE_SERIALIZER_WRAPPER_LIBRARY( osgText );
102 // USE_SERIALIZER_WRAPPER_LIBRARY( osgVolume );
103 
104 #endif // OSG_LIBRARY_STATIC