source: OGRE/trunk/ogre_changes/Ogre1.2/OgreMain/include/OgrePrerequisites.h @ 768

Revision 768, 11.9 KB checked in by szirmay, 18 years ago (diff)
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-2005 The OGRE Team
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 __Prerequisites_H__
26#define __Prerequisites_H__
27
28#define GAMETOOLS_ILLUMINATION_MODULE
29
30// undefine this to not require new angular units where applicable
31#define OGRE_FORCE_ANGLE_TYPES
32
33// Platform-specific stuff
34#include "OgrePlatform.h"
35
36#if OGRE_COMPILER == OGRE_COMPILER_MSVC
37// Turn off warnings generated by long std templates
38// This warns about truncation to 255 characters in debug/browse info
39#   pragma warning (disable : 4786)
40
41// Turn off warnings generated by long std templates
42// This warns about truncation to 255 characters in debug/browse info
43#   pragma warning (disable : 4503)
44
45// disable: "conversion from 'double' to 'float', possible loss of data
46#   pragma warning (disable : 4244)
47
48// disable: "truncation from 'double' to 'float'
49#   pragma warning (disable : 4305)
50
51// disable: "<type> needs to have dll-interface to be used by clients'
52// Happens on STL member variables which are not public therefore is ok
53#   pragma warning (disable : 4251)
54
55// disable: "non dll-interface class used as base for dll-interface class"
56// Happens when deriving from Singleton because bug in compiler ignores
57// template export
58#   pragma warning (disable : 4275)
59
60// disable: "C++ Exception Specification ignored"
61// This is because MSVC 6 did not implement all the C++ exception
62// specifications in the ANSI C++ draft.
63#   pragma warning( disable : 4290 )
64
65// disable: "no suitable definition provided for explicit template
66// instantiation request" Occurs in VC7 for no justifiable reason on all
67// #includes of Singleton
68#   pragma warning( disable: 4661)
69
70// disable: deprecation warnings when using CRT calls in VC8
71// These show up on all C runtime lib code in VC8, disable since they clutter
72// the warnings with things we may not be able to do anything about (e.g.
73// generated code from nvparse etc). I doubt very much that these calls
74// will ever be actually removed from VC anyway, it would break too much code.
75#       pragma warning( disable: 4996)
76#endif
77
78#if OGRE_COMPILER == OGRE_COMPILER_MSVC
79#   undef _DEFINE_DEPRECATED_HASH_CLASSES
80#   if OGRE_COMP_VER > 1300
81#       define _DEFINE_DEPRECATED_HASH_CLASSES 0
82#   else
83#      define _DEFINE_DEPRECATED_HASH_CLASSES 1
84#   endif
85#endif
86
87/* Include all the standard header *after* all the configuration
88   settings have been made.
89*/
90#include "OgreStdHeaders.h"
91
92
93#include "OgreMemoryManager.h"
94
95namespace Ogre {
96    // Define ogre version
97    #define OGRE_VERSION_MAJOR 1
98    #define OGRE_VERSION_MINOR 2
99    #define OGRE_VERSION_PATCH 0
100    #define OGRE_VERSION_NAME "Dagon"
101
102    #define OGRE_VERSION    ((OGRE_VERSION_MAJOR << 16) | (OGRE_VERSION_MINOR << 8) | OGRE_VERSION_PATCH)
103
104    // define the real number values to be used
105    // default to use 'float' unless precompiler option set
106    #if OGRE_DOUBLE_PRECISION == 1
107                /** Software floating point type.
108                @note Not valid as a pointer to GPU buffers / parameters
109                */
110        typedef double Real;
111    #else
112                /** Software floating point type.
113                @note Not valid as a pointer to GPU buffers / parameters
114                */
115        typedef float Real;
116    #endif
117
118    // define the Char type as either char or wchar_t
119    #if OGRE_WCHAR_T_STRINGS == 1
120    #   define OgreChar wchar_t
121    #   define _TO_CHAR( x ) L##x
122    #else
123    #   define OgreChar char
124    #   define _TO_CHAR( x ) x
125    #endif
126
127    #if OGRE_COMPILER == OGRE_COMPILER_GNUC && OGRE_COMP_VER >= 310 && !defined(STLPORT)
128    #   define HashMap ::__gnu_cxx::hash_map
129    #else
130    #   if OGRE_COMPILER == OGRE_COMPILER_MSVC
131    #       if OGRE_COMP_VER > 1300 && !defined(_STLP_MSVC)
132    #           define HashMap ::stdext::hash_map
133    #       else
134    #           define HashMap ::std::hash_map
135    #       endif
136    #   else
137    #       define HashMap ::std::hash_map
138    #   endif
139    #endif
140
141    /** In order to avoid finger-aches :)
142    */
143    typedef unsigned char uchar;
144    typedef unsigned short ushort;
145    typedef unsigned int uint;
146        typedef unsigned long ulong;
147
148    /// Useful macros
149    #define OGRE_DELETE(p)       { if(p) { delete (p);     (p)=NULL; } }
150    #define OGRE_DELETE_ARRAY(p) { if(p) { delete[] (p);   (p)=NULL; } }
151
152        #if OGRE_WCHAR_T_STRINGS
153                typedef std::wstring _StringBase;
154        #else
155                typedef std::string _StringBase;
156        #endif
157
158        typedef _StringBase String;
159
160        // Useful threading defines
161        #define OGRE_AUTO_MUTEX_NAME mutex
162        #if OGRE_THREAD_SUPPORT
163                #define OGRE_AUTO_MUTEX mutable boost::recursive_mutex OGRE_AUTO_MUTEX_NAME;
164                #define OGRE_LOCK_AUTO_MUTEX boost::recursive_mutex::scoped_lock ogreAutoMutexLock(OGRE_AUTO_MUTEX_NAME);
165                #define OGRE_MUTEX(name) mutable boost::recursive_mutex name;
166                #define OGRE_LOCK_MUTEX(name) boost::recursive_mutex::scoped_lock ogrenameLock(name);
167                // like OGRE_AUTO_MUTEX but mutex held by pointer
168                #define OGRE_AUTO_SHARED_MUTEX mutable boost::recursive_mutex *OGRE_AUTO_MUTEX_NAME;
169                #define OGRE_LOCK_AUTO_SHARED_MUTEX boost::recursive_mutex::scoped_lock ogreAutoMutexLock(*OGRE_AUTO_MUTEX_NAME);
170                #define OGRE_NEW_AUTO_SHARED_MUTEX OGRE_AUTO_MUTEX_NAME = new boost::recursive_mutex();
171                #define OGRE_DELETE_AUTO_SHARED_MUTEX delete OGRE_AUTO_MUTEX_NAME;
172                #define OGRE_COPY_AUTO_SHARED_MUTEX(from) OGRE_AUTO_MUTEX_NAME = from;
173        #else
174                #define OGRE_AUTO_MUTEX
175                #define OGRE_LOCK_AUTO_MUTEX
176                #define OGRE_MUTEX(name)
177                #define OGRE_LOCK_MUTEX(name)
178                #define OGRE_AUTO_SHARED_MUTEX
179                #define OGRE_LOCK_AUTO_SHARED_MUTEX
180                #define OGRE_NEW_AUTO_SHARED_MUTEX
181                #define OGRE_DELETE_AUTO_SHARED_MUTEX
182                #define OGRE_COPY_AUTO_SHARED_MUTEX(from)
183        #endif
184
185
186// Pre-declare classes
187// Allows use of pointers in header files without including individual .h
188// so decreases dependencies between files
189    class Angle;
190    class Animation;
191    class AnimationState;
192    class AnimationStateSet;
193    class AnimationTrack;
194    class Archive;
195    class ArchiveFactory;
196    class ArchiveManager;
197    class AutoParamDataSource;
198    class AxisAlignedBox;
199    class AxisAlignedBoxSceneQuery;
200    class Billboard;
201    class BillboardChain;
202    class BillboardSet;
203    class Bone;
204    class Camera;
205    class Codec;
206    class ColourValue;
207    class ConfigDialog;
208    template <typename T> class Controller;
209        template <typename T> class ControllerFunction;
210    class ControllerManager;
211    template <typename T> class ControllerValue;
212        class Cursor;
213        class Degree;
214    class DynLib;
215    class DynLibManager;
216    class EdgeData;
217    class EdgeListBuilder;
218    class Entity;
219    class ErrorDialog;
220        class EventDispatcher;
221        class EventProcessor;
222        class EventQueue;
223        class EventTarget;
224    class ExternalTextureSourceManager;
225    class Factory;
226    class Font;
227    class FontPtr;
228    class FontManager;
229    struct FrameEvent;
230    class FrameListener;
231    class Frustum;
232    class GpuProgram;
233    class GpuProgramPtr;
234    class GpuProgramManager;
235        class GpuProgramUsage;
236    class HardwareIndexBuffer;
237    class HardwareOcclusionQuery;
238    class HardwareVertexBuffer;
239        class HardwarePixelBuffer;
240    class HardwarePixelBufferSharedPtr;
241        class HighLevelGpuProgram;
242    class HighLevelGpuProgramPtr;
243        class HighLevelGpuProgramManager;
244        class HighLevelGpuProgramFactory;
245    class IndexData;
246        class InputEvent;
247    class InputReader;
248    class IntersectionSceneQuery;
249    class IntersectionSceneQueryListener;
250    class Image;
251        class KeyEvent;
252    class KeyFrame;
253        class KeyListener;
254        class KeyTarget;
255    class Light;
256    class Log;
257    class LogManager;
258        class ManualResourceLoader;
259        class ManualObject;
260    class Material;
261    class MaterialPtr;
262    class MaterialManager;
263    class Math;
264    class Matrix3;
265    class Matrix4;
266    class MemoryManager;
267    class Mesh;
268    class MeshPtr;
269    class MeshSerializer;
270    class MeshSerializerImpl;
271    class MeshManager;
272    class MovableObject;
273    class MovablePlane;
274        class MouseEvent;
275        class MouseListener;
276        class MouseMotionListener;
277        class MouseTarget;
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 PlatformManager;
302    class Plane;
303    class PlaneBoundedVolume;
304        class Pose;
305        class PositionTarget;
306    class ProgressiveMesh;
307    class Profile;
308        class Profiler;
309    class Quaternion;
310        class Radian;
311    class Ray;
312    class RaySceneQuery;
313    class RaySceneQueryListener;
314    class Renderable;
315    class RenderPriorityGroup;
316    class RenderQueue;
317    class RenderQueueGroup;
318        class RenderQueueInvocation;
319        class RenderQueueInvocationSequence;
320    class RenderQueueListener;
321    class RenderSystem;
322    class RenderSystemCapabilities;
323    class RenderTarget;
324    class RenderTargetListener;
325    class RenderTexture;
326        class MultiRenderTarget;
327    class RenderWindow;
328    class RenderOperation;
329    class Resource;
330        class ResourceBackgroundQueue;
331        class ResourceGroupManager;
332    class ResourceManager;
333    class RibbonTrail;
334        class Root;
335    class SceneManager;
336    class SceneManagerEnumerator;
337    class SceneNode;
338    class SceneQuery;
339    class SceneQueryListener;
340        class ScriptLoader;
341    class Serializer;
342    class ShadowCaster;
343    class ShadowRenderable;
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 TargetManager;
359    class Technique;
360        class TempBlendedBufferInfo;
361        class ExternalTextureSource;
362    class TextureUnitState;
363    class Texture;
364    class TexturePtr;
365        class TextureFont;
366    class TextureManager;
367    class TransformKeyFrame;
368        class Timer;
369    class UserDefinedObject;
370    class Vector2;
371    class Vector3;
372    class Vector4;
373    class Viewport;
374        class VertexAnimationTrack;
375    class VertexBufferBinding;
376    class VertexData;
377    class VertexDeclaration;
378        class VertexMorphKeyFrame;
379    class WireBoundingBox;
380    class Compositor;
381    class CompositorManager;
382    class CompositorChain;
383    class CompositorInstance;
384    class CompositionTechnique;
385    class CompositionPass;
386    class CompositionTargetPass;
387}
388
389#endif // __OgrePrerequisites_H__
390
391
Note: See TracBrowser for help on using the repository browser.