26 #ifndef __OgrePrerequisites_H__
27 #define __OgrePrerequisites_H__
36 # if OGRE_MEMORY_TRACKER_DEBUG_MODE
37 # define OGRE_MEMORY_TRACKER 1
39 # define OGRE_MEMORY_TRACKER 0
42 # if OGRE_MEMORY_TRACKER_RELEASE_MODE
43 # define OGRE_MEMORY_TRACKER 1
45 # define OGRE_MEMORY_TRACKER 0
51 #define OGRE_VERSION_MAJOR 1
52 #define OGRE_VERSION_MINOR 9
53 #define OGRE_VERSION_PATCH 0
54 #define OGRE_VERSION_SUFFIX ""
55 #define OGRE_VERSION_NAME "Ghadamon"
57 #define OGRE_VERSION ((OGRE_VERSION_MAJOR << 16) | (OGRE_VERSION_MINOR << 8) | OGRE_VERSION_PATCH)
61 #if OGRE_DOUBLE_PRECISION == 1
73 #if OGRE_COMPILER == OGRE_COMPILER_GNUC && OGRE_COMP_VER >= 310 && !defined(STLPORT)
74 # if OGRE_COMP_VER >= 430
75 # define HashMap ::std::tr1::unordered_map
76 # define HashSet ::std::tr1::unordered_set
78 # define HashMap ::__gnu_cxx::hash_map
79 # define HashSet ::__gnu_cxx::hash_set
81 #elif OGRE_COMPILER == OGRE_COMPILER_CLANG
82 # if defined(_LIBCPP_VERSION)
83 # define HashMap ::std::unordered_map
84 # define HashSet ::std::unordered_set
86 # define HashMap ::std::tr1::unordered_map
87 # define HashSet ::std::tr1::unordered_set
90 # if OGRE_COMPILER == OGRE_COMPILER_MSVC && !defined(_STLP_MSVC)
91 # if _MSC_FULL_VER >= 150030729 // VC++ 9.0 SP1+
92 # define HashMap ::std::tr1::unordered_map
93 # define HashSet ::std::tr1::unordered_set
94 # elif OGRE_THREAD_PROVIDER == 1
95 # define HashMap ::boost::unordered_map
96 # define HashSet ::boost::unordered_set
98 # define HashMap ::std::unordered_map
99 # define HashSet ::std::unordered_set
102 # define HashMap ::std::unordered_map
103 # define HashSet ::std::unordered_set
107 #define OGRE_DEFINE_STATIC_LOCAL(type, name, arguments) \
108 static type& name = *new type arguments
331 #if OGRE_STRING_USE_CUSTOM_MEMORY_ALLOCATOR
332 typedef std::basic_string<char, std::char_traits<char>, STLAllocator<char,GeneralAllocPolicy > >
_StringBase;
333 typedef std::basic_stringstream<char,std::char_traits<char>,STLAllocator<char,GeneralAllocPolicy > >
_StringStreamBase;
335 #define StdStringT(T) std::basic_string<T, std::char_traits<T>, std::allocator<T> >
336 #define CustomMemoryStringT(T) std::basic_string<T, std::char_traits<T>, STLAllocator<T,GeneralAllocPolicy> >
339 bool operator <(
const CustomMemoryStringT(T)& l,
const StdStringT(T)& o)
341 return l.compare(0,l.length(),o.c_str(),o.length())<0;
344 bool operator <(
const StdStringT(T)& l,
const CustomMemoryStringT(T)& o)
346 return l.compare(0,l.length(),o.c_str(),o.length())<0;
349 bool operator <=(
const CustomMemoryStringT(T)& l,
const StdStringT(T)& o)
351 return l.compare(0,l.length(),o.c_str(),o.length())<=0;
354 bool operator <=(
const StdStringT(T)& l,
const CustomMemoryStringT(T)& o)
356 return l.compare(0,l.length(),o.c_str(),o.length())<=0;
359 bool operator >(
const CustomMemoryStringT(T)& l,
const StdStringT(T)& o)
361 return l.compare(0,l.length(),o.c_str(),o.length())>0;
364 bool operator >(
const StdStringT(T)& l,
const CustomMemoryStringT(T)& o)
366 return l.compare(0,l.length(),o.c_str(),o.length())>0;
369 bool operator >=(
const CustomMemoryStringT(T)& l,
const StdStringT(T)& o)
371 return l.compare(0,l.length(),o.c_str(),o.length())>=0;
374 bool operator >=(
const StdStringT(T)& l,
const CustomMemoryStringT(T)& o)
376 return l.compare(0,l.length(),o.c_str(),o.length())>=0;
380 bool operator ==(
const CustomMemoryStringT(T)& l,
const StdStringT(T)& o)
382 return l.compare(0,l.length(),o.c_str(),o.length())==0;
385 bool operator ==(
const StdStringT(T)& l,
const CustomMemoryStringT(T)& o)
387 return l.compare(0,l.length(),o.c_str(),o.length())==0;
391 bool operator !=(
const CustomMemoryStringT(T)& l,
const StdStringT(T)& o)
393 return l.compare(0,l.length(),o.c_str(),o.length())!=0;
396 bool operator !=(
const StdStringT(T)& l,
const CustomMemoryStringT(T)& o)
398 return l.compare(0,l.length(),o.c_str(),o.length())!=0;
402 CustomMemoryStringT(T) operator +=(const CustomMemoryStringT(T)& l,const StdStringT(T)& o)
404 return CustomMemoryStringT(T)(l)+=o.c_str();
407 CustomMemoryStringT(T) operator +=(const StdStringT(T)& l,const CustomMemoryStringT(T)& o)
409 return CustomMemoryStringT(T)(l.c_str())+=o.c_str();
413 CustomMemoryStringT(T) operator +(const CustomMemoryStringT(T)& l,const StdStringT(T)& o)
415 return CustomMemoryStringT(T)(l)+=o.c_str();
419 CustomMemoryStringT(T) operator +(const StdStringT(T)& l,const CustomMemoryStringT(T)& o)
421 return CustomMemoryStringT(T)(l.c_str())+=o.c_str();
425 CustomMemoryStringT(T) operator +(const T* l,const CustomMemoryStringT(T)& o)
427 return CustomMemoryStringT(T)(l)+=o;
431 #undef CustomMemoryStringT
435 typedef std::basic_stringstream<char,std::char_traits<char>,std::allocator<char> >
_StringStreamBase;
445 #if OGRE_STRING_USE_CUSTOM_MEMORY_ALLOCATOR
448 #if (OGRE_COMPILER == OGRE_COMPILER_GNUC && OGRE_COMP_VER >= 430) || OGRE_COMPILER == OGRE_COMPILER_CLANG && !defined(STLPORT) && __cplusplus < 201103L
452 template <>
struct hash<Ogre::
String>
457 size_t _Val = 2166136261U;
459 size_t _Last = str.size();
460 size_t _Stride = 1 + _Last / 10;
462 for(; _First < _Last; _First += _Stride)
463 _Val = 16777619U * _Val ^ (
size_t)str[_First];
467 #if (OGRE_COMPILER == OGRE_COMPILER_GNUC && OGRE_COMP_VER >= 430) || OGRE_COMPILER == OGRE_COMPILER_CLANG && !defined(STLPORT) && __cplusplus < 201103L
476 template <
typename T,
typename A = STLAllocator<T, GeneralAllocPolicy> >
479 #if OGRE_CONTAINERS_USE_CUSTOM_MEMORY_ALLOCATOR
480 typedef typename std::deque<T, A>
type;
481 typedef typename std::deque<T, A>::iterator
iterator;
484 typedef typename std::deque<T>
type;
485 typedef typename std::deque<T>::iterator
iterator;
490 template <
typename T,
typename A = STLAllocator<T, GeneralAllocPolicy> >
493 #if OGRE_CONTAINERS_USE_CUSTOM_MEMORY_ALLOCATOR
494 typedef typename std::vector<T, A>
type;
495 typedef typename std::vector<T, A>::iterator
iterator;
498 typedef typename std::vector<T>
type;
499 typedef typename std::vector<T>::iterator
iterator;
504 template <
typename T,
typename A = STLAllocator<T, GeneralAllocPolicy> >
507 #if OGRE_CONTAINERS_USE_CUSTOM_MEMORY_ALLOCATOR
508 typedef typename std::list<T, A>
type;
509 typedef typename std::list<T, A>::iterator
iterator;
512 typedef typename std::list<T>
type;
513 typedef typename std::list<T>::iterator
iterator;
518 template <
typename T,
typename P = std::less<T>,
typename A = STLAllocator<T, GeneralAllocPolicy> >
521 #if OGRE_CONTAINERS_USE_CUSTOM_MEMORY_ALLOCATOR
522 typedef typename std::set<T, P, A>
type;
523 typedef typename std::set<T, P, A>::iterator
iterator;
526 typedef typename std::set<T, P>
type;
527 typedef typename std::set<T, P>::iterator
iterator;
532 template <
typename K,
typename V,
typename P = std::less<K>,
typename A = STLAllocator<std::pair<const K, V>, GeneralAllocPolicy> >
535 #if OGRE_CONTAINERS_USE_CUSTOM_MEMORY_ALLOCATOR
536 typedef typename std::map<K, V, P, A>
type;
537 typedef typename std::map<K, V, P, A>::iterator
iterator;
540 typedef typename std::map<K, V, P>
type;
541 typedef typename std::map<K, V, P>::iterator
iterator;
542 typedef typename std::map<K, V, P>::const_iterator
const_iterator;
546 template <
typename K,
typename V,
typename P = std::less<K>,
typename A = STLAllocator<std::pair<const K, V>, GeneralAllocPolicy> >
549 #if OGRE_CONTAINERS_USE_CUSTOM_MEMORY_ALLOCATOR
550 typedef typename std::multimap<K, V, P, A>
type;
551 typedef typename std::multimap<K, V, P, A>::iterator
iterator;
554 typedef typename std::multimap<K, V, P>
type;
555 typedef typename std::multimap<K, V, P>::iterator
iterator;
556 typedef typename std::multimap<K, V, P>::const_iterator
const_iterator;
562 #endif // __OgrePrerequisites_H__
Class which represents the renderable aspects of a set of shadow volume faces.
A 'track' in an animation sequence, i.e.
A 'canvas' which can receive the results of a rendering operation.
Patch specialisation of Mesh.
Separate SceneQuery class to query for pairs of objects which are possibly intersecting one another...
Utility class which defines the sub-parts of an Entity.
std::set< T, P, A >::const_iterator const_iterator
Class for loading & managing textures.
Abstract class that defines a 'codec'.
Abstract class defining the interface all renderable objects must implement.
Class defining a single pass of a Technique (of a Material), i.e.
Class to provide access to common mathematical functions.
Generic class for serialising data to / from binary stream-based files.
Class for managing RenderSystemCapabilities database for Ogre.
Abstract class defining the interface used by classes which wish to perform script loading to define ...
Specialisation of HardwareBuffer for a pixel buffer.
Abstract class defining a movable object in a scene.
Strategy for determining level of detail.
std::list< T, A >::iterator iterator
Instancing implementation using vertex texture through Vertex Texture Fetch (VTF) and hardware instan...
Specialises the SceneQuery class for querying within an axis aligned box.
Singleton Class which handles the registering and control of texture plugins.
A very simple spline class which implements the Catmull-Rom class of splines.
Interface to a general purpose request / response style background work queue.
Summary class collecting together vertex source information.
Class representing the invocation of queue groups in a RenderQueue.
Represents a convex volume bounded by planes.
Implementation of a Quaternion, i.e.
SharedPtr< Resource > ResourcePtr
Shared pointer to a Resource.
Injects the output of a request to the mesh in a thread safe way.
A sphere primitive, mostly used for bounds checking.
Interface for compositor logics, which can be automatically binded to compositors, allowing per-compositor logic (such as attaching a relevant listener) to happen automatically.
An instance of a Compositor object for one Viewport.
A 3x3 matrix which can represent rotations around axes.
4-dimensional homogeneous vector.
Object representing one render to a RenderTarget or Viewport in the Ogre Composition framework...
Handles the management of skeleton resources.
SharedPtr< Mesh > MeshPtr
Standard 2-dimensional vector.
Subclasses of this class are responsible for performing a function on an input value for a Controller...
Class representing colour.
float Real
Software floating point type.
Alternative listener class for dealing with IntersectionSceneQuery.
Class to manage the scene object rendering queue.
Summary class collecting together index data source information.
SharedPtr< GpuProgram > GpuProgramPtr
Specialisation of HardwareBuffer for a vertex buffer.
Structure for recording the use of temporary blend buffers.
Object representing one pass or operation in a composition sequence.
unsigned char uchar
In order to avoid finger-aches :)
Resource holding data about a dynamic library.
Abstract class representing a loadable resource (e.g.
A collection of Bone objects used to animate a skinned mesh.
Class for displaying the error dialog if Ogre fails badly.
Abstract base class representing a high-level program (a vertex or fragment program).
Class representing a node in the scene graph.
Specialisation of HardwareBuffer for vertex index buffers, still abstract.
Interface describing a manual resource loader.
Abstract class representing a Texture resource.
Abstract class defining the interface to be implemented by particle affectors.
An abstraction of a viewport, i.e.
An individual profile that will be processed by the Profiler.
Class providing a much simplified interface to generating manual objects with custom geometry...
Specialised AnimationTrack for dealing with generic animable values.
This class contains the information required to describe the edge connectivity of a given set of vert...
Can either be used as an input or output value.
Class for managing Material settings for Ogre.
Defines a plane in 3D space.
Defines a part of a complete mesh.
Specialises the SceneQuery class for querying within a sphere.
Subclass of BillboardChain which automatically leaves a trail behind one or more Node instances...
Class for serialising mesh data to/from an OGRE .mesh file.
Class encapsulating a set of AnimationState objects.
SharedPtr< Material > MaterialPtr
Improved version of ProgressiveMesh.
Instances of this class 'control' the value of another object in the system.
Base composition technique, can be subclassed in plugins.
std::deque< T, A >::iterator iterator
Class encapsulating a standard 4x4 homogeneous matrix.
Standard 3-dimensional vector.
Class to hold a linear sequence of RenderQueueInvocation objects.
std::set< T, P, A >::iterator iterator
std::basic_stringstream< char, std::char_traits< char >, std::allocator< char > > _StringStreamBase
This class declares the format of a set of vertex inputs, which can be issued to the rendering API th...
Class representing a Compositor object.
The profiler allows you to measure the performance of your code.
Class for managing Compositor settings for Ogre.
Class representing the state of a single texture unit during a Pass of a Technique, of a Material.
Abstract class definition of a factory object for ParticleSystemRenderer.
std::map< K, V, P, A > type
A grouping level underneath RenderQueue which groups renderables to be issued at coarsely the same t...
Class for managing Controller instances.
A SkeletonInstance is a single instance of a Skeleton used by a world object.
Abstract class defining the interface required to be implemented by classes which provide rendering c...
Abstract class defining the interface to be implemented by creators of ParticleEmitter subclasses...
Class representing a general-purpose node an articulated scene graph.
StringStream stringstream
std::multimap< K, V, P, A >::const_iterator const_iterator
Defines the functionality of a 3D API.
Wrapper class which identifies a value as the currently default angle type, as defined by Math::setAn...
bool operator!=(STLAllocator< T, P > const &, STLAllocator< T2, P > const &)
determine equality, can memory from another allocator be released by this allocator, (ISO C++)
Collection of renderables by priority.
Struct containing information about a frame event.
This class represents a RenderTarget that renders to a Texture.
Enumerates the SceneManager classes available to applications.
A key frame in an animation sequence defined by an AnimationTrack.
Specialises the SceneQuery class for querying along a ray.
_StringStreamBase StringStream
Class defining the common interface which classes can use to present a reflection-style, self-defining parameter set to callers.
SharedPtr< Compositor > CompositorPtr
Resource holding data about 3D mesh.
This class defines the interface that must be implemented by shadow casters.
Abstract interface which classes must implement if they wish to receive events from the scene manager...
Class for serializing RenderSystemCapabilities to / from a .rendercaps script.
Class defining a generic OGRE plugin.
Class for converting the core Ogre data types to/from Strings.
This class is used to perform Resource operations in a background thread.
An abstract class that contains a depth/stencil buffer.
Shared pointer implementation used to share pixel buffers.
This is the main starting point for the new instancing system.
Defines the behaviour of an automatic renderer configuration dialog.
Manager for Dynamic-loading Libraries.
Specialised KeyFrame which stores absolute vertex positions for a complete buffer, designed to be interpolated with other keys in the same track.
Abstract class containing any additional data required to be associated with a particle to perform th...
Class to manage the available shadow textures which may be shared between many SceneManager instances...
Abstract class defining the interface to be implemented by creators of ParticleAffector subclasses...
Utility class providing helper methods for reading / writing structured data held in a DataStream...
singleton class for storing the capabilities of the graphics card.
Manages threaded compilation of scripts.
Allows the rendering of a wireframe bounding box.
Abstract factory class, archive codec plugins can register concrete subclasses of this...
A viewpoint from which the scene will be rendered.
Chain of compositor effects applying to one viewport.
A class for performing queries on a scene.
std::vector< T, A >::iterator iterator
Handles the management of mesh resources.
std::multimap< K, V, P, A > type
Records the state of all the vertex buffer bindings required to provide a vertex declaration with the...
This class manages the available ArchiveFactory plugins.
Defines a generic resource handler.
Class representing a single particle instance.
Class representing an image file.
Abstract interface which classes must implement if they wish to receive events from the render queue...
InstanceBatch forms part of the new Instancing system This is an abstract class that must be derived ...
This optional class allows you to receive per-result callbacks from SceneQuery executions instead of ...
Interface for custom composition passes, allowing custom operations (in addition to the quad...
This ResourceManager manages high-level vertex and fragment programs.
Defines a program which runs on the GPU such as a vertex or fragment program.
The log manager handles the creation and retrieval of logs for the application.
A tagged point on a skeleton, which can be used to attach entities to on specific other entities...
Class encapsulates rendering properties of an object.
std::map< K, V, P, A >::iterator iterator
Internal implementation of Mesh reading / writing for the latest version of the .mesh format.
std::multimap< K, V, P, A >::iterator iterator
Manages the target rendering window.
Abstract class defining the interface to be implemented by particle emitters.
This singleton class manages the list of resource groups, and notifying the various resource managers...
This is a abstract class that that provides the interface for the query class for hardware occlusion...
A interface class defining a listener which can be used to receive notifications of RenderTarget even...
Pre-transforms and batches up meshes for efficient use as static geometry in a scene.
Reference-counted shared pointer, used for objects where implicit destruction is required.
std::deque< T, A >::const_iterator const_iterator
Class that provides convenient interface to establish a linkage between custom user application obje...
bool operator==(STLAllocator< T, P > const &, STLAllocator< T2, P > const &)
determine equality, can memory from another allocator be released by this allocator, (ISO C++)
std::list< T, A >::const_iterator const_iterator
'New' rendering operation using vertex buffers.
Class representing an approach to rendering this particular Material.
Defines an instance of a discrete, movable object based on a Mesh.
A collection of billboards (faces which are always facing the given direction) with the same (default...
Wrapper class which indicates a given angle value is in Degrees.
Interface definition for factories of HighLevelGpuProgram.
Class defining particle system based special effects.
A primitive describing a volume (3D), image (2D) or line (1D) of pixels in memory.
Represents the state of an animation and the weight of its influence.
Alternative listener class for dealing with RaySceneQuery.
SharedPtr< Skeleton > SkeletonPtr
This utility class is used to hold the information used to generate the matrices and other informati...
IMPORTANT: **Plugins must override default dictionary name!** Base class that texture plugins deriv...
This is the same technique the old "InstancedGeometry" implementation used (with improvements).
This class makes the usage of a vertex and fragment programs (low-level or high-level), with a given set of parameters, explicit.
A frustum represents a pyramid, capped at the near and far end which is used to represent either a vi...
This class represents a render target that renders to multiple RenderTextures at once.
Specialised AnimationTrack for dealing with changing vertex position information. ...
std::map< K, V, P, A >::const_iterator const_iterator
A 3D box aligned with the x/y/z axes.
Manages the organisation and rendering of a 'scene' i.e.
Definition of a Plane that may be attached to a node, and the derived details of it retrieved simply...
This file configures Ogre's memory allocators.
A billboard is a primitive which always faces the camera in every frame.
Manages particle systems, particle system scripts (templates) and the available emitter & affector fa...
The root class of the Ogre system.
SharedPtr< PatchMesh > PatchMeshPtr
Simple implementation of MovableObject and Renderable for single-part custom objects.
Representation of a dynamic light source in the scene.
Allows the rendering of a chain of connected billboards.
A interface class defining a listener which can be used to receive notifications of frame events...
This is the main class for the compiler.
General utility class for building edge lists for geometry.
Specialised AnimationTrack for dealing with node transforms.
Representation of a ray in space, i.e.
This is technique requires true instancing hardware support.
Specialised KeyFrame which stores any numeric value.
bool operator<(SharedPtr< T > const &a, SharedPtr< U > const &b)
SharedPtr< Texture > TexturePtr
A pose is a linked set of vertex offsets applying to one set of vertex data.
Wrapper class which indicates a given angle value is in Radians.
Implementation of a general purpose request / response style background work queue.
SharedPtr< HighLevelGpuProgram > HighLevelGpuProgramPtr
std::vector< T, A >::const_iterator const_iterator