Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: sandbox_light/src/external/ogremath/OgrePrerequisites.h @ 6514

Last change on this file since 6514 was 5789, checked in by rgrieder, 15 years ago

Stripped sandbox further down to get a light version that excludes almost all core features.
Also, the Ogre dependency has been removed and a little ogremath library been added.

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