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-2006 Torus Knot Software Ltd 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 __OgrePrerequisites_H__ 00026 #define __OgrePrerequisites_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 00075 // disable: "conditional expression constant", always occurs on 00076 // OGRE_MUTEX_CONDITIONAL when no threading enabled 00077 # pragma warning (disable : 201) 00078 00079 #endif 00080 00081 /* Include all the standard header *after* all the configuration 00082 settings have been made. 00083 */ 00084 //#include "OgreStdHeaders.h" 00085 00086 00087 #include "OgreMemoryManager.h" 00088 00089 namespace Ogre { 00090 // Define ogre version 00091 #define OGRE_VERSION_MAJOR 1 00092 #define OGRE_VERSION_MINOR 4 00093 #define OGRE_VERSION_PATCH 8 00094 #define OGRE_VERSION_SUFFIX "" 00095 #define OGRE_VERSION_NAME "Eihort" 00096 00097 #define OGRE_VERSION ((OGRE_VERSION_MAJOR << 16) | (OGRE_VERSION_MINOR << 8) | OGRE_VERSION_PATCH) 00098 00099 // define the real number values to be used 00100 // default to use 'float' unless precompiler option set 00101 #if OGRE_DOUBLE_PRECISION == 1 00102 00105 typedef double Real; 00106 #else 00107 00110 typedef float Real; 00111 #endif 00112 00113 #if OGRE_COMPILER == OGRE_COMPILER_GNUC && OGRE_COMP_VER >= 310 && !defined(STLPORT) 00114 # define HashMap ::__gnu_cxx::hash_map 00115 #else 00116 # if OGRE_COMPILER == OGRE_COMPILER_MSVC 00117 # if OGRE_COMP_VER > 1300 && !defined(_STLP_MSVC) 00118 # define HashMap ::stdext::hash_map 00119 # else 00120 # define HashMap ::std::hash_map 00121 # endif 00122 # else 00123 # define HashMap ::std::hash_map 00124 # endif 00125 #endif 00126 00129 typedef unsigned char uchar; 00130 typedef unsigned short ushort; 00131 typedef unsigned int uint; 00132 typedef unsigned long ulong; 00133 00135 #define OGRE_DELETE(p) { if(p) { delete (p); (p)=NULL; } } 00136 #define OGRE_DELETE_ARRAY(p) { if(p) { delete[] (p); (p)=NULL; } } 00137 00138 #if OGRE_WCHAR_T_STRINGS 00139 typedef std::wstring _StringBase; 00140 #else 00141 typedef std::string _StringBase; 00142 #endif 00143 00144 typedef _StringBase String; 00145 00146 // Useful threading defines 00147 #define OGRE_AUTO_MUTEX_NAME mutex 00148 #if OGRE_THREAD_SUPPORT 00149 #define OGRE_AUTO_MUTEX mutable boost::recursive_mutex OGRE_AUTO_MUTEX_NAME; 00150 #define OGRE_LOCK_AUTO_MUTEX boost::recursive_mutex::scoped_lock ogreAutoMutexLock(OGRE_AUTO_MUTEX_NAME); 00151 #define OGRE_MUTEX(name) mutable boost::recursive_mutex name; 00152 #define OGRE_STATIC_MUTEX(name) static boost::recursive_mutex name; 00153 #define OGRE_STATIC_MUTEX_INSTANCE(name) boost::recursive_mutex name; 00154 #define OGRE_LOCK_MUTEX(name) boost::recursive_mutex::scoped_lock ogrenameLock(name); 00155 #define OGRE_LOCK_MUTEX_NAMED(mutexName, lockName) boost::recursive_mutex::scoped_lock lockName(mutexName); 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 #define OGRE_THREAD_SYNCHRONISER(sync) boost::condition sync; 00165 #define OGRE_THREAD_WAIT(sync, lock) sync.wait(lock); 00166 #define OGRE_THREAD_NOTIFY_ONE(sync) sync.notify_one(); 00167 #define OGRE_THREAD_NOTIFY_ALL(sync) sync.notify_all(); 00168 // Thread-local pointer 00169 #define OGRE_THREAD_POINTER(T, var) boost::thread_specific_ptr<T> var 00170 #define OGRE_THREAD_POINTER_SET(var, expr) var.reset(expr) 00171 #define OGRE_THREAD_POINTER_DELETE(var) var.reset(0) 00172 #define OGRE_THREAD_POINTER_GET(var) var.get() 00173 #else 00174 #define OGRE_AUTO_MUTEX 00175 #define OGRE_LOCK_AUTO_MUTEX 00176 #define OGRE_MUTEX(name) 00177 #define OGRE_STATIC_MUTEX(name) 00178 #define OGRE_STATIC_MUTEX_INSTANCE(name) 00179 #define OGRE_LOCK_MUTEX(name) 00180 #define OGRE_LOCK_MUTEX_NAMED(mutexName, lockName) 00181 #define OGRE_AUTO_SHARED_MUTEX 00182 #define OGRE_LOCK_AUTO_SHARED_MUTEX 00183 #define OGRE_NEW_AUTO_SHARED_MUTEX 00184 #define OGRE_DELETE_AUTO_SHARED_MUTEX 00185 #define OGRE_COPY_AUTO_SHARED_MUTEX(from) 00186 #define OGRE_SET_AUTO_SHARED_MUTEX_NULL 00187 #define OGRE_MUTEX_CONDITIONAL(name) if(true) 00188 #define OGRE_THREAD_SYNCHRONISER(sync) 00189 #define OGRE_THREAD_WAIT(sync, lock) 00190 #define OGRE_THREAD_NOTIFY_ONE(sync) 00191 #define OGRE_THREAD_NOTIFY_ALL(sync) 00192 #define OGRE_THREAD_POINTER(T, var) T* var 00193 #define OGRE_THREAD_POINTER_SET(var, expr) var = expr 00194 #define OGRE_THREAD_POINTER_DELETE(var) delete var; var = 0 00195 #define OGRE_THREAD_POINTER_GET(var) var 00196 #endif 00197 00198 00199 // Pre-declare classes 00200 // Allows use of pointers in header files without including individual .h 00201 // so decreases dependencies between files 00202 class Angle; 00203 class Animation; 00204 class AnimationState; 00205 class AnimationStateSet; 00206 class AnimationTrack; 00207 class Archive; 00208 class ArchiveFactory; 00209 class ArchiveManager; 00210 class AutoParamDataSource; 00211 class AxisAlignedBox; 00212 class AxisAlignedBoxSceneQuery; 00213 class Billboard; 00214 class BillboardChain; 00215 class BillboardSet; 00216 class Bone; 00217 class Camera; 00218 class Codec; 00219 class ColourValue; 00220 class ConfigDialog; 00221 template <typename T> class Controller; 00222 template <typename T> class ControllerFunction; 00223 class ControllerManager; 00224 template <typename T> class ControllerValue; 00225 class Degree; 00226 class DynLib; 00227 class DynLibManager; 00228 class EdgeData; 00229 class EdgeListBuilder; 00230 class Entity; 00231 class ErrorDialog; 00232 class ExternalTextureSourceManager; 00233 class Factory; 00234 class Font; 00235 class FontPtr; 00236 class FontManager; 00237 struct FrameEvent; 00238 class FrameListener; 00239 class Frustum; 00240 class GpuProgram; 00241 class GpuProgramPtr; 00242 class GpuProgramManager; 00243 class GpuProgramUsage; 00244 class HardwareIndexBuffer; 00245 class HardwareOcclusionQuery; 00246 class HardwareVertexBuffer; 00247 class HardwarePixelBuffer; 00248 class HardwarePixelBufferSharedPtr; 00249 class HighLevelGpuProgram; 00250 class HighLevelGpuProgramPtr; 00251 class HighLevelGpuProgramManager; 00252 class HighLevelGpuProgramFactory; 00253 class IndexData; 00254 class IntersectionSceneQuery; 00255 class IntersectionSceneQueryListener; 00256 class Image; 00257 class KeyFrame; 00258 class Light; 00259 class Log; 00260 class LogManager; 00261 class ManualResourceLoader; 00262 class ManualObject; 00263 class Material; 00264 class MaterialPtr; 00265 class MaterialManager; 00266 class MaterialScriptCompiler; 00267 class Math; 00268 class Matrix3; 00269 class Matrix4; 00270 class MemoryManager; 00271 class Mesh; 00272 class MeshPtr; 00273 class MeshSerializer; 00274 class MeshSerializerImpl; 00275 class MeshManager; 00276 class MovableObject; 00277 class MovablePlane; 00278 class Node; 00279 class NodeAnimationTrack; 00280 class NodeKeyFrame; 00281 class NumericAnimationTrack; 00282 class NumericKeyFrame; 00283 class Overlay; 00284 class OverlayContainer; 00285 class OverlayElement; 00286 class OverlayElementFactory; 00287 class OverlayManager; 00288 class Particle; 00289 class ParticleAffector; 00290 class ParticleAffectorFactory; 00291 class ParticleEmitter; 00292 class ParticleEmitterFactory; 00293 class ParticleSystem; 00294 class ParticleSystemManager; 00295 class ParticleSystemRenderer; 00296 class ParticleSystemRendererFactory; 00297 class ParticleVisualData; 00298 class Pass; 00299 class PatchMesh; 00300 class PixelBox; 00301 class Plane; 00302 class PlaneBoundedVolume; 00303 class Plugin; 00304 class Pose; 00305 class ProgressiveMesh; 00306 class Profile; 00307 class Profiler; 00308 class Quaternion; 00309 class Radian; 00310 class Ray; 00311 class RaySceneQuery; 00312 class RaySceneQueryListener; 00313 class Renderable; 00314 class RenderPriorityGroup; 00315 class RenderQueue; 00316 class RenderQueueGroup; 00317 class RenderQueueInvocation; 00318 class RenderQueueInvocationSequence; 00319 class RenderQueueListener; 00320 class RenderSystem; 00321 class RenderSystemCapabilities; 00322 class RenderTarget; 00323 class RenderTargetListener; 00324 class RenderTexture; 00325 class MultiRenderTarget; 00326 class RenderWindow; 00327 class RenderOperation; 00328 class Resource; 00329 class ResourceBackgroundQueue; 00330 class ResourceGroupManager; 00331 class ResourceManager; 00332 class RibbonTrail; 00333 class Root; 00334 class SceneManager; 00335 class SceneManagerEnumerator; 00336 class SceneNode; 00337 class SceneQuery; 00338 class SceneQueryListener; 00339 class ScriptLoader; 00340 class Serializer; 00341 class ShadowCaster; 00342 class ShadowRenderable; 00343 class ShadowTextureManager; 00344 class SimpleRenderable; 00345 class SimpleSpline; 00346 class Skeleton; 00347 class SkeletonPtr; 00348 class SkeletonInstance; 00349 class SkeletonManager; 00350 class Sphere; 00351 class SphereSceneQuery; 00352 class StaticGeometry; 00353 class StringConverter; 00354 class StringInterface; 00355 class SubEntity; 00356 class SubMesh; 00357 class TagPoint; 00358 class Technique; 00359 class TempBlendedBufferInfo; 00360 class ExternalTextureSource; 00361 class TextureUnitState; 00362 class Texture; 00363 class TexturePtr; 00364 class TextureFont; 00365 class TextureManager; 00366 class TransformKeyFrame; 00367 class Timer; 00368 class UserDefinedObject; 00369 class Vector2; 00370 class Vector3; 00371 class Vector4; 00372 class Viewport; 00373 class VertexAnimationTrack; 00374 class VertexBufferBinding; 00375 class VertexData; 00376 class VertexDeclaration; 00377 class VertexMorphKeyFrame; 00378 class WireBoundingBox; 00379 class Compositor; 00380 class CompositorManager; 00381 class CompositorChain; 00382 class CompositorInstance; 00383 class CompositionTechnique; 00384 class CompositionPass; 00385 class CompositionTargetPass; 00386 } 00387 00388 #endif // __OgrePrerequisites_H__ 00389 00390
Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sat May 10 16:25:02 2008