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

Revision 692, 11.8 KB checked in by mattausch, 19 years ago (diff)

adding ogre 1.2 and dependencies

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