Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/OgreMain/include/OgrePrerequisites.h @ 5

Last change on this file since 5 was 5, checked in by anonymous, 17 years ago

=hoffentlich gehts jetzt

File size: 12.5 KB
Line 
1/*-------------------------------------------------------------------------
2This source file is a part of OGRE
3(Object-oriented Graphics Rendering Engine)
4
5For the latest info, see http://www.ogre3d.org/
6
7Copyright (c) 2000-2006 Torus Knot Software Ltd
8Also see acknowledgements in Readme.html
9
10This library is free software; you can redistribute it and/or modify it
11under the terms of the GNU Lesser General Public License (LGPL) as
12published by the Free Software Foundation; either version 2.1 of the
13License, or (at your option) any later version.
14
15This library is distributed in the hope that it will be useful, but
16WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
17or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
18License for more details.
19
20You should have received a copy of the GNU Lesser General Public License
21along with this library; if not, write to the Free Software Foundation,
22Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA or go to
23http://www.gnu.org/copyleft/lesser.txt
24-------------------------------------------------------------------------*/
25#ifndef __OgrePrerequisites_H__
26#define __OgrePrerequisites_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
75// disable: "conditional expression constant", always occurs on
76// OGRE_MUTEX_CONDITIONAL when no threading enabled
77#   pragma warning (disable : 201)
78
79#endif
80
81/* Include all the standard header *after* all the configuration
82   settings have been made.
83*/
84//#include "OgreStdHeaders.h"
85
86
87#include "OgreMemoryManager.h"
88
89namespace Ogre {
90    // Define ogre version
91    #define OGRE_VERSION_MAJOR 1
92    #define OGRE_VERSION_MINOR 4
93    #define OGRE_VERSION_PATCH 5
94        #define OGRE_VERSION_SUFFIX ""
95    #define OGRE_VERSION_NAME "Eihort"
96
97    #define OGRE_VERSION    ((OGRE_VERSION_MAJOR << 16) | (OGRE_VERSION_MINOR << 8) | OGRE_VERSION_PATCH)
98
99    // define the real number values to be used
100    // default to use 'float' unless precompiler option set
101    #if OGRE_DOUBLE_PRECISION == 1
102                /** Software floating point type.
103                @note Not valid as a pointer to GPU buffers / parameters
104                */
105        typedef double Real;
106    #else
107                /** Software floating point type.
108                @note Not valid as a pointer to GPU buffers / parameters
109                */
110        typedef float Real;
111    #endif
112
113    #if OGRE_COMPILER == OGRE_COMPILER_GNUC && OGRE_COMP_VER >= 310 && !defined(STLPORT)
114    #   define HashMap ::__gnu_cxx::hash_map
115    #else
116    #   if OGRE_COMPILER == OGRE_COMPILER_MSVC
117    #       if OGRE_COMP_VER > 1300 && !defined(_STLP_MSVC)
118    #           define HashMap ::stdext::hash_map
119    #       else
120    #           define HashMap ::std::hash_map
121    #       endif
122    #   else
123    #       define HashMap ::std::hash_map
124    #   endif
125    #endif
126
127    /** In order to avoid finger-aches :)
128    */
129    typedef unsigned char uchar;
130    typedef unsigned short ushort;
131    typedef unsigned int uint;
132        typedef unsigned long ulong;
133
134    /// Useful macros
135    #define OGRE_DELETE(p)       { if(p) { delete (p);     (p)=NULL; } }
136    #define OGRE_DELETE_ARRAY(p) { if(p) { delete[] (p);   (p)=NULL; } }
137
138        #if OGRE_WCHAR_T_STRINGS
139                typedef std::wstring _StringBase;
140        #else
141                typedef std::string _StringBase;
142        #endif
143
144        typedef _StringBase String;
145
146        // Useful threading defines
147        #define OGRE_AUTO_MUTEX_NAME mutex
148        #if OGRE_THREAD_SUPPORT
149                #define OGRE_AUTO_MUTEX mutable boost::recursive_mutex OGRE_AUTO_MUTEX_NAME;
150                #define OGRE_LOCK_AUTO_MUTEX boost::recursive_mutex::scoped_lock ogreAutoMutexLock(OGRE_AUTO_MUTEX_NAME);
151                #define OGRE_MUTEX(name) mutable boost::recursive_mutex name;
152                #define OGRE_STATIC_MUTEX(name) static boost::recursive_mutex name;
153                #define OGRE_STATIC_MUTEX_INSTANCE(name) boost::recursive_mutex name;
154                #define OGRE_LOCK_MUTEX(name) boost::recursive_mutex::scoped_lock ogrenameLock(name);
155                #define OGRE_LOCK_MUTEX_NAMED(mutexName, lockName) boost::recursive_mutex::scoped_lock lockName(mutexName);
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                #define OGRE_THREAD_SYNCHRONISER(sync) boost::condition sync;
165                #define OGRE_THREAD_WAIT(sync, lock) sync.wait(lock);
166                #define OGRE_THREAD_NOTIFY_ONE(sync) sync.notify_one();
167                #define OGRE_THREAD_NOTIFY_ALL(sync) sync.notify_all();
168                // Thread-local pointer
169                #define OGRE_THREAD_POINTER(T, var) boost::thread_specific_ptr<T> var
170                #define OGRE_THREAD_POINTER_SET(var, expr) var.reset(expr)
171                #define OGRE_THREAD_POINTER_DELETE(var) var.reset(0)
172                #define OGRE_THREAD_POINTER_GET(var) var.get()
173        #else
174                #define OGRE_AUTO_MUTEX
175                #define OGRE_LOCK_AUTO_MUTEX
176                #define OGRE_MUTEX(name)
177                #define OGRE_STATIC_MUTEX(name)
178                #define OGRE_STATIC_MUTEX_INSTANCE(name)
179                #define OGRE_LOCK_MUTEX(name)
180                #define OGRE_LOCK_MUTEX_NAMED(mutexName, lockName)
181                #define OGRE_AUTO_SHARED_MUTEX
182                #define OGRE_LOCK_AUTO_SHARED_MUTEX
183                #define OGRE_NEW_AUTO_SHARED_MUTEX
184                #define OGRE_DELETE_AUTO_SHARED_MUTEX
185                #define OGRE_COPY_AUTO_SHARED_MUTEX(from)
186        #define OGRE_SET_AUTO_SHARED_MUTEX_NULL
187        #define OGRE_MUTEX_CONDITIONAL(name) if(true)
188                #define OGRE_THREAD_SYNCHRONISER(sync)
189                #define OGRE_THREAD_WAIT(sync, lock)
190                #define OGRE_THREAD_NOTIFY_ONE(sync)
191                #define OGRE_THREAD_NOTIFY_ALL(sync)
192                #define OGRE_THREAD_POINTER(T, var) T* var
193                #define OGRE_THREAD_POINTER_SET(var, expr) var = expr
194                #define OGRE_THREAD_POINTER_DELETE(var) delete var; var = 0
195                #define OGRE_THREAD_POINTER_GET(var) var
196        #endif
197
198
199// Pre-declare classes
200// Allows use of pointers in header files without including individual .h
201// so decreases dependencies between files
202    class Angle;
203    class Animation;
204    class AnimationState;
205    class AnimationStateSet;
206    class AnimationTrack;
207    class Archive;
208    class ArchiveFactory;
209    class ArchiveManager;
210    class AutoParamDataSource;
211    class AxisAlignedBox;
212    class AxisAlignedBoxSceneQuery;
213    class Billboard;
214    class BillboardChain;
215    class BillboardSet;
216    class Bone;
217    class Camera;
218    class Codec;
219    class ColourValue;
220    class ConfigDialog;
221    template <typename T> class Controller;
222    template <typename T> class ControllerFunction;
223    class ControllerManager;
224    template <typename T> class ControllerValue;
225    class Degree;
226    class DynLib;
227    class DynLibManager;
228    class EdgeData;
229    class EdgeListBuilder;
230    class Entity;
231    class ErrorDialog;
232    class ExternalTextureSourceManager;
233    class Factory;
234    class Font;
235    class FontPtr;
236    class FontManager;
237    struct FrameEvent;
238    class FrameListener;
239    class Frustum;
240    class GpuProgram;
241    class GpuProgramPtr;
242    class GpuProgramManager;
243        class GpuProgramUsage;
244    class HardwareIndexBuffer;
245    class HardwareOcclusionQuery;
246    class HardwareVertexBuffer;
247        class HardwarePixelBuffer;
248    class HardwarePixelBufferSharedPtr;
249        class HighLevelGpuProgram;
250    class HighLevelGpuProgramPtr;
251        class HighLevelGpuProgramManager;
252        class HighLevelGpuProgramFactory;
253    class IndexData;
254    class IntersectionSceneQuery;
255    class IntersectionSceneQueryListener;
256    class Image;
257    class KeyFrame;
258    class Light;
259    class Log;
260    class LogManager;
261        class ManualResourceLoader;
262        class ManualObject;
263    class Material;
264    class MaterialPtr;
265    class MaterialManager;
266    class MaterialScriptCompiler;
267    class Math;
268    class Matrix3;
269    class Matrix4;
270    class MemoryManager;
271    class Mesh;
272    class MeshPtr;
273    class MeshSerializer;
274    class MeshSerializerImpl;
275    class MeshManager;
276    class MovableObject;
277    class MovablePlane;
278    class Node;
279        class NodeAnimationTrack;
280        class NodeKeyFrame;
281        class NumericAnimationTrack;
282        class NumericKeyFrame;
283    class Overlay;
284    class OverlayContainer;
285    class OverlayElement;
286    class OverlayElementFactory;
287    class OverlayManager;
288    class Particle;
289    class ParticleAffector;
290    class ParticleAffectorFactory;
291    class ParticleEmitter;
292    class ParticleEmitterFactory;
293    class ParticleSystem;
294    class ParticleSystemManager;
295    class ParticleSystemRenderer;
296    class ParticleSystemRendererFactory;
297    class ParticleVisualData;
298    class Pass;
299    class PatchMesh;
300    class PixelBox;
301    class Plane;
302    class PlaneBoundedVolume;
303        class Plugin;
304    class Pose;
305    class ProgressiveMesh;
306    class Profile;
307        class Profiler;
308    class Quaternion;
309        class Radian;
310    class Ray;
311    class RaySceneQuery;
312    class RaySceneQueryListener;
313    class Renderable;
314    class RenderPriorityGroup;
315    class RenderQueue;
316    class RenderQueueGroup;
317        class RenderQueueInvocation;
318        class RenderQueueInvocationSequence;
319    class RenderQueueListener;
320    class RenderSystem;
321    class RenderSystemCapabilities;
322    class RenderTarget;
323    class RenderTargetListener;
324    class RenderTexture;
325        class MultiRenderTarget;
326    class RenderWindow;
327    class RenderOperation;
328    class Resource;
329        class ResourceBackgroundQueue;
330        class ResourceGroupManager;
331    class ResourceManager;
332    class RibbonTrail;
333        class Root;
334    class SceneManager;
335    class SceneManagerEnumerator;
336    class SceneNode;
337    class SceneQuery;
338    class SceneQueryListener;
339        class ScriptLoader;
340    class Serializer;
341    class ShadowCaster;
342    class ShadowRenderable;
343        class ShadowTextureManager;
344    class SimpleRenderable;
345    class SimpleSpline;
346    class Skeleton;
347    class SkeletonPtr;
348    class SkeletonInstance;
349    class SkeletonManager;
350    class Sphere;
351    class SphereSceneQuery;
352        class StaticGeometry;
353    class StringConverter;
354    class StringInterface;
355    class SubEntity;
356    class SubMesh;
357        class TagPoint;
358    class Technique;
359        class TempBlendedBufferInfo;
360        class ExternalTextureSource;
361    class TextureUnitState;
362    class Texture;
363    class TexturePtr;
364        class TextureFont;
365    class TextureManager;
366    class TransformKeyFrame;
367        class Timer;
368    class UserDefinedObject;
369    class Vector2;
370    class Vector3;
371    class Vector4;
372    class Viewport;
373        class VertexAnimationTrack;
374    class VertexBufferBinding;
375    class VertexData;
376    class VertexDeclaration;
377        class VertexMorphKeyFrame;
378    class WireBoundingBox;
379    class Compositor;
380    class CompositorManager;
381    class CompositorChain;
382    class CompositorInstance;
383    class CompositionTechnique;
384    class CompositionPass;
385    class CompositionTargetPass;
386}
387
388#endif // __OgrePrerequisites_H__
389
390
Note: See TracBrowser for help on using the repository browser.