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 /* Include all the standard header *after* all the configuration 00077 settings have been made. 00078 */ 00079 #include "OgreStdHeaders.h" 00080 00081 00082 #include "OgreMemoryManager.h" 00083 00084 namespace Ogre { 00085 // Define ogre version 00086 #define OGRE_VERSION_MAJOR 1 00087 #define OGRE_VERSION_MINOR 2 00088 #define OGRE_VERSION_PATCH 2 00089 #define OGRE_VERSION_NAME "Dagon" 00090 00091 #define OGRE_VERSION ((OGRE_VERSION_MAJOR << 16) | (OGRE_VERSION_MINOR << 8) | OGRE_VERSION_PATCH) 00092 00093 // define the real number values to be used 00094 // default to use 'float' unless precompiler option set 00095 #if OGRE_DOUBLE_PRECISION == 1 00096 00099 typedef double Real; 00100 #else 00101 00104 typedef float Real; 00105 #endif 00106 00107 // define the Char type as either char or wchar_t 00108 #if OGRE_WCHAR_T_STRINGS == 1 00109 # define OgreChar wchar_t 00110 # define _TO_CHAR( x ) L##x 00111 #else 00112 # define OgreChar char 00113 # define _TO_CHAR( x ) x 00114 #endif 00115 00116 #if OGRE_COMPILER == OGRE_COMPILER_GNUC && OGRE_COMP_VER >= 310 && !defined(STLPORT) 00117 # define HashMap ::__gnu_cxx::hash_map 00118 #else 00119 # if OGRE_COMPILER == OGRE_COMPILER_MSVC 00120 # if OGRE_COMP_VER > 1300 && !defined(_STLP_MSVC) 00121 # define HashMap ::stdext::hash_map 00122 # else 00123 # define HashMap ::std::hash_map 00124 # endif 00125 # else 00126 # define HashMap ::std::hash_map 00127 # endif 00128 #endif 00129 00132 typedef unsigned char uchar; 00133 typedef unsigned short ushort; 00134 typedef unsigned int uint; 00135 typedef unsigned long ulong; 00136 00138 #define OGRE_DELETE(p) { if(p) { delete (p); (p)=NULL; } } 00139 #define OGRE_DELETE_ARRAY(p) { if(p) { delete[] (p); (p)=NULL; } } 00140 00141 #if OGRE_WCHAR_T_STRINGS 00142 typedef std::wstring _StringBase; 00143 #else 00144 typedef std::string _StringBase; 00145 #endif 00146 00147 typedef _StringBase String; 00148 00149 // Useful threading defines 00150 #define OGRE_AUTO_MUTEX_NAME mutex 00151 #if OGRE_THREAD_SUPPORT 00152 #define OGRE_AUTO_MUTEX mutable boost::recursive_mutex OGRE_AUTO_MUTEX_NAME; 00153 #define OGRE_LOCK_AUTO_MUTEX boost::recursive_mutex::scoped_lock ogreAutoMutexLock(OGRE_AUTO_MUTEX_NAME); 00154 #define OGRE_MUTEX(name) mutable boost::recursive_mutex name; 00155 #define OGRE_LOCK_MUTEX(name) boost::recursive_mutex::scoped_lock ogrenameLock(name); 00156 // like OGRE_AUTO_MUTEX but mutex held by pointer 00157 #define OGRE_AUTO_SHARED_MUTEX mutable boost::recursive_mutex *OGRE_AUTO_MUTEX_NAME; 00158 #define OGRE_LOCK_AUTO_SHARED_MUTEX assert(OGRE_AUTO_MUTEX_NAME); boost::recursive_mutex::scoped_lock ogreAutoMutexLock(*OGRE_AUTO_MUTEX_NAME); 00159 #define OGRE_NEW_AUTO_SHARED_MUTEX assert(!OGRE_AUTO_MUTEX_NAME); OGRE_AUTO_MUTEX_NAME = new boost::recursive_mutex(); 00160 #define OGRE_DELETE_AUTO_SHARED_MUTEX assert(OGRE_AUTO_MUTEX_NAME); delete OGRE_AUTO_MUTEX_NAME; 00161 #define OGRE_COPY_AUTO_SHARED_MUTEX(from) assert(!OGRE_AUTO_MUTEX_NAME); OGRE_AUTO_MUTEX_NAME = from; 00162 #define OGRE_SET_AUTO_SHARED_MUTEX_NULL OGRE_AUTO_MUTEX_NAME = 0; 00163 #define OGRE_MUTEX_CONDITIONAL(mutex) if (mutex) 00164 00165 #else 00166 #define OGRE_AUTO_MUTEX 00167 #define OGRE_LOCK_AUTO_MUTEX 00168 #define OGRE_MUTEX(name) 00169 #define OGRE_LOCK_MUTEX(name) 00170 #define OGRE_AUTO_SHARED_MUTEX 00171 #define OGRE_LOCK_AUTO_SHARED_MUTEX 00172 #define OGRE_NEW_AUTO_SHARED_MUTEX 00173 #define OGRE_DELETE_AUTO_SHARED_MUTEX 00174 #define OGRE_COPY_AUTO_SHARED_MUTEX(from) 00175 #define OGRE_SET_AUTO_SHARED_MUTEX_NULL 00176 #define OGRE_MUTEX_CONDITIONAL(name) 00177 #endif 00178 00179 00180 // Pre-declare classes 00181 // Allows use of pointers in header files without including individual .h 00182 // so decreases dependencies between files 00183 class Angle; 00184 class Animation; 00185 class AnimationState; 00186 class AnimationStateSet; 00187 class AnimationTrack; 00188 class Archive; 00189 class ArchiveFactory; 00190 class ArchiveManager; 00191 class AutoParamDataSource; 00192 class AxisAlignedBox; 00193 class AxisAlignedBoxSceneQuery; 00194 class Billboard; 00195 class BillboardChain; 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 ManualObject; 00254 class Material; 00255 class MaterialPtr; 00256 class MaterialManager; 00257 class Math; 00258 class Matrix3; 00259 class Matrix4; 00260 class MemoryManager; 00261 class Mesh; 00262 class MeshPtr; 00263 class MeshSerializer; 00264 class MeshSerializerImpl; 00265 class MeshManager; 00266 class MovableObject; 00267 class MovablePlane; 00268 class MouseEvent; 00269 class MouseListener; 00270 class MouseMotionListener; 00271 class MouseTarget; 00272 class Node; 00273 class NodeAnimationTrack; 00274 class NodeKeyFrame; 00275 class NumericAnimationTrack; 00276 class NumericKeyFrame; 00277 class Overlay; 00278 class OverlayContainer; 00279 class OverlayElement; 00280 class OverlayElementFactory; 00281 class OverlayManager; 00282 class Particle; 00283 class ParticleAffector; 00284 class ParticleAffectorFactory; 00285 class ParticleEmitter; 00286 class ParticleEmitterFactory; 00287 class ParticleSystem; 00288 class ParticleSystemManager; 00289 class ParticleSystemRenderer; 00290 class ParticleSystemRendererFactory; 00291 class ParticleVisualData; 00292 class Pass; 00293 class PatchMesh; 00294 class PixelBox; 00295 class PlatformManager; 00296 class Plane; 00297 class PlaneBoundedVolume; 00298 class Pose; 00299 class PositionTarget; 00300 class ProgressiveMesh; 00301 class Profile; 00302 class Profiler; 00303 class Quaternion; 00304 class Radian; 00305 class Ray; 00306 class RaySceneQuery; 00307 class RaySceneQueryListener; 00308 class Renderable; 00309 class RenderPriorityGroup; 00310 class RenderQueue; 00311 class RenderQueueGroup; 00312 class RenderQueueInvocation; 00313 class RenderQueueInvocationSequence; 00314 class RenderQueueListener; 00315 class RenderSystem; 00316 class RenderSystemCapabilities; 00317 class RenderTarget; 00318 class RenderTargetListener; 00319 class RenderTexture; 00320 class MultiRenderTarget; 00321 class RenderWindow; 00322 class RenderOperation; 00323 class Resource; 00324 class ResourceBackgroundQueue; 00325 class ResourceGroupManager; 00326 class ResourceManager; 00327 class RibbonTrail; 00328 class Root; 00329 class SceneManager; 00330 class SceneManagerEnumerator; 00331 class SceneNode; 00332 class SceneQuery; 00333 class SceneQueryListener; 00334 class ScriptLoader; 00335 class Serializer; 00336 class ShadowCaster; 00337 class ShadowRenderable; 00338 class SimpleRenderable; 00339 class SimpleSpline; 00340 class Skeleton; 00341 class SkeletonPtr; 00342 class SkeletonInstance; 00343 class SkeletonManager; 00344 class Sphere; 00345 class SphereSceneQuery; 00346 class StaticGeometry; 00347 class StringConverter; 00348 class StringInterface; 00349 class SubEntity; 00350 class SubMesh; 00351 class TagPoint; 00352 class TargetManager; 00353 class Technique; 00354 class TempBlendedBufferInfo; 00355 class ExternalTextureSource; 00356 class TextureUnitState; 00357 class Texture; 00358 class TexturePtr; 00359 class TextureFont; 00360 class TextureManager; 00361 class TransformKeyFrame; 00362 class Timer; 00363 class UserDefinedObject; 00364 class Vector2; 00365 class Vector3; 00366 class Vector4; 00367 class Viewport; 00368 class VertexAnimationTrack; 00369 class VertexBufferBinding; 00370 class VertexData; 00371 class VertexDeclaration; 00372 class VertexMorphKeyFrame; 00373 class WireBoundingBox; 00374 class Compositor; 00375 class CompositorManager; 00376 class CompositorChain; 00377 class CompositorInstance; 00378 class CompositionTechnique; 00379 class CompositionPass; 00380 class CompositionTargetPass; 00381 } 00382 00383 #endif // __OgrePrerequisites_H__ 00384 00385
Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Jul 23 10:05:40 2006