FlightGear next
PluginLoader.cxx
Go to the documentation of this file.
1/*
2 * SPDX-FileComment: Load plugins from statically-linked OSG and SimGear.
3 * SPDX-FileCopyrightText: Copyright (C) 2024 Fernando García Liñán
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7#include <osgDB/Registry>
8
9// Static linking of OSG needs special macros to force plugins to be included
10#ifdef OSG_LIBRARY_STATIC
11USE_GRAPHICSWINDOW();
12// Image formats
13USE_OSGPLUGIN(dds);
14USE_OSGPLUGIN(rgb);
15USE_OSGPLUGIN(tga);
16#ifdef OSG_JPEG_ENABLED
17USE_OSGPLUGIN(jpeg);
18#endif
19#ifdef OSG_PNG_ENABLED
20USE_OSGPLUGIN(png);
21#endif
22#ifdef OSG_TIFF_ENABLED
23USE_OSGPLUGIN(tiff);
24#endif
25// Model formats
26USE_OSGPLUGIN(ive);
27USE_OSGPLUGIN(osg);
28#endif
29
30// Do the same thing with SimGear. A corresponding REGISTER_OSGPLUGIN() must be
31// placed on each ReaderWriter.
32//
33// This is only needed if SimGear is statically linked, but since this is the
34// case 99% of the time, just do it (it won't harm the shared case).
35
36// Model formats
37USE_OSGPLUGIN(gltf)
38USE_OSGPLUGIN(ac)
39// Scenery formats
40USE_OSGPLUGIN(btg)
41USE_OSGPLUGIN(stg)
42USE_OSGPLUGIN(spt)
Definition AIBase.hxx:25