Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

OgrePrerequisites.h

Go to the documentation of this file.
00001 /*-------------------------------------------------------------------------
00002 This source file is a part of OGRE
00003 (Object-oriented Graphics Rendering Engine)
00004 
00005 For the latest info, see http://www.ogre3d.org/
00006 
00007 Copyright (c) 2000-2005 The OGRE Team
00008 Also see acknowledgements in Readme.html
00009 
00010 This library is free software; you can redistribute it and/or modify it
00011 under the terms of the GNU Lesser General Public License (LGPL) as 
00012 published by the Free Software Foundation; either version 2.1 of the 
00013 License, or (at your option) any later version.
00014 
00015 This library is distributed in the hope that it will be useful, but 
00016 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
00017 or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public 
00018 License for more details.
00019 
00020 You should have received a copy of the GNU Lesser General Public License 
00021 along with this library; if not, write to the Free Software Foundation, 
00022 Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA or go to
00023 http://www.gnu.org/copyleft/lesser.txt
00024 -------------------------------------------------------------------------*/
00025 #ifndef __Prerequisites_H__
00026 #define __Prerequisites_H__
00027 
00028 // undefine this to not require new angular units where applicable
00029 #define OGRE_FORCE_ANGLE_TYPES
00030 
00031 // Platform-specific stuff
00032 #include "OgrePlatform.h"
00033 
00034 #if OGRE_COMPILER == OGRE_COMPILER_MSVC
00035 // Turn off warnings generated by long std templates
00036 // This warns about truncation to 255 characters in debug/browse info
00037 #   pragma warning (disable : 4786)
00038 
00039 // Turn off warnings generated by long std templates
00040 // This warns about truncation to 255 characters in debug/browse info
00041 #   pragma warning (disable : 4503)
00042 
00043 // disable: "conversion from 'double' to 'float', possible loss of data
00044 #   pragma warning (disable : 4244)
00045 
00046 // disable: "truncation from 'double' to 'float'
00047 #   pragma warning (disable : 4305)
00048 
00049 // disable: "<type> needs to have dll-interface to be used by clients'
00050 // Happens on STL member variables which are not public therefore is ok
00051 #   pragma warning (disable : 4251)
00052 
00053 // disable: "non dll-interface class used as base for dll-interface class"
00054 // Happens when deriving from Singleton because bug in compiler ignores
00055 // template export
00056 #   pragma warning (disable : 4275)
00057 
00058 // disable: "C++ Exception Specification ignored"
00059 // This is because MSVC 6 did not implement all the C++ exception 
00060 // specifications in the ANSI C++ draft.
00061 #   pragma warning( disable : 4290 )
00062 
00063 // disable: "no suitable definition provided for explicit template 
00064 // instantiation request" Occurs in VC7 for no justifiable reason on all 
00065 // #includes of Singleton
00066 #   pragma warning( disable: 4661)
00067 
00068 // disable: deprecation warnings when using CRT calls in VC8 
00069 // These show up on all C runtime lib code in VC8, disable since they clutter
00070 // the warnings with things we may not be able to do anything about (e.g. 
00071 // generated code from nvparse etc). I doubt very much that these calls
00072 // will ever be actually removed from VC anyway, it would break too much code.
00073 #   pragma warning( disable: 4996)
00074 #endif
00075 
00076 #if OGRE_COMPILER == OGRE_COMPILER_MSVC
00077 #   undef _DEFINE_DEPRECATED_HASH_CLASSES
00078 #   if OGRE_COMP_VER > 1300
00079 #       define _DEFINE_DEPRECATED_HASH_CLASSES 0
00080 #   else
00081 #      define _DEFINE_DEPRECATED_HASH_CLASSES 1
00082 #   endif
00083 #endif
00084 
00085 /* Include all the standard header *after* all the configuration
00086    settings have been made.
00087 */
00088 #include "OgreStdHeaders.h"
00089 
00090 
00091 #include "OgreMemoryManager.h"
00092 
00093 // define the real number values to be used
00094 // default to use 'float' unless precompiler option set
00095 namespace Ogre {
00096     // Define ogre version
00097     #define OGRE_VERSION_MAJOR 1
00098     #define OGRE_VERSION_MINOR 0
00099     #define OGRE_VERSION_PATCH 7
00100     #define OGRE_VERSION_NAME "Azathoth"
00101 
00102     #if OGRE_DOUBLE_PRECISION == 1
00103 
00106         typedef double Real;
00107     #else
00108 
00111         typedef float Real;
00112     #endif
00113 
00114     // define the Char type as either char or wchar_t
00115     #if OGRE_WCHAR_T_STRINGS == 1
00116     #   define OgreChar wchar_t
00117     #   define _TO_CHAR( x ) L##x
00118     #else
00119     #   define OgreChar char
00120     #   define _TO_CHAR( x ) x
00121     #endif
00122 
00123     #if OGRE_COMPILER == OGRE_COMPILER_GNUC && OGRE_COMP_VER >= 310
00124     #   define HashMap ::__gnu_cxx::hash_map
00125     #else
00126     #   if OGRE_COMPILER == OGRE_COMPILER_MSVC
00127     #       if OGRE_COMP_VER > 1300 && !defined(_STLP_MSVC)
00128     #           define HashMap ::stdext::hash_map
00129     #       else
00130     #           define HashMap ::std::hash_map
00131     #       endif
00132     #   else
00133     #       define HashMap ::std::hash_map
00134     #   endif
00135     #endif
00136 
00139     typedef unsigned char uchar;
00140     typedef unsigned short ushort;
00141     typedef unsigned int uint;  
00142     typedef unsigned long ulong;  
00143 
00145     #define OGRE_DELETE(p)       { if(p) { delete (p);     (p)=NULL; } }
00146     #define OGRE_DELETE_ARRAY(p) { if(p) { delete[] (p);   (p)=NULL; } }
00147 
00148     #if OGRE_WCHAR_T_STRINGS
00149         typedef std::wstring _StringBase;
00150     #else
00151         typedef std::string _StringBase;
00152     #endif
00153     
00154     typedef _StringBase String;
00155 
00156     // Useful threading defines
00157     #define OGRE_AUTO_MUTEX_NAME mutex
00158     #if OGRE_THREAD_SUPPORT
00159         #define OGRE_AUTO_MUTEX mutable boost::recursive_mutex OGRE_AUTO_MUTEX_NAME;
00160         #define OGRE_LOCK_AUTO_MUTEX boost::recursive_mutex::scoped_lock ogreAutoMutexLock(OGRE_AUTO_MUTEX_NAME);
00161         #define OGRE_MUTEX(name) mutable boost::recursive_mutex name;
00162         #define OGRE_LOCK_MUTEX(name) boost::recursive_mutex::scoped_lock ogrenameLock(name);
00163         // like OGRE_AUTO_MUTEX but mutex held by pointer
00164         #define OGRE_AUTO_SHARED_MUTEX mutable boost::recursive_mutex *OGRE_AUTO_MUTEX_NAME;
00165         #define OGRE_LOCK_AUTO_SHARED_MUTEX boost::recursive_mutex::scoped_lock ogreAutoMutexLock(*OGRE_AUTO_MUTEX_NAME);
00166         #define OGRE_NEW_AUTO_SHARED_MUTEX OGRE_AUTO_MUTEX_NAME = new boost::recursive_mutex();
00167         #define OGRE_DELETE_AUTO_SHARED_MUTEX delete OGRE_AUTO_MUTEX_NAME;
00168         #define OGRE_COPY_AUTO_SHARED_MUTEX(from) OGRE_AUTO_MUTEX_NAME = from;
00169     #else
00170         #define OGRE_AUTO_MUTEX 
00171         #define OGRE_LOCK_AUTO_MUTEX 
00172         #define OGRE_MUTEX(name)
00173         #define OGRE_LOCK_MUTEX(name)
00174         #define OGRE_AUTO_SHARED_MUTEX 
00175         #define OGRE_LOCK_AUTO_SHARED_MUTEX
00176         #define OGRE_NEW_AUTO_SHARED_MUTEX 
00177         #define OGRE_DELETE_AUTO_SHARED_MUTEX 
00178         #define OGRE_COPY_AUTO_SHARED_MUTEX(from) 
00179     #endif
00180 
00181 
00182 // Pre-declare classes
00183 // Allows use of pointers in header files without including individual .h
00184 // so decreases dependencies between files
00185     class Angle;
00186     class Animation;
00187     class AnimationState;
00188     class AnimationTrack;
00189     class Archive;
00190     class ArchiveFactory;
00191     class ArchiveManager;
00192     class AutoParamDataSource;
00193     class AxisAlignedBox;
00194     class AxisAlignedBoxSceneQuery;
00195     class Billboard;
00196     class BillboardSet;
00197     class Bone;
00198     class Camera;
00199     class Codec;
00200     class ColourValue;
00201     class ConfigDialog;
00202     template <typename T> class Controller;
00203     template <typename T> class ControllerFunction;
00204     class ControllerManager;
00205     template <typename T> class ControllerValue;
00206     class Cursor;
00207     class Degree;
00208     class DynLib;
00209     class DynLibManager;
00210     class EdgeData;
00211     class EdgeListBuilder;
00212     class Entity;
00213     class ErrorDialog;
00214     class EventDispatcher;
00215     class EventProcessor;
00216     class EventQueue;
00217     class EventTarget;
00218     class ExternalTextureSourceManager;
00219     class Factory;
00220     class Font;
00221     class FontPtr;
00222     class FontManager;
00223     struct FrameEvent;
00224     class FrameListener;
00225     class Frustum;
00226     class GpuProgram;
00227     class GpuProgramPtr;
00228     class GpuProgramManager;
00229     class GpuProgramUsage;
00230     class HardwareIndexBuffer;
00231     class HardwareOcclusionQuery;
00232     class HardwareVertexBuffer;
00233     class HardwarePixelBuffer;
00234     class HardwarePixelBufferSharedPtr;
00235     class HighLevelGpuProgram;
00236     class HighLevelGpuProgramPtr;
00237     class HighLevelGpuProgramManager;
00238     class HighLevelGpuProgramFactory;
00239     class IndexData;
00240     class InputEvent;
00241     class InputReader;
00242     class IntersectionSceneQuery;
00243     class IntersectionSceneQueryListener;
00244     class Image;
00245     class KeyEvent;
00246     class KeyFrame;
00247     class KeyListener;
00248     class KeyTarget;
00249     class Light;
00250     class Log;
00251     class LogManager;
00252     class ManualResourceLoader;
00253     class Material;
00254     class MaterialPtr;
00255     class MaterialManager;
00256     class Math;
00257     class Matrix3;
00258     class Matrix4;
00259     class MemoryManager;
00260     class Mesh;
00261     class MeshPtr;
00262     class MeshSerializer;
00263     class MeshSerializerImpl;
00264     class MeshManager;
00265     class MovableObject;
00266     class MovablePlane;
00267     class MouseEvent;
00268     class MouseListener;
00269     class MouseMotionListener;
00270     class MouseTarget;
00271     class Node;
00272     class Overlay;
00273     class OverlayContainer;
00274     class OverlayElement;
00275     class OverlayElementFactory;
00276     class OverlayManager;
00277     class Particle;
00278     class ParticleAffector;
00279     class ParticleAffectorFactory;
00280     class ParticleEmitter;
00281     class ParticleEmitterFactory;
00282     class ParticleSystem;
00283     class ParticleSystemManager;
00284     class ParticleSystemRenderer;
00285     class ParticleSystemRendererFactory;
00286     class ParticleVisualData;
00287     class Pass;
00288     class PatchMesh;
00289     class PixelBox;
00290     class PlatformManager;
00291     class Plane;
00292     class PlaneBoundedVolume;
00293     class PositionTarget;
00294     class ProgressiveMesh;
00295     class Profile;
00296     class Profiler;
00297     class Quaternion;
00298     class Radian;
00299     class Ray;
00300     class RaySceneQuery;
00301     class RaySceneQueryListener;
00302     class Renderable;
00303     class RenderPriorityGroup;
00304     class RenderQueue;
00305     class RenderQueueGroup;
00306     class RenderQueueListener;
00307     class RenderSystem;
00308     class RenderSystemCapabilities;
00309     class RenderTarget;
00310     class RenderTargetListener;
00311     class RenderTexture;
00312     class RenderWindow;
00313     class RenderOperation;
00314     class Resource;
00315     class ResourceBackgroundQueue;
00316     class ResourceGroupManager;
00317     class ResourceManager;
00318     class Root;
00319     class SceneManager;
00320     class SceneManagerEnumerator;
00321     class SceneNode;
00322     class SceneQuery;
00323     class SceneQueryListener;
00324     class ScriptLoader;
00325     class Serializer;
00326     class ShadowCaster;
00327     class ShadowRenderable;
00328     class SimpleRenderable;
00329     class SimpleSpline;
00330     class Skeleton;
00331     class SkeletonPtr;
00332     class SkeletonInstance;
00333     class SkeletonManager;
00334     class Sphere;
00335     class SphereSceneQuery;
00336     class StaticGeometry;
00337     class StringConverter;
00338     class StringInterface;
00339     class SubEntity;
00340     class SubMesh;
00341     class TagPoint;
00342     class TargetManager;
00343     class Technique;
00344     class ExternalTextureSource;
00345     class TextureUnitState;
00346     class Texture;
00347     class TexturePtr;
00348     class TextureFont;
00349     class TextureManager;
00350     class Timer;
00351     class UserDefinedObject;
00352     class Vector2;
00353     class Vector3;
00354     class Vector4;
00355     class Viewport;  
00356     class VertexBufferBinding;
00357     class VertexData;
00358     class VertexDeclaration;
00359     class WireBoundingBox; 
00360 }
00361 
00362 #endif // __OgrePrerequisites_H__
00363 
00364 

Copyright © 2000-2005 by The OGRE Team
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Feb 12 12:59:50 2006