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 namespace Ogre { 00094 // Define ogre version 00095 #define OGRE_VERSION_MAJOR 1 00096 #define OGRE_VERSION_MINOR 2 00097 #define OGRE_VERSION_PATCH 0 00098 #define OGRE_VERSION_NAME "Dagon" 00099 00100 #define OGRE_VERSION ((OGRE_VERSION_MAJOR << 16) | (OGRE_VERSION_MINOR << 8) | OGRE_VERSION_PATCH) 00101 00102 // define the real number values to be used 00103 // default to use 'float' unless precompiler option set 00104 #if OGRE_DOUBLE_PRECISION == 1 00105 00108 typedef double Real; 00109 #else 00110 00113 typedef float Real; 00114 #endif 00115 00116 // define the Char type as either char or wchar_t 00117 #if OGRE_WCHAR_T_STRINGS == 1 00118 # define OgreChar wchar_t 00119 # define _TO_CHAR( x ) L##x 00120 #else 00121 # define OgreChar char 00122 # define _TO_CHAR( x ) x 00123 #endif 00124 00125 #if OGRE_COMPILER == OGRE_COMPILER_GNUC && OGRE_COMP_VER >= 310 && !defined(STLPORT) 00126 # define HashMap ::__gnu_cxx::hash_map 00127 #else 00128 # if OGRE_COMPILER == OGRE_COMPILER_MSVC 00129 # if OGRE_COMP_VER > 1300 && !defined(_STLP_MSVC) 00130 # define HashMap ::stdext::hash_map 00131 # else 00132 # define HashMap ::std::hash_map 00133 # endif 00134 # else 00135 # define HashMap ::std::hash_map 00136 # endif 00137 #endif 00138 00141 typedef unsigned char uchar; 00142 typedef unsigned short ushort; 00143 typedef unsigned int uint; 00144 typedef unsigned long ulong; 00145 00147 #define OGRE_DELETE(p) { if(p) { delete (p); (p)=NULL; } } 00148 #define OGRE_DELETE_ARRAY(p) { if(p) { delete[] (p); (p)=NULL; } } 00149 00150 #if OGRE_WCHAR_T_STRINGS 00151 typedef std::wstring _StringBase; 00152 #else 00153 typedef std::string _StringBase; 00154 #endif 00155 00156 typedef _StringBase String; 00157 00158 // Useful threading defines 00159 #define OGRE_AUTO_MUTEX_NAME mutex 00160 #if OGRE_THREAD_SUPPORT 00161 #define OGRE_AUTO_MUTEX mutable boost::recursive_mutex OGRE_AUTO_MUTEX_NAME; 00162 #define OGRE_LOCK_AUTO_MUTEX boost::recursive_mutex::scoped_lock ogreAutoMutexLock(OGRE_AUTO_MUTEX_NAME); 00163 #define OGRE_MUTEX(name) mutable boost::recursive_mutex name; 00164 #define OGRE_LOCK_MUTEX(name) boost::recursive_mutex::scoped_lock ogrenameLock(name); 00165 // like OGRE_AUTO_MUTEX but mutex held by pointer 00166 #define OGRE_AUTO_SHARED_MUTEX mutable boost::recursive_mutex *OGRE_AUTO_MUTEX_NAME; 00167 #define OGRE_LOCK_AUTO_SHARED_MUTEX boost::recursive_mutex::scoped_lock ogreAutoMutexLock(*OGRE_AUTO_MUTEX_NAME); 00168 #define OGRE_NEW_AUTO_SHARED_MUTEX OGRE_AUTO_MUTEX_NAME = new boost::recursive_mutex(); 00169 #define OGRE_DELETE_AUTO_SHARED_MUTEX delete OGRE_AUTO_MUTEX_NAME; 00170 #define OGRE_COPY_AUTO_SHARED_MUTEX(from) OGRE_AUTO_MUTEX_NAME = from; 00171 #else 00172 #define OGRE_AUTO_MUTEX 00173 #define OGRE_LOCK_AUTO_MUTEX 00174 #define OGRE_MUTEX(name) 00175 #define OGRE_LOCK_MUTEX(name) 00176 #define OGRE_AUTO_SHARED_MUTEX 00177 #define OGRE_LOCK_AUTO_SHARED_MUTEX 00178 #define OGRE_NEW_AUTO_SHARED_MUTEX 00179 #define OGRE_DELETE_AUTO_SHARED_MUTEX 00180 #define OGRE_COPY_AUTO_SHARED_MUTEX(from) 00181 #endif 00182 00183 00184 // Pre-declare classes 00185 // Allows use of pointers in header files without including individual .h 00186 // so decreases dependencies between files 00187 class Angle; 00188 class Animation; 00189 class AnimationState; 00190 class AnimationStateSet; 00191 class AnimationTrack; 00192 class Archive; 00193 class ArchiveFactory; 00194 class ArchiveManager; 00195 class AutoParamDataSource; 00196 class AxisAlignedBox; 00197 class AxisAlignedBoxSceneQuery; 00198 class Billboard; 00199 class BillboardChain; 00200 class BillboardSet; 00201 class Bone; 00202 class Camera; 00203 class Codec; 00204 class ColourValue; 00205 class ConfigDialog; 00206 template <typename T> class Controller; 00207 template <typename T> class ControllerFunction; 00208 class ControllerManager; 00209 template <typename T> class ControllerValue; 00210 class Cursor; 00211 class Degree; 00212 class DynLib; 00213 class DynLibManager; 00214 class EdgeData; 00215 class EdgeListBuilder; 00216 class Entity; 00217 class ErrorDialog; 00218 class EventDispatcher; 00219 class EventProcessor; 00220 class EventQueue; 00221 class EventTarget; 00222 class ExternalTextureSourceManager; 00223 class Factory; 00224 class Font; 00225 class FontPtr; 00226 class FontManager; 00227 struct FrameEvent; 00228 class FrameListener; 00229 class Frustum; 00230 class GpuProgram; 00231 class GpuProgramPtr; 00232 class GpuProgramManager; 00233 class GpuProgramUsage; 00234 class HardwareIndexBuffer; 00235 class HardwareOcclusionQuery; 00236 class HardwareVertexBuffer; 00237 class HardwarePixelBuffer; 00238 class HardwarePixelBufferSharedPtr; 00239 class HighLevelGpuProgram; 00240 class HighLevelGpuProgramPtr; 00241 class HighLevelGpuProgramManager; 00242 class HighLevelGpuProgramFactory; 00243 class IndexData; 00244 class InputEvent; 00245 class InputReader; 00246 class IntersectionSceneQuery; 00247 class IntersectionSceneQueryListener; 00248 class Image; 00249 class KeyEvent; 00250 class KeyFrame; 00251 class KeyListener; 00252 class KeyTarget; 00253 class Light; 00254 class Log; 00255 class LogManager; 00256 class ManualResourceLoader; 00257 class ManualObject; 00258 class Material; 00259 class MaterialPtr; 00260 class MaterialManager; 00261 class Math; 00262 class Matrix3; 00263 class Matrix4; 00264 class MemoryManager; 00265 class Mesh; 00266 class MeshPtr; 00267 class MeshSerializer; 00268 class MeshSerializerImpl; 00269 class MeshManager; 00270 class MovableObject; 00271 class MovablePlane; 00272 class MouseEvent; 00273 class MouseListener; 00274 class MouseMotionListener; 00275 class MouseTarget; 00276 class Node; 00277 class NodeAnimationTrack; 00278 class NodeKeyFrame; 00279 class NumericAnimationTrack; 00280 class NumericKeyFrame; 00281 class Overlay; 00282 class OverlayContainer; 00283 class OverlayElement; 00284 class OverlayElementFactory; 00285 class OverlayManager; 00286 class Particle; 00287 class ParticleAffector; 00288 class ParticleAffectorFactory; 00289 class ParticleEmitter; 00290 class ParticleEmitterFactory; 00291 class ParticleSystem; 00292 class ParticleSystemManager; 00293 class ParticleSystemRenderer; 00294 class ParticleSystemRendererFactory; 00295 class ParticleVisualData; 00296 class Pass; 00297 class PatchMesh; 00298 class PixelBox; 00299 class PlatformManager; 00300 class Plane; 00301 class PlaneBoundedVolume; 00302 class Pose; 00303 class PositionTarget; 00304 class ProgressiveMesh; 00305 class Profile; 00306 class Profiler; 00307 class Quaternion; 00308 class Radian; 00309 class Ray; 00310 class RaySceneQuery; 00311 class RaySceneQueryListener; 00312 class Renderable; 00313 class RenderPriorityGroup; 00314 class RenderQueue; 00315 class RenderQueueGroup; 00316 class RenderQueueInvocation; 00317 class RenderQueueInvocationSequence; 00318 class RenderQueueListener; 00319 class RenderSystem; 00320 class RenderSystemCapabilities; 00321 class RenderTarget; 00322 class RenderTargetListener; 00323 class RenderTexture; 00324 class MultiRenderTarget; 00325 class RenderWindow; 00326 class RenderOperation; 00327 class Resource; 00328 class ResourceBackgroundQueue; 00329 class ResourceGroupManager; 00330 class ResourceManager; 00331 class RibbonTrail; 00332 class Root; 00333 class SceneManager; 00334 class SceneManagerEnumerator; 00335 class SceneNode; 00336 class SceneQuery; 00337 class SceneQueryListener; 00338 class ScriptLoader; 00339 class Serializer; 00340 class ShadowCaster; 00341 class ShadowRenderable; 00342 class SimpleRenderable; 00343 class SimpleSpline; 00344 class Skeleton; 00345 class SkeletonPtr; 00346 class SkeletonInstance; 00347 class SkeletonManager; 00348 class Sphere; 00349 class SphereSceneQuery; 00350 class StaticGeometry; 00351 class StringConverter; 00352 class StringInterface; 00353 class SubEntity; 00354 class SubMesh; 00355 class TagPoint; 00356 class TargetManager; 00357 class Technique; 00358 class TempBlendedBufferInfo; 00359 class ExternalTextureSource; 00360 class TextureUnitState; 00361 class Texture; 00362 class TexturePtr; 00363 class TextureFont; 00364 class TextureManager; 00365 class TransformKeyFrame; 00366 class Timer; 00367 class UserDefinedObject; 00368 class Vector2; 00369 class Vector3; 00370 class Vector4; 00371 class Viewport; 00372 class VertexAnimationTrack; 00373 class VertexBufferBinding; 00374 class VertexData; 00375 class VertexDeclaration; 00376 class VertexMorphKeyFrame; 00377 class WireBoundingBox; 00378 class Compositor; 00379 class CompositorManager; 00380 class CompositorChain; 00381 class CompositorInstance; 00382 class CompositionTechnique; 00383 class CompositionPass; 00384 class CompositionTargetPass; 00385 } 00386 00387 #endif // __OgrePrerequisites_H__ 00388 00389
Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Mar 12 14:37:46 2006