[1812] | 1 | /*-------------------------------------------------------------------------
|
---|
| 2 | This source file is a part of OGRE
|
---|
| 3 | (Object-oriented Graphics Rendering Engine)
|
---|
| 4 |
|
---|
| 5 | For the latest info, see http://www.ogre3d.org/
|
---|
| 6 |
|
---|
| 7 | Copyright (c) 2000-2005 The OGRE Team
|
---|
| 8 | Also see acknowledgements in Readme.html
|
---|
| 9 |
|
---|
| 10 | This library is free software; you can redistribute it and/or modify it
|
---|
| 11 | under the terms of the GNU Lesser General Public License (LGPL) as
|
---|
| 12 | published by the Free Software Foundation; either version 2.1 of the
|
---|
| 13 | License, or (at your option) any later version.
|
---|
| 14 |
|
---|
| 15 | This library is distributed in the hope that it will be useful, but
|
---|
| 16 | WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
---|
| 17 | or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
---|
| 18 | License for more details.
|
---|
| 19 |
|
---|
| 20 | You should have received a copy of the GNU Lesser General Public License
|
---|
| 21 | along with this library; if not, write to the Free Software Foundation,
|
---|
| 22 | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or go to
|
---|
| 23 | http://www.gnu.org/copyleft/lesser.txt
|
---|
| 24 | -------------------------------------------------------------------------*/
|
---|
| 25 | #ifndef __Prerequisites_H__
|
---|
| 26 | #define __Prerequisites_H__
|
---|
| 27 |
|
---|
| 28 | // undefine this to not require new angular units where applicable
|
---|
| 29 | #define OGRE_FORCE_ANGLE_TYPES
|
---|
| 30 |
|
---|
| 31 | // Platform-specific stuff
|
---|
| 32 | #include "OgrePlatform.h"
|
---|
| 33 |
|
---|
| 34 | #if OGRE_COMPILER == OGRE_COMPILER_MSVC
|
---|
| 35 | // Turn off warnings generated by long std templates
|
---|
| 36 | // This warns about truncation to 255 characters in debug/browse info
|
---|
| 37 | # pragma warning (disable : 4786)
|
---|
| 38 |
|
---|
| 39 | // Turn off warnings generated by long std templates
|
---|
| 40 | // This warns about truncation to 255 characters in debug/browse info
|
---|
| 41 | # pragma warning (disable : 4503)
|
---|
| 42 |
|
---|
| 43 | // disable: "conversion from 'double' to 'float', possible loss of data
|
---|
| 44 | # pragma warning (disable : 4244)
|
---|
| 45 |
|
---|
| 46 | // disable: "truncation from 'double' to 'float'
|
---|
| 47 | # pragma warning (disable : 4305)
|
---|
| 48 |
|
---|
| 49 | // disable: "<type> needs to have dll-interface to be used by clients'
|
---|
| 50 | // Happens on STL member variables which are not public therefore is ok
|
---|
| 51 | # pragma warning (disable : 4251)
|
---|
| 52 |
|
---|
| 53 | // disable: "non dll-interface class used as base for dll-interface class"
|
---|
| 54 | // Happens when deriving from Singleton because bug in compiler ignores
|
---|
| 55 | // template export
|
---|
| 56 | # pragma warning (disable : 4275)
|
---|
| 57 |
|
---|
| 58 | // disable: "C++ Exception Specification ignored"
|
---|
| 59 | // This is because MSVC 6 did not implement all the C++ exception
|
---|
| 60 | // specifications in the ANSI C++ draft.
|
---|
| 61 | # pragma warning( disable : 4290 )
|
---|
| 62 |
|
---|
| 63 | // disable: "no suitable definition provided for explicit template
|
---|
| 64 | // instantiation request" Occurs in VC7 for no justifiable reason on all
|
---|
| 65 | // #includes of Singleton
|
---|
| 66 | # pragma warning( disable: 4661)
|
---|
| 67 |
|
---|
| 68 | // disable: deprecation warnings when using CRT calls in VC8
|
---|
| 69 | // These show up on all C runtime lib code in VC8, disable since they clutter
|
---|
| 70 | // the warnings with things we may not be able to do anything about (e.g.
|
---|
| 71 | // generated code from nvparse etc). I doubt very much that these calls
|
---|
| 72 | // will ever be actually removed from VC anyway, it would break too much code.
|
---|
| 73 | # pragma warning( disable: 4996)
|
---|
| 74 | #endif
|
---|
| 75 |
|
---|
| 76 | /* Include all the standard header *after* all the configuration
|
---|
| 77 | settings have been made.
|
---|
| 78 | */
|
---|
| 79 | #include "OgreStdHeaders.h"
|
---|
| 80 |
|
---|
| 81 |
|
---|
| 82 | #include "OgreMemoryManager.h"
|
---|
| 83 |
|
---|
| 84 | namespace Ogre {
|
---|
| 85 | // Define ogre version
|
---|
| 86 | #define OGRE_VERSION_MAJOR 1
|
---|
| 87 | #define OGRE_VERSION_MINOR 2
|
---|
| 88 | #define OGRE_VERSION_PATCH 4
|
---|
| 89 | #define OGRE_VERSION_NAME "Dagon"
|
---|
| 90 |
|
---|
| 91 | #define OGRE_VERSION ((OGRE_VERSION_MAJOR << 16) | (OGRE_VERSION_MINOR << 8) | OGRE_VERSION_PATCH)
|
---|
| 92 |
|
---|
| 93 | // define the real number values to be used
|
---|
| 94 | // default to use 'float' unless precompiler option set
|
---|
| 95 | #if OGRE_DOUBLE_PRECISION == 1
|
---|
| 96 | /** Software floating point type.
|
---|
| 97 | @note Not valid as a pointer to GPU buffers / parameters
|
---|
| 98 | */
|
---|
| 99 | typedef double Real;
|
---|
| 100 | #else
|
---|
| 101 | /** Software floating point type.
|
---|
| 102 | @note Not valid as a pointer to GPU buffers / parameters
|
---|
| 103 | */
|
---|
| 104 | typedef float Real;
|
---|
| 105 | #endif
|
---|
| 106 |
|
---|
| 107 | // define the Char type as either char or wchar_t
|
---|
| 108 | #if OGRE_WCHAR_T_STRINGS == 1
|
---|
| 109 | # define OgreChar wchar_t
|
---|
| 110 | # define _TO_CHAR( x ) L##x
|
---|
| 111 | #else
|
---|
| 112 | # define OgreChar char
|
---|
| 113 | # define _TO_CHAR( x ) x
|
---|
| 114 | #endif
|
---|
| 115 |
|
---|
| 116 | #if OGRE_COMPILER == OGRE_COMPILER_GNUC && OGRE_COMP_VER >= 310 && !defined(STLPORT)
|
---|
| 117 | # define HashMap ::__gnu_cxx::hash_map
|
---|
| 118 | #else
|
---|
| 119 | # if OGRE_COMPILER == OGRE_COMPILER_MSVC
|
---|
| 120 | # if OGRE_COMP_VER > 1300 && !defined(_STLP_MSVC)
|
---|
| 121 | # define HashMap ::stdext::hash_map
|
---|
| 122 | # else
|
---|
| 123 | # define HashMap ::std::hash_map
|
---|
| 124 | # endif
|
---|
| 125 | # else
|
---|
| 126 | # define HashMap ::std::hash_map
|
---|
| 127 | # endif
|
---|
| 128 | #endif
|
---|
| 129 |
|
---|
| 130 | /** In order to avoid finger-aches :)
|
---|
| 131 | */
|
---|
| 132 | typedef unsigned char uchar;
|
---|
| 133 | typedef unsigned short ushort;
|
---|
| 134 | typedef unsigned int uint;
|
---|
| 135 | typedef unsigned long ulong;
|
---|
| 136 |
|
---|
| 137 | /// Useful macros
|
---|
| 138 | #define OGRE_DELETE(p) { if(p) { delete (p); (p)=NULL; } }
|
---|
| 139 | #define OGRE_DELETE_ARRAY(p) { if(p) { delete[] (p); (p)=NULL; } }
|
---|
| 140 |
|
---|
| 141 | #if OGRE_WCHAR_T_STRINGS
|
---|
| 142 | typedef std::wstring _StringBase;
|
---|
| 143 | #else
|
---|
| 144 | typedef std::string _StringBase;
|
---|
| 145 | #endif
|
---|
| 146 |
|
---|
| 147 | typedef _StringBase String;
|
---|
| 148 |
|
---|
| 149 | // Useful threading defines
|
---|
| 150 | #define OGRE_AUTO_MUTEX_NAME mutex
|
---|
| 151 | #if OGRE_THREAD_SUPPORT
|
---|
| 152 | #define OGRE_AUTO_MUTEX mutable boost::recursive_mutex OGRE_AUTO_MUTEX_NAME;
|
---|
| 153 | #define OGRE_LOCK_AUTO_MUTEX boost::recursive_mutex::scoped_lock ogreAutoMutexLock(OGRE_AUTO_MUTEX_NAME);
|
---|
| 154 | #define OGRE_MUTEX(name) mutable boost::recursive_mutex name;
|
---|
| 155 | #define OGRE_LOCK_MUTEX(name) boost::recursive_mutex::scoped_lock ogrenameLock(name);
|
---|
| 156 | // like OGRE_AUTO_MUTEX but mutex held by pointer
|
---|
| 157 | #define OGRE_AUTO_SHARED_MUTEX mutable boost::recursive_mutex *OGRE_AUTO_MUTEX_NAME;
|
---|
| 158 | #define OGRE_LOCK_AUTO_SHARED_MUTEX assert(OGRE_AUTO_MUTEX_NAME); boost::recursive_mutex::scoped_lock ogreAutoMutexLock(*OGRE_AUTO_MUTEX_NAME);
|
---|
| 159 | #define OGRE_NEW_AUTO_SHARED_MUTEX assert(!OGRE_AUTO_MUTEX_NAME); OGRE_AUTO_MUTEX_NAME = new boost::recursive_mutex();
|
---|
| 160 | #define OGRE_DELETE_AUTO_SHARED_MUTEX assert(OGRE_AUTO_MUTEX_NAME); delete OGRE_AUTO_MUTEX_NAME;
|
---|
| 161 | #define OGRE_COPY_AUTO_SHARED_MUTEX(from) assert(!OGRE_AUTO_MUTEX_NAME); OGRE_AUTO_MUTEX_NAME = from;
|
---|
| 162 | #define OGRE_SET_AUTO_SHARED_MUTEX_NULL OGRE_AUTO_MUTEX_NAME = 0;
|
---|
| 163 | #define OGRE_MUTEX_CONDITIONAL(mutex) if (mutex)
|
---|
| 164 |
|
---|
| 165 | #else
|
---|
| 166 | #define OGRE_AUTO_MUTEX
|
---|
| 167 | #define OGRE_LOCK_AUTO_MUTEX
|
---|
| 168 | #define OGRE_MUTEX(name)
|
---|
| 169 | #define OGRE_LOCK_MUTEX(name)
|
---|
| 170 | #define OGRE_AUTO_SHARED_MUTEX
|
---|
| 171 | #define OGRE_LOCK_AUTO_SHARED_MUTEX
|
---|
| 172 | #define OGRE_NEW_AUTO_SHARED_MUTEX
|
---|
| 173 | #define OGRE_DELETE_AUTO_SHARED_MUTEX
|
---|
| 174 | #define OGRE_COPY_AUTO_SHARED_MUTEX(from)
|
---|
| 175 | #define OGRE_SET_AUTO_SHARED_MUTEX_NULL
|
---|
| 176 | #define OGRE_MUTEX_CONDITIONAL(name)
|
---|
| 177 | #endif
|
---|
| 178 |
|
---|
| 179 |
|
---|
| 180 | // Pre-declare classes
|
---|
| 181 | // Allows use of pointers in header files without including individual .h
|
---|
| 182 | // so decreases dependencies between files
|
---|
| 183 | class Angle;
|
---|
| 184 | class Animation;
|
---|
| 185 | class AnimationState;
|
---|
| 186 | class AnimationStateSet;
|
---|
| 187 | class AnimationTrack;
|
---|
| 188 | class Archive;
|
---|
| 189 | class ArchiveFactory;
|
---|
| 190 | class ArchiveManager;
|
---|
| 191 | class AutoParamDataSource;
|
---|
| 192 | class AxisAlignedBox;
|
---|
| 193 | class AxisAlignedBoxSceneQuery;
|
---|
| 194 | class Billboard;
|
---|
| 195 | class BillboardChain;
|
---|
| 196 | class BillboardSet;
|
---|
| 197 | class Bone;
|
---|
| 198 | class Camera;
|
---|
| 199 | class Codec;
|
---|
| 200 | class ColourValue;
|
---|
| 201 | class ConfigDialog;
|
---|
| 202 | template <typename T> class Controller;
|
---|
| 203 | template <typename T> class ControllerFunction;
|
---|
| 204 | class ControllerManager;
|
---|
| 205 | template <typename T> class ControllerValue;
|
---|
| 206 | class Cursor;
|
---|
| 207 | class Degree;
|
---|
| 208 | class DynLib;
|
---|
| 209 | class DynLibManager;
|
---|
| 210 | class EdgeData;
|
---|
| 211 | class EdgeListBuilder;
|
---|
| 212 | class Entity;
|
---|
| 213 | class ErrorDialog;
|
---|
| 214 | class EventDispatcher;
|
---|
| 215 | class EventProcessor;
|
---|
| 216 | class EventQueue;
|
---|
| 217 | class EventTarget;
|
---|
| 218 | class ExternalTextureSourceManager;
|
---|
| 219 | class Factory;
|
---|
| 220 | class Font;
|
---|
| 221 | class FontPtr;
|
---|
| 222 | class FontManager;
|
---|
| 223 | struct FrameEvent;
|
---|
| 224 | class FrameListener;
|
---|
| 225 | class Frustum;
|
---|
| 226 | class GpuProgram;
|
---|
| 227 | class GpuProgramPtr;
|
---|
| 228 | class GpuProgramManager;
|
---|
| 229 | class GpuProgramUsage;
|
---|
| 230 | class HardwareIndexBuffer;
|
---|
| 231 | class HardwareOcclusionQuery;
|
---|
| 232 | class HardwareVertexBuffer;
|
---|
| 233 | class HardwarePixelBuffer;
|
---|
| 234 | class HardwarePixelBufferSharedPtr;
|
---|
| 235 | class HighLevelGpuProgram;
|
---|
| 236 | class HighLevelGpuProgramPtr;
|
---|
| 237 | class HighLevelGpuProgramManager;
|
---|
| 238 | class HighLevelGpuProgramFactory;
|
---|
| 239 | class IndexData;
|
---|
| 240 | class InputEvent;
|
---|
| 241 | class InputReader;
|
---|
| 242 | class IntersectionSceneQuery;
|
---|
| 243 | class IntersectionSceneQueryListener;
|
---|
| 244 | class Image;
|
---|
| 245 | class KeyEvent;
|
---|
| 246 | class KeyFrame;
|
---|
| 247 | class KeyListener;
|
---|
| 248 | class KeyTarget;
|
---|
| 249 | class Light;
|
---|
| 250 | class Log;
|
---|
| 251 | class LogManager;
|
---|
| 252 | class ManualResourceLoader;
|
---|
| 253 | class ManualObject;
|
---|
| 254 | class Material;
|
---|
| 255 | class MaterialPtr;
|
---|
| 256 | class MaterialManager;
|
---|
| 257 | class Math;
|
---|
| 258 | class Matrix3;
|
---|
| 259 | class Matrix4;
|
---|
| 260 | class MemoryManager;
|
---|
| 261 | class Mesh;
|
---|
| 262 | class MeshPtr;
|
---|
| 263 | class MeshSerializer;
|
---|
| 264 | class MeshSerializerImpl;
|
---|
| 265 | class MeshManager;
|
---|
| 266 | class MovableObject;
|
---|
| 267 | class MovablePlane;
|
---|
| 268 | class MouseEvent;
|
---|
| 269 | class MouseListener;
|
---|
| 270 | class MouseMotionListener;
|
---|
| 271 | class MouseTarget;
|
---|
| 272 | class Node;
|
---|
| 273 | class NodeAnimationTrack;
|
---|
| 274 | class NodeKeyFrame;
|
---|
| 275 | class NumericAnimationTrack;
|
---|
| 276 | class NumericKeyFrame;
|
---|
| 277 | class Overlay;
|
---|
| 278 | class OverlayContainer;
|
---|
| 279 | class OverlayElement;
|
---|
| 280 | class OverlayElementFactory;
|
---|
| 281 | class OverlayManager;
|
---|
| 282 | class Particle;
|
---|
| 283 | class ParticleAffector;
|
---|
| 284 | class ParticleAffectorFactory;
|
---|
| 285 | class ParticleEmitter;
|
---|
| 286 | class ParticleEmitterFactory;
|
---|
| 287 | class ParticleSystem;
|
---|
| 288 | class ParticleSystemManager;
|
---|
| 289 | class ParticleSystemRenderer;
|
---|
| 290 | class ParticleSystemRendererFactory;
|
---|
| 291 | class ParticleVisualData;
|
---|
| 292 | class Pass;
|
---|
| 293 | class PatchMesh;
|
---|
| 294 | class PixelBox;
|
---|
| 295 | class PlatformManager;
|
---|
| 296 | class Plane;
|
---|
| 297 | class PlaneBoundedVolume;
|
---|
| 298 | class Pose;
|
---|
| 299 | class PositionTarget;
|
---|
| 300 | class ProgressiveMesh;
|
---|
| 301 | class Profile;
|
---|
| 302 | class Profiler;
|
---|
| 303 | class Quaternion;
|
---|
| 304 | class Radian;
|
---|
| 305 | class Ray;
|
---|
| 306 | class RaySceneQuery;
|
---|
| 307 | class RaySceneQueryListener;
|
---|
| 308 | class Renderable;
|
---|
| 309 | class RenderPriorityGroup;
|
---|
| 310 | class RenderQueue;
|
---|
| 311 | class RenderQueueGroup;
|
---|
| 312 | class RenderQueueInvocation;
|
---|
| 313 | class RenderQueueInvocationSequence;
|
---|
| 314 | class RenderQueueListener;
|
---|
| 315 | class RenderSystem;
|
---|
| 316 | class RenderSystemCapabilities;
|
---|
| 317 | class RenderTarget;
|
---|
| 318 | class RenderTargetListener;
|
---|
| 319 | class RenderTexture;
|
---|
| 320 | class MultiRenderTarget;
|
---|
| 321 | class RenderWindow;
|
---|
| 322 | class RenderOperation;
|
---|
| 323 | class Resource;
|
---|
| 324 | class ResourceBackgroundQueue;
|
---|
| 325 | class ResourceGroupManager;
|
---|
| 326 | class ResourceManager;
|
---|
| 327 | class RibbonTrail;
|
---|
| 328 | class Root;
|
---|
| 329 | class SceneManager;
|
---|
| 330 | class SceneManagerEnumerator;
|
---|
| 331 | class SceneNode;
|
---|
| 332 | class SceneQuery;
|
---|
| 333 | class SceneQueryListener;
|
---|
| 334 | class ScriptLoader;
|
---|
| 335 | class Serializer;
|
---|
| 336 | class ShadowCaster;
|
---|
| 337 | class ShadowRenderable;
|
---|
| 338 | class SimpleRenderable;
|
---|
| 339 | class SimpleSpline;
|
---|
| 340 | class Skeleton;
|
---|
| 341 | class SkeletonPtr;
|
---|
| 342 | class SkeletonInstance;
|
---|
| 343 | class SkeletonManager;
|
---|
| 344 | class Sphere;
|
---|
| 345 | class SphereSceneQuery;
|
---|
| 346 | class StaticGeometry;
|
---|
| 347 | class StringConverter;
|
---|
| 348 | class StringInterface;
|
---|
| 349 | class SubEntity;
|
---|
| 350 | class SubMesh;
|
---|
| 351 | class TagPoint;
|
---|
| 352 | class TargetManager;
|
---|
| 353 | class Technique;
|
---|
| 354 | class TempBlendedBufferInfo;
|
---|
| 355 | class ExternalTextureSource;
|
---|
| 356 | class TextureUnitState;
|
---|
| 357 | class Texture;
|
---|
| 358 | class TexturePtr;
|
---|
| 359 | class TextureFont;
|
---|
| 360 | class TextureManager;
|
---|
| 361 | class TransformKeyFrame;
|
---|
| 362 | class Timer;
|
---|
| 363 | class UserDefinedObject;
|
---|
| 364 | class Vector2;
|
---|
| 365 | class Vector3;
|
---|
| 366 | class Vector4;
|
---|
| 367 | class Viewport;
|
---|
| 368 | class VertexAnimationTrack;
|
---|
| 369 | class VertexBufferBinding;
|
---|
| 370 | class VertexData;
|
---|
| 371 | class VertexDeclaration;
|
---|
| 372 | class VertexMorphKeyFrame;
|
---|
| 373 | class WireBoundingBox;
|
---|
| 374 | class Compositor;
|
---|
| 375 | class CompositorManager;
|
---|
| 376 | class CompositorChain;
|
---|
| 377 | class CompositorInstance;
|
---|
| 378 | class CompositionTechnique;
|
---|
| 379 | class CompositionPass;
|
---|
| 380 | class CompositionTargetPass;
|
---|
| 381 | }
|
---|
| 382 |
|
---|
| 383 | #endif // __OgrePrerequisites_H__
|
---|
| 384 |
|
---|
| 385 |
|
---|