/usr/include/OGRE/OgreStaticPluginLoader.h is in libogre-dev 1.7.4-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 | /*
-----------------------------------------------------------------------------
This source file is part of OGRE
(Object-oriented Graphics Rendering Engine)
For the latest info, see http://www.ogre3d.org/
Copyright (c) 2000-2011 Torus Knot Software Ltd
Also see acknowledgements in Readme.html
You may use this sample code for anything you like, it is not covered by the
same license as the rest of the engine.
-----------------------------------------------------------------------------
*/
/*
-----------------------------------------------------------------------------
Filename: StaticPluginLoader.h
Description: Utility class to load plugins statically
-----------------------------------------------------------------------------
*/
#ifndef __StaticPluginLoader_H__
#define __StaticPluginLoader_H__
#include "Ogre.h"
#include "OgreConfigFile.h"
// Static plugin headers
#ifdef OGRE_STATIC_CgProgramManager
# include "OgreCgPlugin.h"
#endif
#ifdef OGRE_STATIC_OctreeSceneManager
# include "OgreOctreePlugin.h"
#endif
#ifdef OGRE_STATIC_ParticleFX
# include "OgreParticleFXPlugin.h"
#endif
#ifdef OGRE_STATIC_BSPSceneManager
# include "OgreBspSceneManagerPlugin.h"
#endif
#ifdef OGRE_STATIC_GL
# include "OgreGLPlugin.h"
#endif
#ifdef OGRE_STATIC_GLES
# include "OgreGLESPlugin.h"
#endif
#ifdef OGRE_STATIC_Direct3D9
# include "OgreD3D9Plugin.h"
#endif
#ifdef OGRE_STATIC_Direct3D10
# include "OgreD3D10Plugin.h"
#endif
#ifdef OGRE_STATIC_Direct3D11
# include "OgreD3D11Plugin.h"
#endif
#ifdef OGRE_STATIC_PCZSceneManager
# include "OgrePCZPlugin.h"
#endif
#ifdef OGRE_STATIC_OctreeZone
# include "OgreOctreeZonePlugin.h"
#endif
namespace Ogre
{
/** Utility class for loading some plugins statically.
@remarks
When loading plugins statically, you are limited to loading plugins
that are known about at compile time. You should define preprocessor
symbols depending on which plugins you want to load - the symbol being
OGRE_STATIC_<pluginname>, with pluginname being the usual name of the
plugin DLL (no file extension, no debug suffix, and without the Plugin_
or RenderSystem_ prefix.)
*/
class StaticPluginLoader
{
protected:
#ifdef OGRE_STATIC_CgProgramManager
CgPlugin* mCgPlugin;
#endif
#ifdef OGRE_STATIC_OctreeSceneManager
OctreePlugin* mOctreePlugin;
#endif
#ifdef OGRE_STATIC_ParticleFX
ParticleFXPlugin* mParticleFXPlugin;
#endif
#ifdef OGRE_STATIC_BSPSceneManager
BspSceneManagerPlugin* mBSPPlugin;
#endif
#ifdef OGRE_STATIC_PCZSceneManager
PCZPlugin* mPCZPlugin;
#endif
#ifdef OGRE_STATIC_OctreeZone
OctreeZonePlugin* mOctreeZonePlugin;
#endif
#ifdef OGRE_STATIC_GL
GLPlugin* mGLPlugin;
#endif
#ifdef OGRE_STATIC_GLES
GLESPlugin* mGLESPlugin;
#endif
#ifdef OGRE_STATIC_Direct3D9
D3D9Plugin* mD3D9Plugin;
#endif
#ifdef OGRE_STATIC_Direct3D10
D3D10Plugin* mD3D10Plugin;
#endif
#ifdef OGRE_STATIC_Direct3D11
D3D11Plugin* mD3D11Plugin;
#endif
public:
StaticPluginLoader() {}
/** Load all the enabled plugins against the passed in root object. */
void load()
{
Root& root = Root::getSingleton();
#ifdef OGRE_STATIC_GL
mGLPlugin = OGRE_NEW GLPlugin();
root.installPlugin(mGLPlugin);
#endif
#ifdef OGRE_STATIC_GLES
mGLESPlugin = OGRE_NEW GLESPlugin();
root.installPlugin(mGLESPlugin);
#endif
#ifdef OGRE_STATIC_Direct3D9
mD3D9Plugin = OGRE_NEW D3D9Plugin();
root.installPlugin(mD3D9Plugin);
#endif
#ifdef OGRE_STATIC_Direct3D10
mD3D10Plugin = OGRE_NEW D3D10Plugin();
root.installPlugin(mD3D10Plugin);
#endif
#ifdef OGRE_STATIC_Direct3D11
mD3D11Plugin = OGRE_NEW D3D11Plugin();
root.installPlugin(mD3D11Plugin);
#endif
#ifdef OGRE_STATIC_CgProgramManager
mCgPlugin = OGRE_NEW CgPlugin();
root.installPlugin(mCgPlugin);
#endif
#ifdef OGRE_STATIC_OctreeSceneManager
mOctreePlugin = OGRE_NEW OctreePlugin();
root.installPlugin(mOctreePlugin);
#endif
#ifdef OGRE_STATIC_ParticleFX
mParticleFXPlugin = OGRE_NEW ParticleFXPlugin();
root.installPlugin(mParticleFXPlugin);
#endif
#ifdef OGRE_STATIC_BSPSceneManager
mBSPPlugin = OGRE_NEW BspSceneManagerPlugin();
root.installPlugin(mBSPPlugin);
#endif
#ifdef OGRE_STATIC_PCZSceneManager
mPCZPlugin = OGRE_NEW PCZPlugin();
root.installPlugin(mPCZPlugin);
#endif
#ifdef OGRE_STATIC_OctreeZone
mOctreeZonePlugin = OGRE_NEW OctreeZonePlugin();
root.installPlugin(mOctreeZonePlugin);
#endif
}
void unload()
{
// don't unload plugins, since Root will have done that. Destroy here.
#ifdef OGRE_STATIC_OctreeZone
OGRE_DELETE mOctreeZonePlugin;
#endif
#ifdef OGRE_STATIC_PCZSceneManager
OGRE_DELETE mPCZPlugin;
#endif
#ifdef OGRE_STATIC_BSPSceneManager
OGRE_DELETE mBSPPlugin;
#endif
#ifdef OGRE_STATIC_ParticleFX
OGRE_DELETE mParticleFXPlugin;
#endif
#ifdef OGRE_STATIC_OctreeSceneManager
OGRE_DELETE mOctreePlugin;
#endif
#ifdef OGRE_STATIC_CgProgramManager
OGRE_DELETE mCgPlugin;
#endif
#ifdef OGRE_STATIC_Direct3D9
OGRE_DELETE mD3D9Plugin;
#endif
#ifdef OGRE_STATIC_Direct3D10
OGRE_DELETE mD3D10Plugin;
#endif
#ifdef OGRE_STATIC_Direct3D11
OGRE_DELETE mD3D11Plugin;
#endif
#ifdef OGRE_STATIC_GL
OGRE_DELETE mGLPlugin;
#endif
#ifdef OGRE_STATIC_GLES
OGRE_DELETE mGLESPlugin;
#endif
}
};
}
#endif
|