source: OGRE/trunk/ogrenew/OgreMain/include/OgrePrerequisites.h @ 657

Revision 657, 11.1 KB checked in by mattausch, 19 years ago (diff)

added ogre dependencies and patched ogre sources

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// 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#endif
75
76#if OGRE_COMPILER == OGRE_COMPILER_MSVC
77#   undef _DEFINE_DEPRECATED_HASH_CLASSES
78#   if OGRE_COMP_VER > 1300
79#       define _DEFINE_DEPRECATED_HASH_CLASSES 0
80#   else
81#      define _DEFINE_DEPRECATED_HASH_CLASSES 1
82#   endif
83#endif
84
85/* Include all the standard header *after* all the configuration
86   settings have been made.
87*/
88#include "OgreStdHeaders.h"
89
90
91#include "OgreMemoryManager.h"
92
93// define the real number values to be used
94// default to use 'float' unless precompiler option set
95namespace Ogre {
96    // Define ogre version
97    #define OGRE_VERSION_MAJOR 1
98    #define OGRE_VERSION_MINOR 0
99    #define OGRE_VERSION_PATCH 7
100    #define OGRE_VERSION_NAME "Azathoth"
101
102    #if OGRE_DOUBLE_PRECISION == 1
103                /** Software floating point type.
104                @note Not valid as a pointer to GPU buffers / parameters
105                */
106        typedef double Real;
107    #else
108                /** Software floating point type.
109                @note Not valid as a pointer to GPU buffers / parameters
110                */
111        typedef float Real;
112    #endif
113
114    // define the Char type as either char or wchar_t
115    #if OGRE_WCHAR_T_STRINGS == 1
116    #   define OgreChar wchar_t
117    #   define _TO_CHAR( x ) L##x
118    #else
119    #   define OgreChar char
120    #   define _TO_CHAR( x ) x
121    #endif
122
123    #if OGRE_COMPILER == OGRE_COMPILER_GNUC && OGRE_COMP_VER >= 310
124    #   define HashMap ::__gnu_cxx::hash_map
125    #else
126    #   if OGRE_COMPILER == OGRE_COMPILER_MSVC
127    #       if OGRE_COMP_VER > 1300 && !defined(_STLP_MSVC)
128    #           define HashMap ::stdext::hash_map
129    #       else
130    #           define HashMap ::std::hash_map
131    #       endif
132    #   else
133    #       define HashMap ::std::hash_map
134    #   endif
135    #endif
136
137    /** In order to avoid finger-aches :)
138    */
139    typedef unsigned char uchar;
140    typedef unsigned short ushort;
141    typedef unsigned int uint; 
142        typedef unsigned long ulong; 
143
144    /// Useful macros
145    #define OGRE_DELETE(p)       { if(p) { delete (p);     (p)=NULL; } }
146    #define OGRE_DELETE_ARRAY(p) { if(p) { delete[] (p);   (p)=NULL; } }
147
148        #if OGRE_WCHAR_T_STRINGS
149                typedef std::wstring _StringBase;
150        #else
151                typedef std::string _StringBase;
152        #endif
153       
154        typedef _StringBase String;
155
156        // Useful threading defines
157        #define OGRE_AUTO_MUTEX_NAME mutex
158        #if OGRE_THREAD_SUPPORT
159                #define OGRE_AUTO_MUTEX mutable boost::recursive_mutex OGRE_AUTO_MUTEX_NAME;
160                #define OGRE_LOCK_AUTO_MUTEX boost::recursive_mutex::scoped_lock ogreAutoMutexLock(OGRE_AUTO_MUTEX_NAME);
161                #define OGRE_MUTEX(name) mutable boost::recursive_mutex name;
162                #define OGRE_LOCK_MUTEX(name) boost::recursive_mutex::scoped_lock ogrenameLock(name);
163                // like OGRE_AUTO_MUTEX but mutex held by pointer
164                #define OGRE_AUTO_SHARED_MUTEX mutable boost::recursive_mutex *OGRE_AUTO_MUTEX_NAME;
165                #define OGRE_LOCK_AUTO_SHARED_MUTEX boost::recursive_mutex::scoped_lock ogreAutoMutexLock(*OGRE_AUTO_MUTEX_NAME);
166                #define OGRE_NEW_AUTO_SHARED_MUTEX OGRE_AUTO_MUTEX_NAME = new boost::recursive_mutex();
167                #define OGRE_DELETE_AUTO_SHARED_MUTEX delete OGRE_AUTO_MUTEX_NAME;
168                #define OGRE_COPY_AUTO_SHARED_MUTEX(from) OGRE_AUTO_MUTEX_NAME = from;
169        #else
170                #define OGRE_AUTO_MUTEX
171                #define OGRE_LOCK_AUTO_MUTEX
172                #define OGRE_MUTEX(name)
173                #define OGRE_LOCK_MUTEX(name)
174                #define OGRE_AUTO_SHARED_MUTEX
175                #define OGRE_LOCK_AUTO_SHARED_MUTEX
176                #define OGRE_NEW_AUTO_SHARED_MUTEX
177                #define OGRE_DELETE_AUTO_SHARED_MUTEX
178                #define OGRE_COPY_AUTO_SHARED_MUTEX(from)
179        #endif
180
181
182// Pre-declare classes
183// Allows use of pointers in header files without including individual .h
184// so decreases dependencies between files
185    class Angle;
186    class Animation;
187    class AnimationState;
188    class AnimationTrack;
189    class Archive;
190    class ArchiveFactory;
191    class ArchiveManager;
192    class AutoParamDataSource;
193    class AxisAlignedBox;
194    class AxisAlignedBoxSceneQuery;
195    class Billboard;
196    class BillboardSet;
197    class Bone;
198    class Camera;
199    class Codec;
200    class ColourValue;
201    class ConfigDialog;
202    template <typename T> class Controller;
203        template <typename T> class ControllerFunction;
204    class ControllerManager;
205    template <typename T> class ControllerValue;
206        class Cursor;
207        class Degree;
208    class DynLib;
209    class DynLibManager;
210    class EdgeData;
211    class EdgeListBuilder;
212    class Entity;
213    class ErrorDialog;
214        class EventDispatcher;
215        class EventProcessor;
216        class EventQueue;
217        class EventTarget;
218    class ExternalTextureSourceManager;
219    class Factory;
220    class Font;
221    class FontPtr;
222    class FontManager;
223    struct FrameEvent;
224    class FrameListener;
225    class Frustum;
226    class GpuProgram;
227    class GpuProgramPtr;
228    class GpuProgramManager;
229        class GpuProgramUsage;
230    class HardwareIndexBuffer;
231    class HardwareOcclusionQuery;
232    class HardwareVertexBuffer;
233        class HardwarePixelBuffer;
234    class HardwarePixelBufferSharedPtr;
235        class HighLevelGpuProgram;
236    class HighLevelGpuProgramPtr;
237        class HighLevelGpuProgramManager;
238        class HighLevelGpuProgramFactory;
239    class IndexData;
240        class InputEvent;
241    class InputReader;
242    class IntersectionSceneQuery;
243    class IntersectionSceneQueryListener;
244    class Image;
245        class KeyEvent;
246    class KeyFrame;
247        class KeyListener;
248        class KeyTarget;
249    class Light;
250    class Log;
251    class LogManager;
252        class ManualResourceLoader;
253    class Material;
254    class MaterialPtr;
255    class MaterialManager;
256    class Math;
257    class Matrix3;
258    class Matrix4;
259    class MemoryManager;
260    class Mesh;
261    class MeshPtr;
262    class MeshSerializer;
263    class MeshSerializerImpl;
264    class MeshManager;
265    class MovableObject;
266    class MovablePlane;
267        class MouseEvent;
268        class MouseListener;
269        class MouseMotionListener;
270        class MouseTarget;
271    class Node;
272    class Overlay;
273    class OverlayContainer;
274    class OverlayElement;
275    class OverlayElementFactory;
276    class OverlayManager;
277    class Particle;
278    class ParticleAffector;
279    class ParticleAffectorFactory;
280    class ParticleEmitter;
281    class ParticleEmitterFactory;
282    class ParticleSystem;
283    class ParticleSystemManager;
284    class ParticleSystemRenderer;
285    class ParticleSystemRendererFactory;
286    class ParticleVisualData;
287    class Pass;
288    class PatchMesh;
289    class PixelBox;
290    class PlatformManager;
291    class Plane;
292    class PlaneBoundedVolume;
293        class PositionTarget;
294    class ProgressiveMesh;
295    class Profile;
296        class Profiler;
297    class Quaternion;
298        class Radian;
299    class Ray;
300    class RaySceneQuery;
301    class RaySceneQueryListener;
302    class Renderable;
303    class RenderPriorityGroup;
304    class RenderQueue;
305    class RenderQueueGroup;
306    class RenderQueueListener;
307    class RenderSystem;
308    class RenderSystemCapabilities;
309    class RenderTarget;
310    class RenderTargetListener;
311    class RenderTexture;
312    class RenderWindow;
313    class RenderOperation;
314    class Resource;
315        class ResourceBackgroundQueue;
316        class ResourceGroupManager;
317    class ResourceManager;
318        class Root;
319    class SceneManager;
320    class SceneManagerEnumerator;
321    class SceneNode;
322    class SceneQuery;
323    class SceneQueryListener;
324        class ScriptLoader;
325    class Serializer;
326    class ShadowCaster;
327    class ShadowRenderable;
328    class SimpleRenderable;
329    class SimpleSpline;
330    class Skeleton;
331    class SkeletonPtr;
332    class SkeletonInstance;
333    class SkeletonManager;
334    class Sphere;
335    class SphereSceneQuery;
336        class StaticGeometry;
337    class StringConverter;
338    class StringInterface;
339    class SubEntity;
340    class SubMesh;
341        class TagPoint;
342        class TargetManager;
343    class Technique;
344        class ExternalTextureSource;
345    class TextureUnitState;
346    class Texture;
347    class TexturePtr;
348        class TextureFont;
349    class TextureManager;
350        class Timer;
351    class UserDefinedObject;
352    class Vector2;
353    class Vector3;
354    class Vector4;
355    class Viewport; 
356    class VertexBufferBinding;
357    class VertexData;
358    class VertexDeclaration;
359    class WireBoundingBox;
360}
361
362#endif // __OgrePrerequisites_H__
363
364
Note: See TracBrowser for help on using the repository browser.